Skip to content

add CI checks

add CI checks #1

Workflow file for this run

name: Rust CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
cargo-fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: rustfmt
- name: Check Formatting
run: cargo fmt -- --check
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Clippy Lint
run: RUSTFLAGS="-D warnings" cargo clippy --locked --tests
clippy-native-cpu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Clippy Lint
run: RUSTFLAGS="-D warnings -C target-cpu=native" cargo clippy --locked --tests
clippy-all-features:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Clippy Lint
run: RUSTFLAGS="-D warnings" cargo clippy --all-features --locked --tests
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Run tests
run: cargo test
tests-native-cpu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Run tests
run: RUSTFLAGS='-C target-cpu=native' cargo test -F std
tests-miri-big-endian:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install Miri
run: |
rustup toolchain install nightly --component miri
rustup override set nightly
cargo miri setup
- name: Run tests
run: cargo +nightly miri test --target s390x-unknown-linux-gnu -F std