combine.yml 2.8 KB

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