Skip to content

Commit 165af79

Browse files
authored
Update Criterion, MSRV (#51)
1 parent 2bdf9b5 commit 165af79

File tree

20 files changed

+872
-118
lines changed

20 files changed

+872
-118
lines changed

.github/workflows/benches.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Benches
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- ".github/workflows/benches.yml"
7+
- "benches/**"
8+
9+
jobs:
10+
benches:
11+
runs-on: ubuntu-latest
12+
defaults:
13+
run:
14+
working-directory: ./benches
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: dtolnay/rust-toolchain@master
18+
with:
19+
toolchain: nightly
20+
components: clippy, rustfmt
21+
- name: Rustfmt
22+
run: cargo fmt -- --check
23+
- name: Clippy
24+
run: cargo clippy --all-targets -- -D warnings
25+
- name: Build
26+
run: RUSTFLAGS=-Dwarnings cargo build --all-targets

.github/workflows/test.yml

+18-44
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,9 @@ jobs:
1414
name: Check doc
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v2
17+
- uses: actions/checkout@v4
1818
- name: Install toolchain
19-
uses: actions-rs/toolchain@v1
20-
with:
21-
profile: minimal
22-
toolchain: nightly
23-
override: true
19+
uses: dtolnay/rust-toolchain@nightly
2420
- run: cargo install cargo-deadlinks
2521
- name: doc (rand)
2622
env:
@@ -48,6 +44,10 @@ jobs:
4844
target: x86_64-pc-windows-msvc
4945
toolchain: beta
5046
# Test both windows-gnu and windows-msvc; use beta rust on one
47+
- os: ubuntu-latest
48+
target: x86_64-unknown-linux-gnu
49+
variant: MSRV
50+
toolchain: 1.61.0
5151
- os: ubuntu-latest
5252
deps: sudo apt-get update ; sudo apt install gcc-multilib
5353
target: i686-unknown-linux-gnu
@@ -58,18 +58,20 @@ jobs:
5858
variant: minimal_versions
5959

6060
steps:
61-
- uses: actions/checkout@v2
61+
- uses: actions/checkout@v4
62+
- name: MSRV
63+
if: ${{ matrix.variant == 'MSRV' }}
64+
run: cp Cargo.lock.msrv Cargo.lock
6265
- name: Install toolchain
63-
uses: actions-rs/toolchain@v1
66+
uses: dtolnay/rust-toolchain@master
6467
with:
65-
profile: minimal
66-
target: ${{ matrix.target }}
68+
targets: ${{ matrix.target }}
6769
toolchain: ${{ matrix.toolchain }}
68-
override: true
6970
- run: ${{ matrix.deps }}
7071
- name: Maybe minimal versions
7172
if: ${{ matrix.variant == 'minimal_versions' }}
72-
run: cargo generate-lockfile -Z minimal-versions
73+
run: |
74+
cargo generate-lockfile -Z minimal-versions
7375
- name: Maybe nightly
7476
if: ${{ matrix.toolchain == 'nightly' }}
7577
run: |
@@ -82,32 +84,6 @@ jobs:
8284
cargo test --target ${{ matrix.target }} --manifest-path rand_xoshiro/Cargo.toml --all-features
8385
cargo test --target ${{ matrix.target }} --manifest-path rand_jitter/Cargo.toml --all-features
8486
85-
msrv:
86-
name: MSRV for rand_isaac / rand_xorshift / rand_xoshiro
87-
runs-on: ubuntu-latest
88-
steps:
89-
- uses: actions/checkout@v4
90-
- uses: dtolnay/rust-toolchain@1.56.0 # older versions may work (untested)
91-
- run: cd rand_isaac && cargo test --all-features
92-
- run: cd rand_xorshift && cargo test --all-features
93-
- run: cd rand_xoshiro && cargo test --all-features
94-
95-
msrv_hc:
96-
name: MSRV for rand_hc
97-
runs-on: ubuntu-latest
98-
steps:
99-
- uses: actions/checkout@v4
100-
- uses: dtolnay/rust-toolchain@1.36.0
101-
- run: cd rand_hc && cargo test --all-features
102-
103-
msrv_jitter:
104-
name: MSRV for rand_jitter
105-
runs-on: ubuntu-latest
106-
steps:
107-
- uses: actions/checkout@v4
108-
- uses: dtolnay/rust-toolchain@1.51.0
109-
- run: cd rand_jitter && cargo test --features std
110-
11187
test-cross:
11288
runs-on: ubuntu-latest
11389
strategy:
@@ -117,14 +93,12 @@ jobs:
11793
toolchain: [stable]
11894

11995
steps:
120-
- uses: actions/checkout@v2
96+
- uses: actions/checkout@v4
12197
- name: Install toolchain
122-
uses: actions-rs/toolchain@v1
98+
uses: dtolnay/rust-toolchain@master
12399
with:
124-
profile: minimal
125-
target: ${{ matrix.target }}
100+
targets: ${{ matrix.target }}
126101
toolchain: ${{ matrix.toolchain }}
127-
override: true
128102
- name: Cache cargo plugins
129103
uses: actions/cache@v1
130104
with:
@@ -143,7 +117,7 @@ jobs:
143117
test-miri:
144118
runs-on: ubuntu-latest
145119
steps:
146-
- uses: actions/checkout@v2
120+
- uses: actions/checkout@v4
147121
- name: Install toolchain
148122
run: |
149123
MIRI_NIGHTLY=nightly-$(curl -s https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/miri)

0 commit comments

Comments
 (0)