combine.yml 3.3 KB

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