1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: CI
on:
push:
branches:
pull_request:
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
check:
name: Static checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Installs the tools pinned in mise.toml (nextest, machete, typos, ...).
# Rust itself comes from rust-toolchain.toml via the runner's rustup.
- uses: jdx/mise-action@v2
# `mise run check` fans fmt-check/clippy/machete out in parallel. On a cold
# runner each cargo proxy lazily reconciles the pinned toolchain *and the
# components rust-toolchain.toml declares* (clippy, rustfmt) at the same
# time, racing on rustup's shared download dir and corrupting each other's
# downloads ("could not rename ... No such file or directory"). A bare
# `cargo --version` only materializes the base toolchain, leaving the
# clippy/rustfmt component downloads to still race — so install the
# toolchain *with* those components once, up front and serially.
- name: Install Rust toolchain + components (serial; avoids the rustup race)
run: rustup toolchain install --profile minimal --component clippy,rustfmt --no-self-update
- name: fmt + clippy + typos + machete
run: mise run check
test:
name: Test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
steps:
- uses: actions/checkout@v4
- uses: jdx/mise-action@v2
# aws-lc-rs (the rustls/quinn crypto provider) builds aws-lc-sys via
# CMake, which needs a discoverable MSVC toolchain to choose a generator
# plus NASM to assemble. Neither is set up by default on the runner.
- name: Set up MSVC environment (Windows)
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1
- name: Install NASM (Windows)
if: runner.os == 'Windows'
uses: ilammy/setup-nasm@v1
- name: nextest + doctests
run: mise run test
env:
RUST_BACKTRACE: "1"