Skip to content

ci(shorebird): use framework.zip as macos-framework src (xcframework,… #642

ci(shorebird): use framework.zip as macos-framework src (xcframework,…

ci(shorebird): use framework.zip as macos-framework src (xcframework,… #642

Workflow file for this run

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
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
- 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