Build and Unit Test CI #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: google-utilities | |
on: | |
pull_request: | |
schedule: | |
# Run every day at 11pm (PST) - cron uses UTC times | |
- cron: '0 7 * * *' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
changed_today: | |
runs-on: ubuntu-latest | |
name: Check if the repo was updated today | |
outputs: | |
WAS_CHANGED: ${{ steps.check_changed.outputs.WAS_CHANGED }} | |
steps: | |
- uses: actions/checkout@v4 | |
- id: check_changed | |
name: Check | |
if: ${{ github.event_name == 'schedule' }} | |
run: echo '::set-output name=WAS_CHANGED::'$(test -n "$(git log --format=%H --since='24 hours ago')" && echo 'true' || echo 'false') | |
spm: | |
needs: changed_today | |
if: ${{ github.event_name == 'pull_request' || needs.changed_today.outputs.WAS_CHANGED == 'true' }} | |
runs-on: macOS-latest | |
strategy: | |
matrix: | |
target: [iOS, tvOS, macOS, catalyst, visionOS] | |
xcode: [Xcode_15.2, Xcode_15.4, Xcode_16_beta_6] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Scripts Directory | |
- name: Xcode | |
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer | |
run: ./setup-scripts.sh | |
- name: Initialize xcodebuild | |
run: xcodebuild -list | |
- name: iOS Unit Tests | |
run: scripts/third_party/travis/retry.sh scripts/build.sh FirebaseDataConnect ${{ matrix.target }} spm |