Skip to content

Commit

Permalink
Update CI configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
shepmaster committed Oct 9, 2024
1 parent 19b73de commit a0ca55a
Showing 1 changed file with 58 additions and 66 deletions.
124 changes: 58 additions & 66 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,106 +2,98 @@ on: push

name: Continuous integration

env:
RUSTFLAGS: -D warnings
RUSTDOCFLAGS: -D warnings

jobs:
library:
runs-on: ubuntu-latest
strategy:
matrix:
platform:
- ubuntu-latest

rust:
- stable
- beta
- nightly
- 1.37.0 # MSRV
- 1.81.0 # MSRV

steps:
- uses: actions/checkout@v2
include:
- platform: macos-latest # This serves as our aarch64 / arm64 runner
rust: stable

- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
components: rustfmt, clippy
- platform: windows-latest
rust: stable

- uses: actions-rs/cargo@v1
with:
command: build
runs-on: ${{ matrix.platform }}

- uses: actions-rs/cargo@v1
with:
command: test
steps:
- uses: actions/checkout@v4

- uses: actions-rs/cargo@v1
with:
command: test
args: --all-features
- run: git submodule update

- uses: actions-rs/cargo@v1
- uses: dtolnay/rust-toolchain@master
with:
command: fmt
args: --all -- --check
if: ${{ matrix.rust == 'stable' }}
toolchain: ${{ matrix.rust }}

- uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-features -- -D warnings
if: ${{ matrix.rust == 'stable' }}
- name: Unit Tests
run: cargo test --all-features

no-std:
- name: Property Tests
run: cargo test -p comparison --all-features

miri:
runs-on: ubuntu-latest
env:
MIRIFLAGS: --cfg _internal_xxhash3_force_scalar

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: stable
target: thumbv6m-none-eabi
override: true
toolchain: nightly
components: miri

- uses: actions-rs/cargo@v1
with:
command: build
args: --no-default-features --target thumbv6m-none-eabi --lib
- name: Unsafe Code
run: cargo miri test --all-features

compatibility-tests:
- name: Big Endian Platform
run: cargo miri test --all-features --target s390x-unknown-linux-gnu

lints:
runs-on: ubuntu-latest
strategy:
matrix:
test:
- digest_0_8
- digest_0_9

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- run: git submodule update

- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt, clippy

- uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path "compatibility-tests/${{ matrix.test }}/Cargo.toml"
- run: cargo fmt --all

- run: cargo clippy --all --all-targets --all-features

big_endian:
- run: cargo doc --all-features

no-std:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- uses: dtolnay/rust-toolchain@master
with:
platforms: s390x
toolchain: stable
targets: thumbv6m-none-eabi

- name: Cross test
uses: actions-rs/cargo@v1
with:
use-cross: true
command: test
args: --target s390x-unknown-linux-gnu
- run: >
cargo build
--no-default-features
--features=xxhash32,xxhash64,xxhash3_64
--target thumbv6m-none-eabi

0 comments on commit a0ca55a

Please sign in to comment.