Allow building without ONNX Runtime

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.
This commit is contained in:
zjs81 committed 2026-11-20 16:38:09 -07:00
1 parent 34ea0cb7ca
commit d7fff0533e
12 files changed
+215 -13

No files matched your search

+8 -2
View File
@@ -12,6 +12,12 @@ on:
- 'v*'
pull_request:
env:
# ONNX Runtime for the Linux jobs. Its Linux downloads from
# github.com/microsoft/onnxruntime currently 404, so tagged Linux AppImages
# ship without image messages until this is set back to "on".
MESHCORE_LINUX_ONNX: "off"
jobs:
android:
runs-on: ubuntu-latest
@@ -71,7 +77,7 @@ jobs:
run: |
shellcheck scripts/build_appimage.sh scripts/appimage/*.sh scripts/appimage/AppRun
bash scripts/appimage/test_packaging.sh
- run: flutter pub get
- run: scripts/onnx.sh "$MESHCORE_LINUX_ONNX"
- run: flutter build linux --release --no-pub
- uses: docker/setup-buildx-action@v3
- name: Read AppImage base image
@@ -141,7 +147,7 @@ jobs:
run: |
shellcheck scripts/build_appimage.sh scripts/appimage/*.sh scripts/appimage/AppRun
bash scripts/appimage/test_packaging.sh
- run: flutter pub get
- run: scripts/onnx.sh "$MESHCORE_LINUX_ONNX"
- run: flutter test --reporter expanded
- name: Build ARM64 Linux release
run: |
+6
View File
@@ -38,3 +38,9 @@ jobs:
- 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