Skip to content

Commit

Permalink
Refactoring archive testing to a single yml file. (#6510)
Browse files Browse the repository at this point in the history
* Refactoring archive testing to a single yml file.

This reduces the duplication in each of the workflow files. This also
will make archive testing with SwiftPM more straightforward.

* Prefixed with 'pod' name

* Commenting out to run archive testing on PR for now.

* Put array on single line

The yml won't be parsed unless the `pod` array is on a single line.

* Fix to run on PRs to the yml itself.

* Fix naming of AppDistro

* Remove schemes.
  • Loading branch information
ryanwilson authored Sep 24, 2020
1 parent f8b6e8f commit f6642ef
Show file tree
Hide file tree
Showing 16 changed files with 47 additions and 226 deletions.
15 changes: 0 additions & 15 deletions .github/workflows/abtesting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,18 +113,3 @@ jobs:
run: |
scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb \
FirebaseABTesting.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}
archive-cron:
# Don't run on private repo.
if: github.event_name == 'schedule' && github.repository != 'FirebasePrivate/firebase-ios-sdk'

runs-on: macOS-latest
strategy:
matrix:
target: [ios, tvos, macos]
steps:
- uses: actions/checkout@v2
- name: Setup Bundler
run: scripts/setup_bundler.sh
- name: Setup project and archive
run: scripts/test_archiving.sh FirebaseABTesting ${{ matrix.target }} ArchiveOutputs/${{ matrix.target }}.xcarchive
15 changes: 0 additions & 15 deletions .github/workflows/appdistribution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,3 @@ jobs:
run: |
scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseAppDistribution.podspec \
--platforms=${{ matrix.target }} ${{ matrix.flags }}
archive-cron:
# Don't run on private repo.
if: github.event_name == 'schedule' && github.repository != 'FirebasePrivate/firebase-ios-sdk'

runs-on: macOS-latest
strategy:
matrix:
target: [ios]
steps:
- uses: actions/checkout@v2
- name: Setup Bundler
run: scripts/setup_bundler.sh
- name: Setup project and archive
run: scripts/test_archiving.sh FirebaseAppDistribution ${{ matrix.target }} ArchiveOutputs/${{ matrix.target }}.xcarchive
47 changes: 47 additions & 0 deletions .github/workflows/archiving.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: archiving

on:
pull_request:
paths:
- '.github/workflows/archiving.yml'
schedule:
# Run every day at 2am (PST) - cron uses UTC times
# This is set to 3 hours after zip workflow finishes so zip testing can run after.
- cron: '0 10 * * *'

jobs:
# Archive tests for pods that support iOS only.
pods-ios-only-cron:
# Don't run on private repo.
if: github.repository != 'FirebasePrivate/firebase-ios-sdk'

runs-on: macOS-latest
strategy:
matrix:
# These need to be on a single line or else the formatting won't validate.
pod: ["FirebaseAppDistribution", "FirebaseDynamicLinks", "FirebaseInAppMessaging"]
steps:
- uses: actions/checkout@v2
- name: Setup Bundler
run: scripts/setup_bundler.sh
- name: Setup project and archive
run: scripts/test_archiving.sh ${{ matrix.pod }} ios ArchiveOutputs/ios.xcarchive


# Archive tests for pods that support iOS, tvOS, and macOS.
pods-ios-tvos-macos-cron:
# Don't run on private repo.
if: github.repository != 'FirebasePrivate/firebase-ios-sdk'

runs-on: macOS-latest
strategy:
matrix:
target: [ios, tvos, macos]
# These need to be on a single line or else the formatting won't validate.
pod: ["FirebaseABTesting", "FirebaseAuth", "FirebaseCore", "FirebaseCrashlytics", "FirebaseDatabase", "FirebaseFirestore", "FirebaseFunctions", "FirebaseMessaging", "FirebaseRemoteConfig", "FirebaseStorage", "GoogleDataTransport"]
steps:
- uses: actions/checkout@v2
- name: Setup Bundler
run: scripts/setup_bundler.sh
- name: Setup project and archive
run: scripts/test_archiving.sh ${{ matrix.pod }} ${{ matrix.target }} ArchiveOutputs/${{ matrix.target }}.xcarchive
15 changes: 0 additions & 15 deletions .github/workflows/auth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,18 +148,3 @@ jobs:
run: |
scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseAuth.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}
scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseAuth.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}
archive-cron:
# Don't run on private repo.
if: github.event_name == 'schedule' && github.repository != 'FirebasePrivate/firebase-ios-sdk'

