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

Migrate CI to rust-toolchain #50

Closed
wants to merge 14 commits into from
63 changes: 19 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,21 @@ 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
cargo update regex --precise 1.5.1 # insufficient minimal version of criterion
- name: Maybe nightly
if: ${{ matrix.toolchain == 'nightly' }}
run: |
Expand All @@ -82,32 +85,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/rust-toolchain@1.56.0 # 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/rust-toolchain@1.36.0
- 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/rust-toolchain@1.51.0
- run: cd rand_jitter && cargo test --features std

test-cross:
runs-on: ubuntu-latest
strategy:
Expand All @@ -117,14 +94,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 +118,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