|
| 1 | +name: installations |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - master |
| 7 | + pull_request: |
| 8 | + paths: |
| 9 | + - 'FirebaseInstallations**' |
| 10 | + - '.github/workflows/installations.yml' |
| 11 | + - 'Gemfile' |
| 12 | + schedule: |
| 13 | + # Run every day at 11pm (PST) - cron uses UTC times |
| 14 | + - cron: '0 7 * * *' |
| 15 | + |
| 16 | +jobs: |
| 17 | + pod-lib-lint: |
| 18 | + runs-on: macOS-latest |
| 19 | + env: |
| 20 | + plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} |
| 21 | + strategy: |
| 22 | + matrix: |
| 23 | + target: [ios, tvos, macos] |
| 24 | + steps: |
| 25 | + - uses: actions/checkout@v2 |
| 26 | + - name: Setup Bundler |
| 27 | + run: scripts/setup_bundler.sh |
| 28 | + - name: Install GoogleService-Info.plist |
| 29 | + run: | |
| 30 | + mkdir -p FirebaseInstallations/Source/Tests/Resources |
| 31 | + scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Installations/GoogleService-Info.plist.gpg \ |
| 32 | + FirebaseInstallations/Source/Tests/Resources/GoogleService-Info.plist "$plist_secret" |
| 33 | + - name: Get boolean for secrets available |
| 34 | + id: secrets |
| 35 | + run: echo "::set-output name=val::$([[ -z $plist_secret ]] && echo "0" || echo "1")" |
| 36 | + - name: Build and test |
| 37 | + run: | |
| 38 | + export FIS_INTEGRATION_TESTS_REQUIRED=${{ steps.secrets.outputs.val }} |
| 39 | + export FIS_ALLOWS_INCOMPATIBLE_IID_VERSION="1" |
| 40 | + scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseInstallations.podspec \ |
| 41 | + --platforms=${{ matrix.target }} --ignore-local-podspecs=FirebaseInstanceID.podspec |
| 42 | +
|
| 43 | + # TODO - Catalyst is disabled because `pod gen` does not have a way to get some dependent pods |
| 44 | + # from a local path and the Installations podspec requires that FirebaseInstanceID.podspec not be |
| 45 | + # the local version. |
| 46 | + # |
| 47 | + # catalyst: |
| 48 | + # runs-on: macOS-latest |
| 49 | + # steps: |
| 50 | + # - uses: actions/checkout@v2 |
| 51 | + # - name: Setup Bundler |
| 52 | + # run: scripts/setup_bundler.sh |
| 53 | + # - name: Setup project and Build for Catalyst |
| 54 | + # # Only build the unit tests on Catalyst. Test stopped working when GHA moved to Xcode 11.4.1. |
| 55 | + # run: scripts/test_catalyst.sh FirebaseInstallations build FirebaseInstallations-Unit-unit |
| 56 | + |
| 57 | + quickstart: |
| 58 | + runs-on: macOS-latest |
| 59 | + steps: |
| 60 | + - uses: actions/checkout@v2 |
| 61 | + - name: Setup quickstart |
| 62 | + run: scripts/setup_quickstart.sh installations |
| 63 | + - name: Copy mock plist |
| 64 | + run: cp quickstart-ios/mock-GoogleService-Info.plist quickstart-ios/installations/GoogleService-Info.plist |
| 65 | + - name: Test objc quickstart |
| 66 | + run: scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Installations |
| 67 | + - name: Test swift quickstart |
| 68 | + run: scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Installations swift |
| 69 | + |
| 70 | + installations-cron-only: |
| 71 | + runs-on: macos-latest |
| 72 | + if: github.event_name == 'schedule' |
| 73 | + env: |
| 74 | + plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} |
| 75 | + FIR_IID_INTEGRATION_TESTS_REQUIRED: ${{ secrets.GHASecretsGPGPassphrase1 }} |
| 76 | + strategy: |
| 77 | + matrix: |
| 78 | + target: [ios, tvos, macos] |
| 79 | + flags: [ |
| 80 | + '--use-modular-headers', |
| 81 | + '--use-libraries' |
| 82 | + ] |
| 83 | + needs: pod-lib-lint |
| 84 | + steps: |
| 85 | + - uses: actions/checkout@v2 |
| 86 | + - name: Setup Bundler |
| 87 | + run: scripts/setup_bundler.sh |
| 88 | + - name: Install GoogleService-Info.plist |
| 89 | + run: | |
| 90 | + mkdir -p FirebaseInstallations/Source/Tests/Resources |
| 91 | + scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Installations/GoogleService-Info.plist.gpg \ |
| 92 | + FirebaseInstallations/Source/Tests/Resources/GoogleService-Info.plist "$plist_secret" |
| 93 | + - name: Get boolean for secrets available |
| 94 | + id: secrets |
| 95 | + run: echo "::set-output name=val::$([[ -z $plist_secret ]] && echo "0" || echo "1")" |
| 96 | + - name: PodLibLint Installations Cron |
| 97 | + run: | |
| 98 | + export FIS_INTEGRATION_TESTS_REQUIRED=${{ steps.secrets.outputs.val }} |
| 99 | + export FIS_ALLOWS_INCOMPATIBLE_IID_VERSION="1" |
| 100 | + FIR_IID_INTEGRATION_TESTS_REQUIRED="$plist_secret" scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb \ |
| 101 | + FirebaseInstallations.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }} \ |
| 102 | + --ignore-local-podspecs=FirebaseInstanceID.podspec |
0 commit comments