diff --git a/.github/workflows/messaging.yml b/.github/workflows/messaging.yml index b7f9917829b..5efb8daf72c 100644 --- a/.github/workflows/messaging.yml +++ b/.github/workflows/messaging.yml @@ -123,73 +123,43 @@ jobs: platforms: '[ "ios", "tvos", "macos --skip-tests", "watchos --skip-tests" ]' flags: '[ "--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-15 - steps: - - uses: actions/checkout@v4 - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - name: Xcode - run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer - - name: Setup Bundler - run: scripts/setup_bundler.sh - - name: Install Secret GoogleService-Info.plist - run: | - scripts/decrypt_gha_secret.sh scripts/gha-encrypted/messaging-sample-plist.gpg \ - FirebaseMessaging/Apps/Shared/GoogleService-Info.plist "$plist_secret" - - name: Prereqs - run: scripts/install_prereqs.sh MessagingSample iOS - - name: Build - run: ([ -z $plist_secret ] || scripts/build.sh MessagingSample iOS) - - messaging-swiftui-sample-build-test: + 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-15 + strategy: + matrix: + include: + - target: MessagingSample + platform: iOS + - target: SwiftUISample + platform: iOS + - target: MessagingSampleStandaloneWatchApp + platform: watchOS steps: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - name: Setup Bundler run: scripts/setup_bundler.sh - - name: Install Secret GoogleService-Info.plist - run: | - scripts/decrypt_gha_secret.sh scripts/gha-encrypted/messaging-sample-plist.gpg \ - 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_16.4.app/Contents/Developer - - name: Build - run: ([ -z $plist_secret ] || scripts/build.sh SwiftUISample iOS) - - messaging-watchos-standalone-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-15 - steps: - - uses: actions/checkout@v4 - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - name: Setup Bundler - run: scripts/setup_bundler.sh - name: Install Secret GoogleService-Info.plist run: | scripts/decrypt_gha_secret.sh scripts/gha-encrypted/messaging-sample-plist.gpg \ 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_16.4.app/Contents/Developer - - name: Install watchOS simulators in case they are missing. - run: sudo xcodebuild -downloadPlatform watchOS + run: scripts/install_prereqs.sh ${{ matrix.target }} ${{ matrix.platform }} + - name: Install simulators in case they are missing. + uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 + with: + timeout_minutes: 15 + max_attempts: 5 + retry_wait_seconds: 120 + command: sudo xcodebuild -downloadPlatform ${{ matrix.platform }} - name: Build - run: ([ -z $plist_secret ] || scripts/build.sh MessagingSampleStandaloneWatchApp watchOS) + run: ([ -z $plist_secret ] || scripts/build.sh ${{ matrix.target }} ${{ matrix.platform }}) - name: Upload xcodebuild logs if: failure() uses: actions/upload-artifact@v4