Debian Codegraph @

debian/missing-sources/criterion/.github/workflows/ci.yaml

raw symbols SCIP
1 on:
2 push:
3 branches:
4 - master
5 pull_request:
6 branches:
7 - master
8 - version-0.4
9
10 name: tests
11 env:
12 CARGO_TERM_COLOR: always
13 MSRV: 1.80.0
14
15 jobs:
16 ci:
17 runs-on: ubuntu-latest
18 strategy:
19 fail-fast: false
20 matrix:
21 rust:
22 - 1.87.0 # Stable release as of 2025-05-17
23 - $MSRV # MSRV
24
25 steps:
26 - uses: actions/checkout@v4
27
28 - uses: dtolnay/rust-toolchain@master
29 name: Setup rust toolchain
30 with:
31 toolchain: ${{ matrix.rust }}
32 components: rustfmt, clippy
33
34 - uses: Swatinem/rust-cache@v2
35 name: Load dependencies from cache
36
37 - name: Build with stable features
38 run: cargo build --features stable
39
40 - name: Build with unstable features
41 if: ${{ matrix.rust == 'nightly' }}
42 run: cargo build --all-features
43
44 - name: Build with minimal features
45 run: cargo build --no-default-features
46
47 - name: Test with stable features
48 run: cargo test --features stable
49
50 - name: Test with minimal features
51 run: cargo test --no-default-features
52
53 - name: Check for non-standard formatting
54 if: ${{ matrix.rust == 'stable' }}
55 run: cargo fmt --all -- --check
56
57 - name: Check for clippy hints
58 if: ${{ matrix.rust == 'stable' }}
59 run: cargo clippy --workspace --all-targets -- -D warnings
60
61 # This fails on 1.64, but works on 1.66 and later.
62 # https://github.com/rust-lang/rust/issues/103306
63 - name: Test run targeting WASI
64 if: ${{ matrix.rust == 'stable' }}
65 run: |
66 curl https://wasmtime.dev/install.sh -sSf | bash
67 source ~/.bashrc
68 export PATH=$HOME/.wasmtime/bin/:$PATH
69 cargo install cargo-wasi
70 cargo wasi bench --no-default-features -- --test
71
72 nextest-compat:
73 name: Check compatibility with nextest
74 runs-on: ubuntu-latest
75 strategy:
76 matrix:
77 rust:
78 - stable
79
80 steps:
81 - uses: actions/checkout@v4
82
83 - uses: dtolnay/rust-toolchain@master
84 with:
85 toolchain: ${{ matrix.rust }}
86 components: rustfmt, clippy
87
88 - uses: Swatinem/rust-cache@v2
89
90 - uses: taiki-e/install-action@nextest
91
92 - run: ci/nextest-compat.sh
93
94 # If this fails, consider changing your text or adding something to .typos.toml
95 typos:
96 runs-on: ubuntu-latest
97 steps:
98 - uses: actions/checkout@v4
99
100 - name: check typos
101 uses: crate-ci/[email protected]
102
103
104 # Make sure the library builds with all dependencies downgraded to their
105 # oldest versions allowed by the semver spec. This ensures we have not
106 # under-specified any dependency
107 minimal-versions:
108 runs-on: ubuntu-latest
109 steps:
110 - uses: actions/checkout@v4
111
112 - name: Install needed Rust toolchain versions
113 run: |
114 rustup install $MSRV
115 rustup install nightly
116
117 - name: Downgrade dependencies to minimal versions
118 run: cargo +nightly update -Z minimal-versions
119
120 - name: Compile with minimal versions
121 run: cargo +$MSRV build --all-targets --locked