Skip to content

Commit e3f7e8e

Browse files
committed
github: Build the Windows CI job with the MSVC toolchain
The Windows job's `cargo build -p libsql --all-features` was being built with the `x86_64-pc-windows-gnu` toolchain (MinGW/GCC), set as the default host triple by `hecrj/setup-rust-action@v2`. MSVC was never exercised. So breaks that only fail under MSVC -- like the SQLite 3.47.0 `#warning` that errors with C1021 -- compiled green here. We discovered the gap when libsql-js (which builds with `--target x86_64-pc-windows-msvc`) failed downstream on the same code. Add `--target x86_64-pc-windows-msvc --release` so the Windows job actually compiles the bundled SQLite encryption amalgamation (sqlite3mc) with MSVC, and breaks surface in CI. `cargo clean -p libsql-ffi` runs first so sqlite3mc is rebuilt from source rather than restored from a cached target/.
1 parent b9336da commit e3f7e8e

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

.github/workflows/rust.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -242,11 +242,14 @@ jobs:
242242
~/.cargo/registry/index/
243243
~/.cargo/registry/cache/
244244
~/.cargo/git/db/
245-
target/
246-
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
247-
restore-keys: ${{ runner.os }}-cargo-
245+
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
246+
restore-keys: ${{ runner.os }}-cargo-registry-
247+
- name: Install x86_64-pc-windows-msvc target
248+
run: rustup target add x86_64-pc-windows-msvc
248249
- name: build libsql all features
249-
run: cargo build -p libsql --all-features
250+
run: |
251+
cargo clean -p libsql-ffi
252+
cargo build -p libsql --all-features --release --target x86_64-pc-windows-msvc
250253
251254
# test-rust-wasm:
252255
# runs-on: ubuntu-latest

0 commit comments

Comments
 (0)