combine.yml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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. permissions:
  16. contents: read
  17. on:
  18. workflow_dispatch:
  19. pull_request:
  20. paths:
  21. # Combine sources
  22. - 'FirebaseCombineSwift/**'
  23. # Podspecs
  24. - 'FirebaseCombineSwift.podspec'
  25. # This workflow
  26. - '.github/workflows/combine.yml'
  27. # Rebuild on Ruby infrastructure changes.
  28. - 'Gemfile'
  29. # Dependencies (Disabled to avoid building Firestore in presubmits)
  30. # - 'FirebaseCore/**'
  31. # - 'FirebaseAuth/**'
  32. # - 'FirebaseFunctions/**'
  33. # - 'Firestore/**'
  34. # - 'FirebaseStorage/**'
  35. schedule:
  36. # Run every day at 11pm (PST) - cron uses UTC times
  37. - cron: '0 7 * * *'
  38. concurrency:
  39. group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  40. cancel-in-progress: true
  41. jobs:
  42. xcodebuild:
  43. # Don't run on private repo unless it is a PR.
  44. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || contains(fromJSON('["pull_request", "workflow_dispatch"]'), github.event_name)
  45. runs-on: macos-15
  46. strategy:
  47. matrix:
  48. target: [iOS]
  49. steps:
  50. - uses: actions/checkout@v4
  51. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  52. with:
  53. cache_key: ${{ matrix.os }}
  54. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  55. - name: Install xcpretty
  56. run: gem install xcpretty
  57. - name: Setup build
  58. run: scripts/install_prereqs.sh CombineSwift ${{ matrix.target }} xcodebuild
  59. - name: Build and test
  60. run: scripts/third_party/travis/retry.sh scripts/build.sh CombineSwift ${{ matrix.target }} xcodebuild
  61. storage-combine-integration:
  62. # Don't run on private repo unless it is a PR.
  63. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || contains(fromJSON('["pull_request", "workflow_dispatch"]'), github.event_name)
  64. env:
  65. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  66. runs-on: macos-15
  67. steps:
  68. - uses: actions/checkout@v4
  69. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  70. with:
  71. cache_key: ${{ matrix.os }}
  72. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  73. - name: Setup Bundler
  74. run: scripts/setup_bundler.sh
  75. - name: Install xcpretty
  76. run: gem install xcpretty
  77. - name: Install Secret GoogleService-Info.plist
  78. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/storage-db-plist.gpg \
  79. FirebaseStorage/Tests/Integration/Resources/GoogleService-Info.plist "$plist_secret"
  80. - name: Install Credentials.h
  81. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Storage/Credentials.h.gpg \
  82. FirebaseStorage/Tests/ObjCIntegration/Credentials.h "$plist_secret"
  83. - name: Install Credentials.swift
  84. run: |
  85. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Storage/Credentials.swift.gpg \
  86. FirebaseStorage/Tests/Integration/Credentials.swift "$plist_secret"
  87. - name: BuildAndTest # can be replaced with pod lib lint with CocoaPods 1.10
  88. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/build.sh StorageCombine all)