From 324d3f91e39eb3fd664a0e701f4887bd4b7ddbbc Mon Sep 17 00:00:00 2001 From: Urgau Date: Wed, 17 Jul 2024 12:50:32 +0200 Subject: [PATCH 1/3] Fix intra-doc link for FxSeededState --- src/seeded_state.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/seeded_state.rs b/src/seeded_state.rs index 2c8215f..96b2a43 100644 --- a/src/seeded_state.rs +++ b/src/seeded_state.rs @@ -8,7 +8,7 @@ pub type FxHashMapSeed = std::collections::HashMap; #[cfg(feature = "std")] pub type FxHashSetSeed = std::collections::HashSet; -/// [`FxSetState`] is an alternative state for `HashMap` types, allowing to use [`FxHasher`] with a set seed. +/// [`FxSeededState`] is an alternative state for `HashMap` types, allowing to use [`FxHasher`] with a set seed. /// /// ``` /// # use std::collections::HashMap; From 965fb319c04c710d8794a7e6938e765815fd72c7 Mon Sep 17 00:00:00 2001 From: Urgau Date: Wed, 17 Jul 2024 12:52:46 +0200 Subject: [PATCH 2/3] Improve CI with proper test jobs + fmt/doc/clippy Mainly imported from rustc-stable-hash CI[^1]. [^1]: https://github.com/rust-lang/rustc-stable-hash/blob/cc85b7a5940308df8329d3812bc27dc0a2fd3a50/.github/workflows/rust.yml --- .github/workflows/rust.yml | 74 ++++++++++++++++++++++++++++++++------ 1 file changed, 64 insertions(+), 10 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 44c86a0..cae8e1c 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -1,19 +1,73 @@ name: Rust +permissions: + contents: read + on: [push, pull_request] +env: + CARGO_TERM_COLOR: always + RUST_BACKTRACE: 1 + RUSTUP_MAX_RETRIES: 10 + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: true + jobs: - build: + test: + strategy: + matrix: + os: [ubuntu, windows, macos] runs-on: ${{ matrix.os }}-latest + timeout-minutes: 30 steps: - - uses: actions/checkout@v4 - - uses: rust-lang/simpleinfra/github-actions/simple-ci@master - - name: "32-bit cross testing" - run: | - rustup toolchain install nightly - rustup override set nightly - rustup component add miri - cargo +nightly miri test --target i686-unknown-linux-gnu + - uses: actions/checkout@v4 + - run: rustup default stable + - run: cargo check + - run: cargo test + - run: rustup default nightly + - run: cargo test --all-features + cross-test: strategy: matrix: - os: [ubuntu, windows, macos] + target: [ + "x86_64-unknown-linux-gnu", # 64-bits, little-endian + "i686-unknown-linux-gnu", # 32-bits, little-endian + "mips-unknown-linux-gnu", # 32-bits, big-endian + "mips64-unknown-linux-gnuabi64", # 64-bits, big-endian + ] + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - uses: actions/checkout@v4 + - name: install miri + run: rustup toolchain add nightly --no-self-update --component miri && rustup default nightly + - run: | + cargo miri test --target=${{ matrix.target }} --all-features + env: + MIRIFLAGS: -Zmiri-strict-provenance + RUSTDOCFLAGS: ${{ env.RUSTDOCFLAGS }} -Z randomize-layout + RUSTFLAGS: ${{ env.RUSTFLAGS }} -Z randomize-layout + fmt: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: rustup update stable && rustup default stable + - run: rustup component add rustfmt + - run: cargo fmt --all --check + docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: rustup update stable && rustup default stable + - run: cargo doc --workspace --document-private-items --no-deps + env: + RUSTDOCFLAGS: -D warnings + clippy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: rustup update stable && rustup default stable + - run: rustup component add clippy + - run: cargo clippy --workspace --all-targets --no-deps From f4bab5909d6dfbcff5569a05afdf83cc6b0ed34d Mon Sep 17 00:00:00 2001 From: Urgau <3616612+Urgau@users.noreply.github.com> Date: Thu, 18 Jul 2024 11:51:43 +0200 Subject: [PATCH 3/3] Be consistent around the installation of the different toolchains --- .github/workflows/rust.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index cae8e1c..0a019cb 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -23,10 +23,10 @@ jobs: timeout-minutes: 30 steps: - uses: actions/checkout@v4 - - run: rustup default stable + - run: rustup update stable && rustup default stable - run: cargo check - run: cargo test - - run: rustup default nightly + - run: rustup update nightly && rustup default nightly - run: cargo test --all-features cross-test: strategy: