From 9909e2de8eeceec5e41932aea3325c4d996ff91a Mon Sep 17 00:00:00 2001 From: OBress Date: Sun, 10 May 2026 15:37:06 -0400 Subject: [PATCH] CI: pre-create DLL stubs before cargo check tauri-build validates bundle.resources globally at compile time on every platform, and cargo check runs the build script. release.yml already pre-creates empty .dll stubs for this (commit de0b287); CI was never updated to match, so cargo check started failing on Linux with `resource path bundle-resources/sherpa-onnx-c-api.dll doesn't exist` as soon as a PR touched anything build-related. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/ci.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9073915..34e43d8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,6 +65,22 @@ jobs: working-directory: src-tauri run: cargo fmt -- --check + # tauri-build's `generate_context!()` macro validates every + # `bundle.resources` source path at COMPILE TIME on every + # platform (the resources field is global, not per-OS), and + # cargo check runs the build script. The real DLLs are only + # produced by sherpa-onnx-sys's build script on Windows + # release builds — on Linux CI they never exist. Pre-create + # empty stubs so the validation passes; they're never loaded + # at runtime. Mirrors the same step in release.yml. + - name: Pre-create DLL stubs for tauri-build validation + run: | + mkdir -p src-tauri/bundle-resources + touch src-tauri/bundle-resources/sherpa-onnx-c-api.dll + touch src-tauri/bundle-resources/sherpa-onnx-cxx-api.dll + touch src-tauri/bundle-resources/onnxruntime.dll + touch src-tauri/bundle-resources/onnxruntime_providers_shared.dll + - name: cargo check working-directory: src-tauri run: cargo check --all-targets