combine.yml 3.0 KB

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