Skip to content

Commit e1b3727

Browse files
authored
Merge pull request #48 from Urgau/improve-ci
Improve CI with proper test jobs + fmt/doc/clippy
2 parents fe9dca3 + f4bab59 commit e1b3727

File tree

2 files changed

+65
-11
lines changed

2 files changed

+65
-11
lines changed

.github/workflows/rust.yml

Lines changed: 64 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,73 @@
11
name: Rust
22

3+
permissions:
4+
contents: read
5+
36
on: [push, pull_request]
47

8+
env:
9+
CARGO_TERM_COLOR: always
10+
RUST_BACKTRACE: 1
11+
RUSTUP_MAX_RETRIES: 10
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
15+
cancel-in-progress: true
16+
517
jobs:
6-
build:
18+
test:
19+
strategy:
20+
matrix:
21+
os: [ubuntu, windows, macos]
722
runs-on: ${{ matrix.os }}-latest
23+
timeout-minutes: 30
824
steps:
9-
- uses: actions/checkout@v4
10-
- uses: rust-lang/simpleinfra/github-actions/simple-ci@master
11-
- name: "32-bit cross testing"
12-
run: |
13-
rustup toolchain install nightly
14-
rustup override set nightly
15-
rustup component add miri
16-
cargo +nightly miri test --target i686-unknown-linux-gnu
25+
- uses: actions/checkout@v4
26+
- run: rustup update stable && rustup default stable
27+
- run: cargo check
28+
- run: cargo test
29+
- run: rustup update nightly && rustup default nightly
30+
- run: cargo test --all-features
31+
cross-test:
1732
strategy:
1833
matrix:
19-
os: [ubuntu, windows, macos]
34+
target: [
35+
"x86_64-unknown-linux-gnu", # 64-bits, little-endian
36+
"i686-unknown-linux-gnu", # 32-bits, little-endian
37+
"mips-unknown-linux-gnu", # 32-bits, big-endian
38+
"mips64-unknown-linux-gnuabi64", # 64-bits, big-endian
39+
]
40+
runs-on: ubuntu-latest
41+
timeout-minutes: 30
42+
steps:
43+
- uses: actions/checkout@v4
44+
- name: install miri
45+
run: rustup toolchain add nightly --no-self-update --component miri && rustup default nightly
46+
- run: |
47+
cargo miri test --target=${{ matrix.target }} --all-features
48+
env:
49+
MIRIFLAGS: -Zmiri-strict-provenance
50+
RUSTDOCFLAGS: ${{ env.RUSTDOCFLAGS }} -Z randomize-layout
51+
RUSTFLAGS: ${{ env.RUSTFLAGS }} -Z randomize-layout
52+
fmt:
53+
runs-on: ubuntu-latest
54+
steps:
55+
- uses: actions/checkout@v4
56+
- run: rustup update stable && rustup default stable
57+
- run: rustup component add rustfmt
58+
- run: cargo fmt --all --check
59+
docs:
60+
runs-on: ubuntu-latest
61+
steps:
62+
- uses: actions/checkout@v4
63+
- run: rustup update stable && rustup default stable
64+
- run: cargo doc --workspace --document-private-items --no-deps
65+
env:
66+
RUSTDOCFLAGS: -D warnings
67+
clippy:
68+
runs-on: ubuntu-latest
69+
steps:
70+
- uses: actions/checkout@v4
71+
- run: rustup update stable && rustup default stable
72+
- run: rustup component add clippy
73+
- run: cargo clippy --workspace --all-targets --no-deps

src/seeded_state.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ pub type FxHashMapSeed<K, V> = std::collections::HashMap<K, V, FxSeededState>;
88
#[cfg(feature = "std")]
99
pub type FxHashSetSeed<V> = std::collections::HashSet<V, FxSeededState>;
1010

11-
/// [`FxSetState`] is an alternative state for `HashMap` types, allowing to use [`FxHasher`] with a set seed.
11+
/// [`FxSeededState`] is an alternative state for `HashMap` types, allowing to use [`FxHasher`] with a set seed.
1212
///
1313
/// ```
1414
/// # use std::collections::HashMap;

0 commit comments

Comments
 (0)