Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 15 additions & 29 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -529,12 +529,18 @@ jobs:
run: test "${{ needs.linux-test.result }}" = "success"

windows-test:
name: Test Windows
name: Windows Bazel check
needs: scope-gate
if: ${{ needs.scope-gate.outputs.run-os == 'true' }}
if: >-
${{ github.event_name == 'pull_request' ||
(needs.scope-gate.outputs.run-heavy == 'true' &&
(github.event_name != 'workflow_dispatch' ||
needs.scope-gate.outputs.run-os == 'true')) }}
runs-on: windows-latest
timeout-minutes: 330
steps:
# Linux builds do not enable cfg(windows). Compile every Bazel target on
# native Windows for every PR and push; full tests remain dispatch-only.
# Full history: the search-quality workload fixture pins a
# `source_repository_commit`, and `validate_source_bindings` resolves that
# object out of this checkout.
Expand All @@ -552,9 +558,13 @@ jobs:
with:
cache-key: ci-windows-test

# `bazel test` builds every target in the pattern, so tests start
# while the rest of the workspace still links.
- name: Build and test the workspace
- name: Build and type-check the Windows workspace
if: ${{ github.event_name != 'workflow_dispatch' }}
shell: bash
run: bazel build --config=ci //...

- name: Build and test the Windows workspace
if: ${{ github.event_name == 'workflow_dispatch' && needs.scope-gate.outputs.run-os == 'true' }}
shell: bash
run: bazel test --config=ci //...

Expand Down Expand Up @@ -604,30 +614,6 @@ jobs:
- name: Run blocking Clippy policy
run: bazel build --config=ci --config=clippy //...

# Master pushes run no Windows lane, so `cfg(windows)` code otherwise
# first compiles in the release build. Bazel has no MSVC toolchain on
# Linux, so this cross-target type check stays on Cargo: `cargo check`
# needs no linker, and mingw supplies the C compiler the native build
# scripts run. macOS has no equivalent: its build scripts need the Apple
# SDK headers.
- name: Install pinned toolchain and Windows check target
run: |
rustup toolchain install
rustup target add x86_64-pc-windows-gnu

- uses: ./.github/actions/setup-pnpm

- name: Install the Windows C cross-compiler
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends gcc-mingw-w64-x86-64

- name: Check the Windows target
run: >-
cargo check --workspace --all-targets --locked
--target x86_64-pc-windows-gnu
--features tracedecay/test-transport,tracedecay/test-helpers,tracedecay-cli/test-transport

- name: Save compiled Bazel actions
if: always() && !cancelled() && github.ref == 'refs/heads/master' && steps.bazel.outputs.disk-cache-key != ''
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
Expand Down