Revert "refactor: Redo module and feature structure for v4/v4.2 split" #50
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
env: | |
RUSTFLAGS: -D warnings | |
RUST_BACKTRACE: 1 | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 15 | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
rust: [nightly, beta, stable] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-test-${{ matrix.rust }}-${{ hashFiles('**/Cargo.toml') }} | |
- name: Install Rust | |
run: rustup update ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }} | |
- name: Run cargo check | |
run: cargo check --all --all-features --all-targets | |
if: startsWith(matrix.rust, 'nightly') | |
- name: Run cargo check (without dev-dependencies to catch missing feature flags) | |
if: startsWith(matrix.rust, 'nightly') | |
run: cargo check -Z features=dev_dep | |
- name: Full feature + v4.2 testing | |
run: cargo test --all-features | |
- name: v4 compatibility testing | |
run: cargo test --no-default-features --features debug,rand_core,wyhash,randomised_wyhash | |
msrv: | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-msrv-${{ hashFiles('**/Cargo.toml') }} | |
- name: get MSRV | |
run: | | |
msrv=`cargo metadata --no-deps --format-version 1 | jq --raw-output '.packages[] | select(.name=="wyrand") | .rust_version'` | |
echo "MSRV=$msrv" >> $GITHUB_ENV | |
- name: Install Rust | |
run: rustup update ${{ env.MSRV }} --no-self-update && rustup default ${{ env.MSRV }} | |
- name: Run cargo check | |
id: check | |
run: cargo check --all-features |