runs-on: macOS-latest
strategy:
matrix:
target: [ios, tvos, macos]
steps:
- uses: actions/checkout@v2
- name: Setup Bundler
run: scripts/setup_bundler.sh
- name: Setup project and archive
run: scripts/test_archiving.sh FirebaseAuth ${{ matrix.target }} ArchiveOutputs/${{ matrix.target }}.xcarchive
15 changes: 0 additions & 15 deletions .github/workflows/core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,21 +69,6 @@ jobs:
- name: Setup project and Build Catalyst
run: scripts/test_catalyst.sh FirebaseCore build

archive-cron:
# Don't run on private repo.
if: github.event_name == 'schedule' && github.repository != 'FirebasePrivate/firebase-ios-sdk'

runs-on: macOS-latest
strategy:
matrix:
target: [ios, tvos, macos]
steps:
- uses: actions/checkout@v2
- name: Setup Bundler
run: scripts/setup_bundler.sh
- name: Setup project and archive
run: scripts/test_archiving.sh FirebaseCore ${{ matrix.target }} ArchiveOutputs/${{ matrix.target }}.xcarchive

core-cron-only:
# Don't run on private repo.
if: github.event_name == 'schedule' && github.repository != 'FirebasePrivate/firebase-ios-sdk'
Expand Down
15 changes: 0 additions & 15 deletions .github/workflows/crashlytics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,18 +122,3 @@ jobs:
run: |
scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCrashlytics.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}
scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCrashlytics.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}
archive-cron:
# Don't run on private repo.
if: github.event_name == 'schedule' && github.repository != 'FirebasePrivate/firebase-ios-sdk'

runs-on: macOS-latest
strategy:
matrix:
target: [ios, tvos, macos]
steps:
- uses: actions/checkout@v2
- name: Setup Bundler
run: scripts/setup_bundler.sh
- name: Setup project and archive
run: scripts/test_archiving.sh FirebaseCrashlytics ${{ matrix.target }} ArchiveOutputs/${{ matrix.target }}.xcarchive
15 changes: 0 additions & 15 deletions .github/workflows/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,18 +136,3 @@ jobs:
run: scripts/setup_bundler.sh
- name: PodLibLint database Cron
run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseDatabase.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}

archive-cron:
# Don't run on private repo.
if: github.event_name == 'schedule' && github.repository != 'FirebasePrivate/firebase-ios-sdk'

runs-on: macOS-latest
strategy:
matrix:
target: [ios, tvos, macos]
steps:
- uses: actions/checkout@v2
- name: Setup Bundler
run: scripts/setup_bundler.sh
- name: Setup project and archive
run: scripts/test_archiving.sh FirebaseDatabase ${{ matrix.target }} ArchiveOutputs/${{ matrix.target }}.xcarchive
15 changes: 0 additions & 15 deletions .github/workflows/datatransport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,18 +76,3 @@ jobs:
- name: PodLibLint DataTransport Cron
run: |
scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb GoogleDataTransport.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}
archive-cron:
# Don't run on private repo.
if: github.event_name == 'schedule' && github.repository != 'FirebasePrivate/firebase-ios-sdk'

runs-on: macOS-latest
strategy:
matrix:
target: [ios, tvos, macos]
steps:
- uses: actions/checkout@v2
- name: Setup Bundler
run: scripts/setup_bundler.sh
- name: Setup project and archive
run: scripts/test_archiving.sh GoogleDataTransport ${{ matrix.target }} ArchiveOutputs/${{ matrix.target }}.xcarchive
16 changes: 0 additions & 16 deletions .github/workflows/dynamiclinks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,19 +84,3 @@ jobs:
- name: Test swift quickstart
if: ${{ always() }}
run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh DynamicLinks swift)

archive-cron:
# Don't run on private repo.
if: github.event_name == 'schedule' && github.repository != 'FirebasePrivate/firebase-ios-sdk'

runs-on: macOS-latest
strategy:
matrix:
target: [ios]
steps:
- uses: actions/checkout@v2
- name: Setup Bundler
run: scripts/setup_bundler.sh
- name: Setup project and archive
run: scripts/test_archiving.sh FirebaseDynamicLinks ${{ matrix.target }} ArchiveOutputs/${{ matrix.target }}.xcarchive

15 changes: 0 additions & 15 deletions .github/workflows/firestore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -240,18 +240,3 @@ jobs:
- name: Test swift quickstart
run: ([ -z $plist_secret ] ||
scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Firestore)

archive-cron:
# Don't run on private repo.
if: github.event_name == 'schedule' && github.repository != 'FirebasePrivate/firebase-ios-sdk'

runs-on: macOS-latest
strategy:
matrix:
target: [ios, tvos, macos]
steps:
- uses: actions/checkout@v2
- name: Setup Bundler
run: scripts/setup_bundler.sh
- name: Setup project and archive
run: scripts/test_archiving.sh FirebaseFirestore ${{ matrix.target }} ArchiveOutputs/${{ matrix.target }}.xcarchive
15 changes: 0 additions & 15 deletions .github/workflows/functions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,3 @@ jobs:
- name: Test swift quickstart
run: ([ -z $plist_secret ] ||
scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Functions swift)

