combine.yml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. - 'FirebaseFunctionsTestingSupport.podspec'
  23. # This workflow
  24. - '.github/workflows/combine.yml'
  25. # Rebuild on Ruby infrastructure changes.
  26. - 'Gemfile'
  27. schedule:
  28. # Run every day at 11pm (PST) - cron uses UTC times
  29. - cron: '0 7 * * *'
  30. jobs:
  31. xcodebuild:
  32. # Don't run on private repo unless it is a PR.
  33. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  34. runs-on: macos-11
  35. strategy:
  36. matrix:
  37. target: [iOS]
  38. steps:
  39. - uses: actions/checkout@v2
  40. - name: Setup build
  41. run: scripts/install_prereqs.sh CombineSwift ${{ matrix.target }} xcodebuild
  42. - name: Build and test
  43. run: scripts/third_party/travis/retry.sh scripts/build.sh CombineSwift ${{ matrix.target }} xcodebuild
  44. storage-combine-integration:
  45. # Don't run on private repo unless it is a PR.
  46. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  47. env:
  48. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  49. runs-on: macos-11
  50. steps:
  51. - uses: actions/checkout@v2
  52. - name: Setup Bundler
  53. run: scripts/setup_bundler.sh
  54. - name: Install Secret GoogleService-Info.plist
  55. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/storage-db-plist.gpg \
  56. FirebaseStorage/Tests/Integration/Resources/GoogleService-Info.plist "$plist_secret"
  57. - name: Install Credentials.h
  58. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Storage/Credentials.h.gpg \
  59. FirebaseStorage/Tests/Integration/Credentials.h "$plist_secret"
  60. - name: Install Credentials.swift
  61. run: |
  62. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Storage/Credentials.swift.gpg \
  63. FirebaseStorage/Tests/SwiftIntegration/Credentials.swift "$plist_secret"
  64. cp FirebaseStorage/Tests/SwiftIntegration/Credentials.swift FirebaseStorageSwift/Tests/Integration/
  65. - name: BuildAndTest # can be replaced with pod lib lint with CocoaPods 1.10
  66. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/build.sh StorageCombine all)