combine.yml 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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-12
  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. - uses: ruby/setup-ruby@v1
  53. - name: Install xcpretty
  54. run: gem install xcpretty
  55. - name: Setup build
  56. run: scripts/install_prereqs.sh CombineSwift ${{ matrix.target }} xcodebuild
  57. - name: Build and test
  58. run: scripts/third_party/travis/retry.sh scripts/build.sh CombineSwift ${{ matrix.target }} xcodebuild
  59. storage-combine-integration:
  60. # Don't run on private repo unless it is a PR.
  61. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  62. env:
  63. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  64. runs-on: macos-12
  65. steps:
  66. - uses: actions/checkout@v2
  67. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  68. with:
  69. cache_key: ${{ matrix.os }}
  70. - uses: ruby/setup-ruby@v1
  71. - name: Setup Bundler
  72. run: scripts/setup_bundler.sh
  73. - name: Install xcpretty
  74. run: gem install xcpretty
  75. - name: Install Secret GoogleService-Info.plist
  76. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/storage-db-plist.gpg \
  77. FirebaseStorageInternal/Tests/Integration/Resources/GoogleService-Info.plist "$plist_secret"
  78. - name: Install Credentials.h
  79. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Storage/Credentials.h.gpg \
  80. FirebaseStorageInternal/Tests/Integration/Credentials.h "$plist_secret"
  81. - name: Install Credentials.swift
  82. run: |
  83. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Storage/Credentials.swift.gpg \
  84. FirebaseStorage/Tests/Integration/Credentials.swift "$plist_secret"
  85. - name: BuildAndTest # can be replaced with pod lib lint with CocoaPods 1.10
  86. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/build.sh StorageCombine all)