-
Notifications
You must be signed in to change notification settings - Fork 1.3k
ci(windows): add Windows MSVC CI jobs #2738
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
pimlock
wants to merge
33
commits into
main
Choose a base branch
from
fix/windows-msvc-cache/pimlock
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+502
−257
Open
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
d556aaa
fix(ci): preserve Windows Rust build cache
pimlock fd50689
fix(ci): invalidate empty Windows caches
pimlock b857fdd
perf(ci): cache Windows builds with sccache
pimlock a6be636
ci(windows): restore target directory caching
pimlock c2554cb
perf(ci): use prebuilt Z3 on Windows
pimlock 6c7b08d
perf(ci): layer sccache on Windows target cache
pimlock 727745a
ci(windows): split PR checks from main validation
pimlock 76d4f00
ci(windows): separate checks builds and cache seeding
pimlock 901db06
fix(ci): simplify Windows build dependency
pimlock 35dff96
fix(ci): rely on Windows job dependency status
pimlock 8e3a099
fix(ci): use valid opt-in Windows ARM runner
pimlock 57d67d0
ci(windows): keep ARM64 validation local
pimlock 84a6991
fix(ci): install Clippy for Windows validation
pimlock d479bf2
ci(windows): focus platform lint coverage
pimlock 03bc040
docs(licenses): explain bzip2 allowance
pimlock 4f826d3
ci(windows): simplify workflow name
pimlock 7627759
fix(windows): allow async platform stub
pimlock 1e3d897
fix(network): make file fingerprints portable
pimlock dc6a471
ci(windows): lint supported deliverables
pimlock e982628
ci(windows): allow platform-gated lint
pimlock 0ec78d9
chore(ci): align Windows cache action with main
pimlock c80a5ad
fix(ci): align Windows validation with prerequisites
pimlock 5dd3496
ci(windows): pin Rust toolchain action
pimlock 822f291
fix(ci): use enterprise-approved Windows actions
pimlock 5ece42d
fix(windows): restore strict MSVC validation
pimlock 917db6d
ci(windows): run Rust tests with nextest
pimlock 2b96238
fix(ci): normalize nextest lock provenance
pimlock 8af1d52
ci(windows): add native arm64 validation
pimlock ff0ca66
fix(ci): lock nextest for Windows ARM64
pimlock 66c70a6
Merge remote-tracking branch 'origin/main' into HEAD
pimlock 012430a
fix(windows): resolve duplicate MXC authentication method
pimlock 3184f0f
test(conformance): use native absolute paths on Windows
pimlock 47a3aab
docs(windows): address MSVC review feedback
pimlock File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,50 +1,199 @@ | ||
| name: Windows MSVC (build-only) | ||
| name: Windows MSVC | ||
|
|
||
| on: | ||
| merge_group: | ||
| types: [checks_requested] | ||
| push: | ||
| branches: | ||
| - main | ||
| - "pull-request/[0-9]+" | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| env: | ||
| CARGO_INCREMENTAL: "0" | ||
|
|
||
| jobs: | ||
| x64: | ||
| runs-on: windows-2025 | ||
| pr_metadata: | ||
| name: Resolve PR metadata | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| pull-requests: read | ||
| outputs: | ||
| should_run: ${{ github.ref == 'refs/heads/main' || steps.gate.outputs.should_run == 'true' }} | ||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| - uses: jdx/mise-action@c2a87611a18de5b3828c5652fe268e992400cb5c # v4.3.0 | ||
|
|
||
| - id: gate | ||
| if: github.ref != 'refs/heads/main' | ||
| uses: ./.github/actions/pr-gate | ||
|
|
||
| pr-check: | ||
| name: PR lint and test (${{ matrix.arch }}) | ||
| needs: pr_metadata | ||
| if: >- | ||
| needs.pr_metadata.outputs.should_run == 'true' && | ||
| github.ref != 'refs/heads/main' && | ||
| github.event_name != 'workflow_dispatch' | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - arch: x64 | ||
| runner: windows-2025 | ||
| rust_target: x86_64-pc-windows-msvc | ||
| - arch: arm64 | ||
| runner: windows-11-arm | ||
| rust_target: aarch64-pc-windows-msvc | ||
| runs-on: ${{ matrix.runner }} | ||
| env: | ||
| READ_ONLY_GITHUB_TOKEN: ${{ github.token }} | ||
| SCCACHE_GHA_ENABLED: "true" | ||
| SCCACHE_GHA_VERSION: windows-msvc-${{ matrix.arch }}-prebuilt-z3-v2 | ||
| SCCACHE_CLIENT_SIDE: "1" | ||
| SCCACHE_BASEDIRS: ${{ github.workspace }} | ||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| - uses: jdx/mise-action@e6a8b3978addb5a52f2b4cd9d91eafa7f0ab959d # v4.2.0 | ||
| with: | ||
| install: false | ||
| experimental: true | ||
| - name: Configure GHA sccache backend | ||
| uses: mozilla-actions/sccache-action@9e7fa8a12102821edf02ca5dbea1acd0f89a2696 # v0.0.10 | ||
| - uses: dtolnay/rust-toolchain@4be7066ada62dd38de10e7b70166bc74ed198c30 # stable | ||
| with: | ||
| toolchain: "1.95.0" | ||
| targets: ${{ matrix.rust_target }} | ||
| components: clippy | ||
| - name: Install cargo-nextest | ||
| run: mise install --locked github:nextest-rs/nextest | ||
| - name: Cache Rust target and registry | ||
| uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2 | ||
| env: | ||
| # Keep rust-cache's cargo metadata calls independent of the compiler | ||
| # wrapper; build steps still inherit sccache from the job. | ||
| RUSTC_WRAPPER: "" | ||
| with: | ||
| # Keep the prebuilt-Z3 experiment isolated from earlier target caches. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm a bit confused about the mix of v1 and v2. Can you clarify the intentions there? |
||
| shared-key: windows-msvc-${{ matrix.arch }}-prebuilt-z3-v1 | ||
| cache-targets: "true" | ||
| cache-on-failure: "true" | ||
| cache-bin: "false" | ||
| - name: Lint Windows-supported crates | ||
| run: mise run --skip-tools windows:lint:${{ matrix.arch }} | ||
| - name: Test | ||
| run: mise run --skip-tools windows:test:${{ matrix.arch }} | ||
| - name: sccache stats | ||
| if: always() | ||
| run: sccache --show-stats | ||
|
|
||
| cache-seed: | ||
| name: Seed cache (${{ matrix.arch }}) | ||
| needs: pr_metadata | ||
| if: >- | ||
| needs.pr_metadata.outputs.should_run == 'true' && | ||
| (github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch') | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - arch: x64 | ||
| runner: windows-2025 | ||
| rust_target: x86_64-pc-windows-msvc | ||
| - arch: arm64 | ||
| runner: windows-11-arm | ||
| rust_target: aarch64-pc-windows-msvc | ||
| runs-on: ${{ matrix.runner }} | ||
| env: | ||
| READ_ONLY_GITHUB_TOKEN: ${{ github.token }} | ||
| SCCACHE_GHA_ENABLED: "true" | ||
| SCCACHE_GHA_VERSION: windows-msvc-${{ matrix.arch }}-prebuilt-z3-v2 | ||
| SCCACHE_CLIENT_SIDE: "1" | ||
| SCCACHE_BASEDIRS: ${{ github.workspace }} | ||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| - uses: jdx/mise-action@e6a8b3978addb5a52f2b4cd9d91eafa7f0ab959d # v4.2.0 | ||
| with: | ||
| install: false | ||
| experimental: true | ||
| - uses: dtolnay/rust-toolchain@master | ||
| - name: Configure GHA sccache backend | ||
| uses: mozilla-actions/sccache-action@9e7fa8a12102821edf02ca5dbea1acd0f89a2696 # v0.0.10 | ||
| - uses: dtolnay/rust-toolchain@4be7066ada62dd38de10e7b70166bc74ed198c30 # stable | ||
| with: | ||
| toolchain: "1.95.0" | ||
| targets: x86_64-pc-windows-msvc | ||
| targets: ${{ matrix.rust_target }} | ||
| components: clippy | ||
| - name: Install cargo-nextest | ||
| run: mise install --locked github:nextest-rs/nextest | ||
| - name: Cache Rust target and registry | ||
| uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2 | ||
| env: | ||
| RUSTC_WRAPPER: "" | ||
| with: | ||
| shared-key: windows-msvc-x64 | ||
| shared-key: windows-msvc-${{ matrix.arch }}-prebuilt-z3-v1 | ||
| cache-targets: "true" | ||
| cache-on-failure: "true" | ||
| cache-bin: "false" | ||
| - run: mise run --skip-tools windows:check:x64 | ||
| - run: mise run --skip-tools windows:build:x64 | ||
| - run: mise run --skip-tools windows:test:x64 | ||
| - run: mise run --skip-tools windows:test:unsupported:x64 | ||
| arm64: | ||
| # TODO: provision a windows-arm64 self-hosted runner | ||
| runs-on: [self-hosted, windows-arm64] | ||
| if: false # flip to true once the runner is online | ||
| - name: Lint Windows-supported crates | ||
| # Keep the seed workload identical to the pull-request workload so its | ||
| # target and compiler caches are reusable by subsequent pull requests. | ||
| run: mise run --skip-tools windows:lint:${{ matrix.arch }} | ||
| - name: Test | ||
| run: mise run --skip-tools windows:test:${{ matrix.arch }} | ||
| - name: sccache stats | ||
| if: always() | ||
| run: sccache --show-stats | ||
|
|
||
| build: | ||
| name: Build binaries (${{ matrix.arch }}) | ||
| needs: cache-seed | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - arch: x64 | ||
| runner: windows-2025 | ||
| rust_target: x86_64-pc-windows-msvc | ||
| - arch: arm64 | ||
| runner: windows-11-arm | ||
| rust_target: aarch64-pc-windows-msvc | ||
| runs-on: ${{ matrix.runner }} | ||
| env: | ||
| READ_ONLY_GITHUB_TOKEN: ${{ github.token }} | ||
| SCCACHE_GHA_ENABLED: "true" | ||
| SCCACHE_GHA_VERSION: windows-msvc-${{ matrix.arch }}-prebuilt-z3-v2 | ||
| SCCACHE_CLIENT_SIDE: "1" | ||
| SCCACHE_BASEDIRS: ${{ github.workspace }} | ||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| - uses: jdx/mise-action@c2a87611a18de5b3828c5652fe268e992400cb5c # v4.3.0 | ||
| - uses: jdx/mise-action@e6a8b3978addb5a52f2b4cd9d91eafa7f0ab959d # v4.2.0 | ||
| with: | ||
| install: false | ||
| experimental: true | ||
| - uses: dtolnay/rust-toolchain@master | ||
| - name: Configure GHA sccache backend | ||
| uses: mozilla-actions/sccache-action@9e7fa8a12102821edf02ca5dbea1acd0f89a2696 # v0.0.10 | ||
| - uses: dtolnay/rust-toolchain@4be7066ada62dd38de10e7b70166bc74ed198c30 # stable | ||
| with: | ||
| toolchain: "1.95.0" | ||
| targets: aarch64-pc-windows-msvc | ||
| targets: ${{ matrix.rust_target }} | ||
| - name: Cache Rust target and registry | ||
| uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2 | ||
| env: | ||
| RUSTC_WRAPPER: "" | ||
| with: | ||
| shared-key: windows-msvc-arm64 | ||
| shared-key: windows-msvc-${{ matrix.arch }}-prebuilt-z3-v1 | ||
| cache-targets: "true" | ||
| cache-on-failure: "true" | ||
| cache-bin: "false" | ||
| - run: mise run --skip-tools windows:check:arm64 | ||
| - run: mise run --skip-tools windows:build:arm64 | ||
| - name: Build release binaries | ||
| run: mise run --skip-tools windows:build:${{ matrix.arch }} | ||
| - name: sccache stats | ||
| if: always() | ||
| run: sccache --show-stats | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: link to https://github.com/prove-rs/z3.rs/blob/3d9064797f210d5f59c1587bf29b3b4c783edfd1/z3-sys/README.md#L68 for documentation of that feature