flutter_onnxruntime downloads ORT natively at build time, and the Linux and Windows downloads from github.com/microsoft/onnxruntime are unavailable. scripts/onnx.sh off swaps in a pure-Dart stub via pubspec_overrides.yaml, so no platform pulls ORT; image messages then show as unavailable, as on web. Linux CI builds use this mode for now.
47 lines
1.2 KiB
YAML
47 lines
1.2 KiB
YAML
name: Flutter and Dart
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
analyze:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Flutter
|
|
uses: subosito/flutter-action@v2
|
|
with:
|
|
flutter-version-file: pubspec.yaml
|
|
|
|
- name: Check Flutter pins agree
|
|
run: |
|
|
pubspec=$(sed -n 's/^ flutter: *//p' pubspec.yaml)
|
|
appimage=$(jq -r '.flutter.version' scripts/appimage-tools.json)
|
|
if [ "$pubspec" != "$appimage" ]; then
|
|
echo "pubspec.yaml pins Flutter $pubspec but scripts/appimage-tools.json pins $appimage" >&2
|
|
exit 1
|
|
fi
|
|
|
|
- name: Install dependencies
|
|
run: flutter pub get
|
|
|
|
- name: Analyze code
|
|
run: flutter analyze --fatal-infos --fatal-warnings
|
|
|
|
- name: Verify formatting
|
|
run: dart format --output=none --set-exit-if-changed .
|
|
|
|
- name: Run tests
|
|
run: flutter test -r github
|
|
|
|
- name: Analyze and test without ONNX Runtime
|
|
run: |
|
|
scripts/onnx.sh off
|
|
flutter analyze --fatal-infos --fatal-warnings
|
|
flutter test -r github
|