combine.yml 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. # Copyright 2020 Google LLC
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. name: combine
  15. on:
  16. pull_request:
  17. paths:
  18. # Combine sources
  19. - 'FirebaseCombineSwift/**'
  20. # Podspecs
  21. - 'FirebaseCombineSwift.podspec'
  22. # This workflow
  23. - '.github/workflows/combine.yml'
  24. # Rebuild on Ruby infrastructure changes.
  25. - 'Gemfile'
  26. # Dependencies (Disabled to avoid building Firestore in presubmits)
  27. # - 'FirebaseCore/**'
  28. # - 'FirebaseAuth/**'
  29. # - 'FirebaseFunctions/**'
  30. # - 'Firestore/**'
  31. # - 'FirebaseStorage/**'
  32. schedule:
  33. # Run every day at 11pm (PST) - cron uses UTC times
  34. - cron: '0 7 * * *'
  35. concurrency:
  36. group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  37. cancel-in-progress: true
  38. jobs:
  39. xcodebuild:
  40. # Don't run on private repo unless it is a PR.
  41. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  42. runs-on: macos-12
  43. strategy:
  44. matrix:
  45. target: [iOS]
  46. steps:
  47. - uses: actions/checkout@v3
  48. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  49. with:
  50. cache_key: ${{ matrix.os }}
  51. - uses: ruby/setup-ruby@v1
  52. - name: Install xcpretty
  53. run: gem install xcpretty
  54. - name: Setup build
  55. run: scripts/install_prereqs.sh CombineSwift ${{ matrix.target }} xcodebuild
  56. - name: Build and test
  57. run: scripts/third_party/travis/retry.sh scripts/build.sh CombineSwift ${{ matrix.target }} xcodebuild
  58. storage-combine-integration:
  59. # Don't run on private repo unless it is a PR.
  60. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  61. env:
  62. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  63. runs-on: macos-12
  64. steps:
  65. - uses: actions/checkout@v3
  66. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  67. with:
  68. cache_key: ${{ matrix.os }}
  69. - uses: ruby/setup-ruby@v1
  70. - name: Setup Bundler
  71. run: scripts/setup_bundler.sh
  72. - name: Install xcpretty
  73. run: gem install xcpretty
  74. - name: Install Secret GoogleService-Info.plist
  75. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/storage-db-plist.gpg \
  76. FirebaseStorage/Tests/Integration/Resources/GoogleService-Info.plist "$plist_secret"
  77. - name: Install Credentials.h
  78. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Storage/Credentials.h.gpg \
  79. FirebaseStorage/Tests/ObjCIntegration/Credentials.h "$plist_secret"
  80. - name: Install Credentials.swift
  81. run: |
  82. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Storage/Credentials.swift.gpg \
  83. FirebaseStorage/Tests/Integration/Credentials.swift "$plist_secret"
  84. - name: BuildAndTest # can be replaced with pod lib lint with CocoaPods 1.10
  85. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/build.sh StorageCombine all)