archive-cron:
# Don't run on private repo.
if: github.event_name == 'schedule' && github.repository != 'FirebasePrivate/firebase-ios-sdk'

runs-on: macOS-latest
strategy:
matrix:
target: [ios, tvos, macos]
steps:
- uses: actions/checkout@v2
- name: Setup Bundler
run: scripts/setup_bundler.sh
- name: Setup project and archive
run: scripts/test_archiving.sh FirebaseFunctions ${{ matrix.target }} ArchiveOutputs/${{ matrix.target }}.xcarchive
15 changes: 0 additions & 15 deletions .github/workflows/inappmessaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,3 @@ jobs:
- name: Test swift quickstart
run: ([ -z $plist_secret ] ||
scripts/third_party/travis/retry.sh scripts/test_quickstart.sh InAppMessaging swift)

archive-cron:
# Don't run on private repo.
if: github.event_name == 'schedule' && github.repository != 'FirebasePrivate/firebase-ios-sdk'

runs-on: macOS-latest
strategy:
matrix:
target: [ios]
steps:
- uses: actions/checkout@v2
- name: Setup Bundler
run: scripts/setup_bundler.sh
- name: Setup project and archive
run: scripts/test_archiving.sh FirebaseInAppMessaging ${{ matrix.target }} ArchiveOutputs/${{ matrix.target }}.xcarchive
15 changes: 0 additions & 15 deletions .github/workflows/instanceid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,18 +82,3 @@ jobs:
run: |
export FIR_IID_INTEGRATION_TESTS_REQUIRED=${{ steps.secrets.outputs.val }}
FIR_IID_INTEGRATION_TESTS_REQUIRED="$plist_secret" scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseInstanceID.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}
archive-cron:
# Don't run on private repo.
if: github.event_name == 'schedule' && github.repository != 'FirebasePrivate/firebase-ios-sdk'

runs-on: macOS-latest
strategy:
matrix:
target: [ios, tvos, macos]
steps:
- uses: actions/checkout@v2
- name: Setup Bundler
run: scripts/setup_bundler.sh
- name: Setup project and archive
run: scripts/test_archiving.sh FirebaseInstanceID ${{ matrix.target }} ArchiveOutputs/${{ matrix.target }}.xcarchive
15 changes: 0 additions & 15 deletions .github/workflows/messaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,18 +156,3 @@ jobs:
run: scripts/install_prereqs.sh MessagingSample iOS
- name: Build
run: ([ -z $plist_secret ] || scripts/build.sh MessagingSample iOS)

archive-cron:
# Don't run on private repo.
if: github.event_name == 'schedule' && github.repository != 'FirebasePrivate/firebase-ios-sdk'

runs-on: macOS-latest
strategy:
matrix:
target: [ios, tvos, macos]
steps:
- uses: actions/checkout@v2
- name: Setup Bundler
run: scripts/setup_bundler.sh
- name: Setup project and archive
run: scripts/test_archiving.sh FirebaseMessaging ${{ matrix.target }} ArchiveOutputs/${{ matrix.target }}.xcarchive
15 changes: 0 additions & 15 deletions .github/workflows/remoteconfig.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,18 +151,3 @@ jobs:
- name: PodLibLint RemoteConfig Cron
run: |
scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseRemoteConfig.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}
archive-cron:
# Don't run on private repo.
if: github.event_name == 'schedule' && github.repository != 'FirebasePrivate/firebase-ios-sdk'

runs-on: macOS-latest
strategy:
matrix:
target: [ios, tvos, macos]
steps:
- uses: actions/checkout@v2
- name: Setup Bundler
run: scripts/setup_bundler.sh
- name: Setup project and archive
run: scripts/test_archiving.sh FirebaseRemoteConfig ${{ matrix.target }} ArchiveOutputs/${{ matrix.target }}.xcarchive
15 changes: 0 additions & 15 deletions .github/workflows/storage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,18 +147,3 @@ jobs:
run: |
scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseStorage.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}
scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseStorage.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}
archive-cron:
# Don't run on private repo.
if: github.event_name == 'schedule' && github.repository != 'FirebasePrivate/firebase-ios-sdk'

runs-on: macOS-latest
strategy:
matrix:
target: [ios, tvos, macos]
steps:
- uses: actions/checkout@v2
- name: Setup Bundler
run: scripts/setup_bundler.sh
- name: Setup project and archive
run: scripts/test_archiving.sh FirebaseStorage ${{ matrix.target }} ArchiveOutputs/${{ matrix.target }}.xcarchive

0 comments on commit f6642ef

Please sign in to comment.