Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Criterion, MSRV #51

Merged
merged 18 commits into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/benches.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Benches

on:
pull_request:
paths:
- ".github/workflows/benches.yml"
- "benches/**"

jobs:
benches:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./benches
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
components: clippy, rustfmt
- name: Rustfmt
run: cargo fmt -- --check
- name: Clippy
run: cargo clippy --all-targets -- -D warnings
- name: Build
run: RUSTFLAGS=-Dwarnings cargo build --all-targets
62 changes: 18 additions & 44 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,9 @@ jobs:
name: Check doc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
uses: dtolnay/rust-toolchain@nightly
- run: cargo install cargo-deadlinks
- name: doc (rand)
env:
Expand Down Expand Up @@ -48,6 +44,10 @@ jobs:
target: x86_64-pc-windows-msvc
toolchain: beta
# Test both windows-gnu and windows-msvc; use beta rust on one
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
variant: MSRV
toolchain: 1.61.0
- os: ubuntu-latest
deps: sudo apt-get update ; sudo apt install gcc-multilib
target: i686-unknown-linux-gnu
Expand All @@ -58,18 +58,20 @@ jobs:
variant: minimal_versions

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: MSRV
if: ${{ matrix.variant == 'MSRV' }}
run: cp Cargo.lock.msrv Cargo.lock
- name: Install toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
profile: minimal
target: ${{ matrix.target }}
targets: ${{ matrix.target }}
toolchain: ${{ matrix.toolchain }}
override: true
- run: ${{ matrix.deps }}
- name: Maybe minimal versions
if: ${{ matrix.variant == 'minimal_versions' }}
run: cargo generate-lockfile -Z minimal-versions
run: |
cargo generate-lockfile -Z minimal-versions
- name: Maybe nightly
if: ${{ matrix.toolchain == 'nightly' }}
run: |
Expand All @@ -82,32 +84,6 @@ jobs:
cargo test --target ${{ matrix.target }} --manifest-path rand_xoshiro/Cargo.toml --all-features
cargo test --target ${{ matrix.target }} --manifest-path rand_jitter/Cargo.toml --all-features

msrv:
name: MSRV for rand_isaac / rand_xorshift / rand_xoshiro
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/[email protected] # older versions may work (untested)
- run: cd rand_isaac && cargo test --all-features
- run: cd rand_xorshift && cargo test --all-features
- run: cd rand_xoshiro && cargo test --all-features

msrv_hc:
name: MSRV for rand_hc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/[email protected]
- run: cd rand_hc && cargo test --all-features

msrv_jitter:
name: MSRV for rand_jitter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/[email protected]
- run: cd rand_jitter && cargo test --features std

test-cross:
runs-on: ubuntu-latest
strategy:
Expand All @@ -117,14 +93,12 @@ jobs:
toolchain: [stable]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
profile: minimal
target: ${{ matrix.target }}
targets: ${{ matrix.target }}
toolchain: ${{ matrix.toolchain }}
override: true
- name: Cache cargo plugins
uses: actions/cache@v1
with:
Expand All @@ -143,7 +117,7 @@ jobs:
test-miri:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install toolchain
run: |
MIRI_NIGHTLY=nightly-$(curl -s https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/miri)
Expand Down
Loading
Loading