diff --git a/.github/workflows/messaging.yml b/.github/workflows/messaging.yml index 5b4f5524f8a..5326f0da219 100644 --- a/.github/workflows/messaging.yml +++ b/.github/workflows/messaging.yml @@ -23,11 +23,13 @@ concurrency: jobs: - messaging: + messaging-integration-tests: # Don't run on private repo unless it is a PR. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' env: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + # TODO: Investigate why PubSub integration tests fail with Xcode 15.0.1 on macos-13 +# runs-on: macos-13 runs-on: macos-12 steps: - uses: actions/checkout@v3 @@ -46,51 +48,51 @@ jobs: mkdir FirebaseMessaging/Tests/IntegrationTests/Resources scripts/decrypt_gha_secret.sh scripts/gha-encrypted/messaging-sample-plist.gpg \ FirebaseMessaging/Tests/IntegrationTests/Resources/GoogleService-Info.plist "$plist_secret" - - name: BuildAndTest # can be replaced with pod lib lint with CocoaPods 1.10 +# - name: Xcode +# run: sudo xcode-select -s /Applications/xcode_15.0.1.app/Contents/Developer + - name: BuildAndTest run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/build.sh Messaging all) - pod-lib-lint: # Don't run on private repo unless it is a PR. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' - runs-on: macos-12 - strategy: matrix: podspec: [FirebaseMessagingInterop.podspec, FirebaseMessaging.podspec] target: [ios, tvos, macos --skip-tests, watchos --skip-tests] # skipping tests on mac because of keychain access + os: [macos-12, macos-13] + include: + - os: macos-12 + xcode: Xcode_14.2 + - os: macos-13 + xcode: Xcode_15.0.1 + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 - uses: ruby/setup-ruby@v1 - name: Setup Bundler run: scripts/setup_bundler.sh + - name: Xcode + run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer - name: Build and test - run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.podspec }} --platforms=${{ matrix.target }} + run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.podspec }} --test-specs=unit --platforms=${{ matrix.target }} spm: # Don't run on private repo unless it is a PR. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' - runs-on: macos-12 - strategy: - matrix: - target: [iOS, watchOS] - steps: - - uses: actions/checkout@v3 - - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 - with: - cache_key: ${{ matrix.os }} - - name: Initialize xcodebuild - run: scripts/setup_spm_tests.sh - - name: Unit Tests - run: scripts/third_party/travis/retry.sh ./scripts/build.sh MessagingUnit ${{ matrix.target }} spm - - spm-cron: - # Don't run on private repo. - if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' - runs-on: macos-12 strategy: matrix: - target: [tvOS, macOS, catalyst] + target: [iOS, watchOS, tvOS, macOS, catalyst, visionOS] + os: [macos-12, macos-13] + include: + - os: macos-12 + xcode: Xcode_14.2 + - os: macos-13 + xcode: Xcode_15.0.1 + exclude: + - os: macos-12 + target: visionOS + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 @@ -98,6 +100,8 @@ jobs: cache_key: ${{ matrix.os }} - name: Initialize xcodebuild run: scripts/setup_spm_tests.sh + - name: Xcode + run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer - name: Unit Tests run: scripts/third_party/travis/retry.sh ./scripts/build.sh MessagingUnit ${{ matrix.target }} spm @@ -122,7 +126,14 @@ jobs: env: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - runs-on: macos-12 + strategy: + matrix: + include: + - os: macos-12 + xcode: Xcode_14.2 + - os: macos-13 + xcode: Xcode_15.0.1 + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 - uses: ruby/setup-ruby@v1 @@ -131,6 +142,8 @@ jobs: - name: Install Secret GoogleService-Info.plist run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-messaging.plist.gpg \ quickstart-ios/messaging/GoogleService-Info.plist "$plist_secret" + - name: Xcode + run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer - name: Test objc quickstart run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Messaging false) @@ -169,28 +182,32 @@ jobs: messaging-cron-only: # Don't run on private repo. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' - runs-on: macos-12 strategy: matrix: target: [ios, tvos, macos --skip-tests, watchos --skip-tests] - flags: [ - '--use-modular-headers' - ] - needs: pod-lib-lint + os: [macos-12, macos-13] + include: + - os: macos-12 + xcode: Xcode_14.2 + - os: macos-13 + xcode: Xcode_15.0.1 + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 - uses: ruby/setup-ruby@v1 - name: Setup Bundler run: scripts/setup_bundler.sh + - name: Xcode + run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer - name: PodLibLint Messaging Cron - run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMessaging.podspec --platforms=${{ matrix.target }} + run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMessaging.podspec --test-specs=unit --platforms=${{ matrix.target }} --use-static-frameworks messaging-sample-build-test: # Don't run on private repo unless it is a PR. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' env: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - runs-on: macos-12 + runs-on: macos-13 steps: - uses: actions/checkout@v3 - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 @@ -205,6 +222,8 @@ jobs: FirebaseMessaging/Apps/Shared/GoogleService-Info.plist "$plist_secret" - name: Prereqs run: scripts/install_prereqs.sh MessagingSample iOS + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_15.0.1.app/Contents/Developer - name: Build run: ([ -z $plist_secret ] || scripts/build.sh MessagingSample iOS) @@ -213,7 +232,7 @@ jobs: if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' env: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - runs-on: macos-12 + runs-on: macos-13 steps: - uses: actions/checkout@v3 - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 @@ -228,6 +247,8 @@ jobs: FirebaseMessaging/Apps/Shared/GoogleService-Info.plist "$plist_secret" - name: Prereqs run: scripts/install_prereqs.sh SwiftUISample iOS + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_15.0.1.app/Contents/Developer - name: Build run: ([ -z $plist_secret ] || scripts/build.sh SwiftUISample iOS) @@ -236,7 +257,7 @@ jobs: if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' env: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - runs-on: macos-12 + runs-on: macos-13 steps: - uses: actions/checkout@v3 - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 @@ -251,6 +272,8 @@ jobs: FirebaseMessaging/Apps/Shared/GoogleService-Info.plist "$plist_secret" - name: Prereqs run: scripts/install_prereqs.sh MessagingSampleStandaloneWatchApp watchOS + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_15.0.1.app/Contents/Developer - name: Build run: ([ -z $plist_secret ] || scripts/build.sh MessagingSampleStandaloneWatchApp watchOS) diff --git a/.github/workflows/storage.yml b/.github/workflows/storage.yml index 940cb5a4816..a0113f2bc8e 100644 --- a/.github/workflows/storage.yml +++ b/.github/workflows/storage.yml @@ -17,17 +17,17 @@ concurrency: cancel-in-progress: true jobs: - storage: + storage-integration-tests: # Don't run on private repo unless it is a PR. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' strategy: matrix: include: - # Only one os to avoid contention in the integration tests. - # - os: macos-12 - # xcode: Xcode_14.2 - - os: macos-13 - xcode: xcode_15.0.1 + # TODO: investigate integration test extreme flakiness on Xcode 15 + - os: macos-12 + xcode: Xcode_14.2 + # - os: macos-13 + # xcode: Xcode_15.0.1 env: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} runs-on: ${{ matrix.os }} @@ -65,7 +65,7 @@ jobs: - os: macos-12 xcode: Xcode_14.2 - os: macos-13 - xcode: xcode_15.0.1 + xcode: Xcode_15.0.1 runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 @@ -81,7 +81,7 @@ jobs: spm-cron: # Don't run on private repo. -# if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' + if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' strategy: matrix: target: [tvOS, macOS, catalyst, watchOS] @@ -90,7 +90,7 @@ jobs: - os: macos-12 xcode: Xcode_14.2 - os: macos-13 - xcode: xcode_15.0.1 + xcode: Xcode_15.0.1 runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 @@ -115,7 +115,7 @@ jobs: - os: macos-12 xcode: Xcode_14.2 - os: macos-13 - xcode: xcode_15.0.1 + xcode: Xcode_15.0.1 env: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} @@ -174,7 +174,7 @@ jobs: - os: macos-12 xcode: Xcode_14.2 - os: macos-13 - xcode: xcode_15.0.1 + xcode: Xcode_15.0.1 runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 @@ -191,16 +191,19 @@ jobs: storage-cron-only: # Don't run on private repo. -# if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' + if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' strategy: matrix: - target: [ios, tvos, macos, watchos] + target: [ios, tvos, macos, watchos, visionOS] os: [macos-12, macos-13] include: - os: macos-12 xcode: Xcode_14.2 - os: macos-13 xcode: xcode_15.0.1 + exclude: + - os: macos-12 + target: visionOS runs-on: ${{ matrix.os }} needs: pod-lib-lint steps: diff --git a/scripts/build.sh b/scripts/build.sh index 6b70e0bdde5..d33d1633ae8 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -377,14 +377,6 @@ case "$product-$platform-$method" in AppHost-FirebaseMessaging-Unit-Tests \ ../../../FirebaseMessaging/Tests/IntegrationTests/Resources/GoogleService-Info.plist - RunXcodebuild \ - -workspace 'gen/FirebaseMessaging/FirebaseMessaging.xcworkspace' \ - -scheme "FirebaseMessaging-Unit-unit" \ - "${ios_flags[@]}" \ - "${xcb_flags[@]}" \ - build \ - test - if check_secrets; then # Integration tests are only run on iOS to minimize flake failures. RunXcodebuild \ @@ -394,24 +386,6 @@ case "$product-$platform-$method" in "${xcb_flags[@]}" \ test fi - - pod_gen FirebaseMessaging.podspec --platforms=macos --clean - RunXcodebuild \ - -workspace 'gen/FirebaseMessaging/FirebaseMessaging.xcworkspace' \ - -scheme "FirebaseMessaging-Unit-unit" \ - "${macos_flags[@]}" \ - "${xcb_flags[@]}" \ - build \ - test - - pod_gen FirebaseMessaging.podspec --platforms=tvos --clean - RunXcodebuild \ - -workspace 'gen/FirebaseMessaging/FirebaseMessaging.xcworkspace' \ - -scheme "FirebaseMessaging-Unit-unit" \ - "${tvos_flags[@]}" \ - "${xcb_flags[@]}" \ - build \ - test ;; MessagingSample-*-*)