feat: add 2-pass release build for Dynamic Dispatch table #638
Workflow file for this run
This file contains hidden or 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: shorebird_ci | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - shorebird/dev | |
| jobs: | |
| # NOTE: Windows is not included because shorebird_tests depends on | |
| # flutter_flavorizr which requires Xcode. Additionally, flutter_tools | |
| # tests on Windows would need additional setup work. | |
| flutter-tools-tests: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| runs-on: ${{ matrix.os }} | |
| name: 🛠️ Flutter Tools Tests (${{ matrix.os }}) | |
| steps: | |
| - name: 📚 Git Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: 🎯 Setup Dart | |
| uses: dart-lang/setup-dart@v1 | |
| - name: 🐦 Run Flutter Tools Tests | |
| run: ../../bin/flutter test test/general.shard | |
| working-directory: packages/flutter_tools | |
| shard-runner-tests: | |
| runs-on: ubuntu-latest | |
| name: 🧩 Shard Runner Tests | |
| defaults: | |
| run: | |
| working-directory: shorebird/ci/shard_runner | |
| steps: | |
| - name: 📚 Git Checkout | |
| uses: actions/checkout@v4 | |
| - name: 🎯 Setup Dart | |
| uses: dart-lang/setup-dart@v1 | |
| - name: 📦 Install Dependencies | |
| run: dart pub get | |
| - name: 🔍 Check Formatting | |
| run: dart format --output=none --set-exit-if-changed . | |
| - name: 🔎 Analyze | |
| run: dart analyze --fatal-infos | |
| - name: 🧪 Run Tests | |
| run: dart test | |
| shorebird-android-tests: | |
| # Android tests run on Ubuntu (faster runners, no macOS needed) | |
| runs-on: ubuntu-latest | |
| name: 🤖 Shorebird Android Tests | |
| steps: | |
| - name: 📚 Git Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: 🎯 Setup Dart | |
| uses: dart-lang/setup-dart@v1 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: "zulu" | |
| java-version: "17" | |
| - name: 📦 Cache Gradle | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.gradle/caches | |
| ~/.gradle/wrapper | |
| key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
| restore-keys: | | |
| ${{ runner.os }}-gradle- | |
| - name: 🤖 Run Android Tests | |
| run: dart test test/base_test.dart test/android_test.dart | |
| working-directory: packages/shorebird_tests | |
| shorebird-ios-tests: | |
| # iOS tests require macOS for Xcode | |
| runs-on: macos-latest | |
| name: 🍎 Shorebird iOS + Android Smoke Tests | |
| steps: | |
| - name: 📚 Git Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: 🎯 Setup Dart | |
| uses: dart-lang/setup-dart@v1 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: "zulu" | |
| java-version: "17" | |
| - name: 📦 Cache Gradle | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.gradle/caches | |
| ~/.gradle/wrapper | |
| key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
| restore-keys: | | |
| ${{ runner.os }}-gradle- | |
| - name: 🍎 Run iOS Tests | |
| run: dart test test/base_test.dart test/ios_test.dart | |
| working-directory: packages/shorebird_tests | |
| - name: 🤖 Run Android Smoke Test (macOS) | |
| # Quick sanity check that Android builds work on macOS too | |
| run: dart test test/android_test.dart --name "can build an apk" | |
| working-directory: packages/shorebird_tests | |
| env: | |
| # Enables streaming subprocess output for debugging timeouts. | |
| VERBOSE: "1" | |
| # Aggregator required by branch protection on shorebird/dev so the rule can | |
| # list a single context ("ci") instead of every matrix-expanded job above. | |
| ci: | |
| if: always() | |
| needs: | |
| - flutter-tools-tests | |
| - shard-runner-tests | |
| - shorebird-android-tests | |
| - shorebird-ios-tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }} | |
| run: | | |
| echo "One or more upstream jobs failed or were cancelled." | |
| exit 1 |