@@ -414,6 +414,17 @@ jobs:
414414 ${{ github.repository == 'vortex-data/vortex'
415415 && format('runs-on={0}/region=us-east-1/pool=windows-x64-pre/extras=s3-cache', github.run_id)
416416 || 'windows-latest' }}
417+ env :
418+ NEXTEST_WINDOWS_ARGS : >-
419+ --cargo-profile ci --locked --workspace --all-features
420+ --exclude vortex-bench
421+ --exclude vortex-python
422+ --exclude vortex-fuzz --exclude vortex-cuda --exclude vortex-cuda-ffi
423+ --exclude vortex-nvcomp --exclude vortex-cub --exclude vortex-test-e2e-cuda --exclude vortex-python-cuda
424+ --exclude duckdb-bench
425+ --exclude lance-bench --exclude datafusion-bench --exclude random-access-bench
426+ --exclude compress-bench --exclude xtask --exclude vortex-datafusion
427+ --exclude gpu-scan-cli
417428 steps :
418429 - parallel :
419430 - uses : runs-on/action@v2
@@ -424,37 +435,66 @@ jobs:
424435 - name : Setup (Windows)
425436 run : |
426437 echo "C:\rust\cargo\bin" >> $env:GITHUB_PATH
438+ $cargoHome = if ($env:CARGO_HOME) { $env:CARGO_HOME } else { Join-Path $env:USERPROFILE ".cargo" }
439+ echo "CARGO_HOME=$cargoHome" >> $env:GITHUB_ENV
427440 - parallel :
428441 - uses : ./.github/actions/setup-prebuild
429442 with :
430443 enable-sccache : " true"
431444 - uses : actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7
432445 with :
433446 python-version : " 3.11"
434-
435- - name : Rust Tests (Windows)
436- id : tests
437- env :
447+ - name : Restore Cargo registry
448+ id : cargo-registry
449+ uses : actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
450+ with :
451+ path : |
452+ ${{ env.CARGO_HOME }}/registry/index
453+ ${{ env.CARGO_HOME }}/registry/cache
454+ ${{ env.CARGO_HOME }}/git/db
455+ ${{ env.CARGO_HOME }}/git/checkouts
456+ key : cargo-registry-v1-windows-x64-${{ hashFiles('Cargo.lock') }}
457+ restore-keys : cargo-registry-v1-windows-x64-
458+
459+ - name : Assemblers emit reproducible code
460+ run : |
461+ $vswhere = Join-Path ${env:ProgramFiles(x86)} "Microsoft Visual Studio\Installer\vswhere.exe"
462+ $ml64 = & $vswhere -latest -products * -find "VC\Tools\MSVC\**\bin\Hostx64\x64\ml64.exe" |
463+ Sort-Object -Descending | Select-Object -First 1
464+ if (-not $ml64) { throw "ml64.exe not found" }
465+ echo "VORTEX_ML64=$ml64" >> $env:GITHUB_ENV
466+ echo "CC_MASM_ASM_x86_64_pc_windows_msvc=$env:pythonLocation\python.exe $env:GITHUB_WORKSPACE\scripts\ml64_reproducible.py" >> $env:GITHUB_ENV
467+ echo "NASMENV=--reproducible" >> $env:GITHUB_ENV
468+
469+ - name : Build Rust Tests (Windows)
470+ id : build-tests
471+ env : &windows-test-env
438472 # Stable proc-macro DLL contents let dependent crates reuse sccache entries.
439473 # duckdb_static.lib is built with /MT and thus requires crt-static
440474 RUSTFLAGS : " -C link-arg=/Brepro -C target-feature=+crt-static"
441- # link.exe spends ~1.5 min on the test binaries after compilation finishes.
442- CARGO_TARGET_X86_64_PC_WINDOWS_MSVC_LINKER : rust-lld
443- run : |
444- cargo nextest run --cargo-profile ci --locked --workspace --all-features --no-fail-fast `
445- --exclude vortex-bench `
446- --exclude vortex-python `
447- --exclude vortex-fuzz --exclude vortex-cuda --exclude vortex-cuda-ffi `
448- --exclude vortex-nvcomp --exclude vortex-cub --exclude vortex-test-e2e-cuda --exclude vortex-python-cuda `
449- --exclude duckdb-bench `
450- --exclude lance-bench --exclude datafusion-bench --exclude random-access-bench `
451- --exclude compress-bench --exclude xtask --exclude vortex-datafusion `
452- --exclude gpu-scan-cli
475+ run : cargo nextest run --no-run @($env:NEXTEST_WINDOWS_ARGS -split ' ')
476+
477+ - name : Run Rust Tests (Windows)
478+ id : tests
479+ if : ${{ !cancelled() && steps.build-tests.outcome == 'success' }}
480+ env : *windows-test-env
481+ run : cargo nextest run --no-fail-fast @($env:NEXTEST_WINDOWS_ARGS -split ' ')
482+
483+ - name : Save Cargo registry
484+ if : ${{ !cancelled() && steps.cargo-registry.outputs.cache-hit != 'true' && (steps.build-tests.outcome == 'success' || steps.build-tests.outcome == 'failure') }}
485+ uses : actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
486+ with :
487+ path : |
488+ ${{ env.CARGO_HOME }}/registry/index
489+ ${{ env.CARGO_HOME }}/registry/cache
490+ ${{ env.CARGO_HOME }}/git/db
491+ ${{ env.CARGO_HOME }}/git/checkouts
492+ key : ${{ steps.cargo-registry.outputs.cache-primary-key }}
453493
454494 # The test outputs fill the default disk, and the wheel build cannot reuse
455495 # them: it uses other RUSTFLAGS and its own target directory.
456496 - name : Delete the Rust test outputs
457- if : ${{ !cancelled() && (steps.tests.outcome == 'success' || steps.tests.outcome == 'failure') }}
497+ if : ${{ !cancelled() && (steps.build- tests.outcome == 'success' || steps.build- tests.outcome == 'failure') }}
458498 shell : cmd
459499 run : if exist target\ci rmdir /s /q target\ci
460500
@@ -463,7 +503,7 @@ jobs:
463503 - name : Build wheel
464504 id : wheel
465505 # Build the wheel also when a Rust test fails, but not when the setup failed.
466- if : ${{ !cancelled() && (steps.tests.outcome == 'success' || steps.tests.outcome == 'failure') }}
506+ if : ${{ !cancelled() && (steps.build- tests.outcome == 'success' || steps.build- tests.outcome == 'failure') }}
467507 uses : PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1
468508 with :
469509 command : build
0 commit comments