combine.yml 3.7 KB

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