name: installations on: pull_request: paths: - 'FirebaseInstallations**' - '.github/workflows/installations.yml' - 'Gemfile' schedule: # Run every day at 3am (PST) - cron uses UTC times # This is set to 3 hours after zip workflow finishes so zip testing can run after. - cron: '0 11 * * *' jobs: pod-lib-lint: # Don't run on private repo unless it is a PR. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request' runs-on: macOS-latest env: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} strategy: matrix: target: [ios, tvos, macos] steps: - uses: actions/checkout@v2 - name: Setup Bundler run: scripts/setup_bundler.sh - name: Install GoogleService-Info.plist run: | mkdir -p FirebaseInstallations/Source/Tests/Resources scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Installations/GoogleService-Info.plist.gpg \ FirebaseInstallations/Source/Tests/Resources/GoogleService-Info.plist "$plist_secret" - name: Get boolean for secrets available id: secrets run: echo "::set-output name=val::$([[ -z $plist_secret ]] && echo "0" || echo "1")" - name: Build and test run: | export FIS_INTEGRATION_TESTS_REQUIRED=${{ steps.secrets.outputs.val }} export FIS_ALLOWS_INCOMPATIBLE_IID_VERSION="1" scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseInstallations.podspec \ --platforms=${{ matrix.target }} --ignore-local-podspecs=FirebaseInstanceID.podspec # TODO - Catalyst is disabled because `pod gen` does not have a way to get some dependent pods # from a local path and the Installations podspec requires that FirebaseInstanceID.podspec not be # the local version. # # catalyst: # runs-on: macOS-latest # steps: # - uses: actions/checkout@v2 # - name: Setup Bundler # run: scripts/setup_bundler.sh # - name: Setup project and Build for Catalyst # # Only build the unit tests on Catalyst. Test stopped working when GHA moved to Xcode 11.4.1. # run: scripts/test_catalyst.sh FirebaseInstallations build FirebaseInstallations-Unit-unit quickstart_framework: # Don't run on private repo if: github.event_name == 'schedule' && github.repository != 'FirebasePrivate/firebase-ios-sdk' env: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} FRAMEWORK_ZIP: "Firebase-actions-dir.zip" SDK: "Installations" runs-on: macOS-latest steps: - uses: actions/checkout@v2 - name: Pull zip from GCS run: scripts/pull_zip_gcloud.sh "$plist_secret" "$FRAMEWORK_ZIP" "${HOME}/ios_frameworks" - name: Setup quickstart run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/PromisesObjC.xcframework \ "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FirebaseInstallations.xcframework \ "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FirebaseCore.xcframework \ "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/GoogleUtilities.xcframework - name: Copy mock plist run: cp quickstart-ios/mock-GoogleService-Info.plist quickstart-ios/"${SDK}"/GoogleService-Info.plist - name: Test Quickstart run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") - name: Remove data before upload if: ${{ failure() }} run: scripts/remove_data.sh "${SDK}" - uses: actions/upload-artifact@v2 if: ${{ failure() }} with: name: quickstart_artifacts path: quickstart-ios/ quickstart: # Don't run on private repo unless it is a PR. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request' runs-on: macOS-latest steps: - uses: actions/checkout@v2 - name: Setup quickstart run: scripts/setup_quickstart.sh installations - name: Copy mock plist run: cp quickstart-ios/mock-GoogleService-Info.plist quickstart-ios/installations/GoogleService-Info.plist - name: Test objc quickstart run: scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Installations - name: Test swift quickstart run: scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Installations swift installations-cron-only: if: github.event_name == 'schedule' && github.repository != 'FirebasePrivate/firebase-ios-sdk' runs-on: macos-latest env: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} FIR_IID_INTEGRATION_TESTS_REQUIRED: ${{ secrets.GHASecretsGPGPassphrase1 }} strategy: matrix: target: [ios, tvos, macos] flags: [ '--use-modular-headers', '--use-libraries' ] needs: pod-lib-lint steps: - uses: actions/checkout@v2 - name: Setup Bundler run: scripts/setup_bundler.sh - name: Install GoogleService-Info.plist run: | mkdir -p FirebaseInstallations/Source/Tests/Resources scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Installations/GoogleService-Info.plist.gpg \ FirebaseInstallations/Source/Tests/Resources/GoogleService-Info.plist "$plist_secret" - name: Get boolean for secrets available id: secrets run: echo "::set-output name=val::$([[ -z $plist_secret ]] && echo "0" || echo "1")" - name: PodLibLint Installations Cron run: | export FIS_INTEGRATION_TESTS_REQUIRED=${{ steps.secrets.outputs.val }} export FIS_ALLOWS_INCOMPATIBLE_IID_VERSION="1" scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseInstallations.podspec \ --platforms=${{ matrix.target }} ${{ matrix.flags }} \ --ignore-local-podspecs=FirebaseInstanceID.podspec