From c16fe955b907494e178b2c810be9da0a5c591dfb Mon Sep 17 00:00:00 2001 From: patrick Date: Sat, 30 May 2026 10:08:44 +0200 Subject: [PATCH] ci: align Windows CRT with ort-sys and mark CUDA non-blocking esaxx-rs hardcodes .static_crt(true) which forces /MT, while ort-sys prebuilt links against /MD. The mismatch surfaces as LNK2038 during the debug link step on Windows. Force /MD via CFLAGS/CXXFLAGS so cc crate's last flag wins and the CRT matches ort-sys. Also mirror release.yml's continue-on-error on CUDA matrix entries so the persistent nvidia-dkms install failure on GH-hosted runners doesn't mask the green state of the other jobs. Co-Authored-By: Claude Opus 4.7 --- .github/workflows/ci.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3271afe..00aeafd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,6 +14,10 @@ jobs: test: name: ${{ matrix.name }} runs-on: ${{ matrix.os }} + # CUDA matrix entries are best-effort: GH-hosted runners' kernel mismatch + # currently breaks nvidia-dkms (Jimver/cuda-toolkit action). Mirror the + # non-blocking behavior already applied in release.yml. + continue-on-error: ${{ matrix.cuda == true }} strategy: fail-fast: false matrix: @@ -58,6 +62,16 @@ jobs: cuda: '12.6.3' method: network + # esaxx-rs forces /MT via .static_crt(true) but ort-sys prebuilt links + # against /MD. Force /MD on Windows so cc's last flag wins and the + # CRT matches ort-sys. Without this, link fails with LNK2038. + - name: Set Windows MSVC runtime flags + if: runner.os == 'Windows' + shell: pwsh + run: | + echo "CFLAGS=/MD" >> $env:GITHUB_ENV + echo "CXXFLAGS=/MD" >> $env:GITHUB_ENV + - name: Cache cargo uses: actions/cache@v4 with: