Files
firebase-ios-sdk/.github/workflows/mlmodeldownloader.yml
T
manjanac 5502a08b24 Add catalyst (#7192)
* Restores ML Pods after M77.

* Fix Package.swift

* Re-add catalyst to GHA workflow.

* Run catalyst tests and temporarily enable spm-cron to run now.

* Add scheme for catalyst test.

* Re-enable spm-cron to run on schedule.
2020-12-17 16:11:56 -08:00

91 lines
3.3 KiB
YAML

name: mlmodeldownloader
on:
pull_request:
paths:
- 'FirebaseMLModelDownloader**'
- '.github/workflows/mlmodeldownloader.yml'
- 'Gemfile'
schedule:
# Run every day at 11pm (PST) - cron uses UTC times
- cron: '0 7 * * *'
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 FirebaseMLModelDownloader/Tests/Integration/Resources
scripts/decrypt_gha_secret.sh scripts/gha-encrypted/MLModelDownloader/GoogleService-Info.plist.gpg \
FirebaseMLModelDownloader/Tests/Integration/Resources/GoogleService-Info.plist "$plist_secret"
- name: Build and test
run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMLModelDownloader.podspec --platforms=${{ matrix.target }}
spm:
# 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: Xcode 12
run: sudo xcode-select -s /Applications/Xcode_12.app/Contents/Developer
- name: Initialize xcodebuild
run: xcodebuild -list
- name: iOS Unit Tests
run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseMLModelDownloaderUnit iOS spm
spm-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: [tvOS, macOS, catalyst]
steps:
- uses: actions/checkout@v2
- name: Xcode 12
run: sudo xcode-select -s /Applications/Xcode_12.app/Contents/Developer
- name: Initialize xcodebuild
run: xcodebuild -list
- name: Unit Tests
run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseMLModelDownloaderUnit ${{ matrix.target }} spm
catalyst:
# 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 Bundler
run: scripts/setup_bundler.sh
- name: Setup project and Build Catalyst
run: scripts/test_catalyst.sh FirebaseMLModelDownloader test FirebaseMLModelDownloader-Unit-unit
mlmodeldownloader-cron-only:
# 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]
needs: pod-lib-lint
steps:
- uses: actions/checkout@v2
- name: Setup Bundler
run: scripts/setup_bundler.sh
- name: PodLibLint MLModelDownloader Cron
run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMLModelDownloader.podspec --platforms=${{ matrix.target }} --use-modular-headers