Skip to content

Add CI for 32-bit and big-endian platforms (#198) #71

Add CI for 32-bit and big-endian platforms (#198)

Add CI for 32-bit and big-endian platforms (#198) #71

Workflow file for this run

on:
push:
branches:
- main
pull_request:
branches:
- main
name: CI
jobs:
test-linux:
name: Test Linux
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
rust:
- stable
- beta
- nightly
mb_const_generics:
- ""
- "--features const-generics"
target:
- x86_64
- i686
- sparc64
include:
- mb_const_generics: ""
rust: 1.37.0
target: x86_64
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- uses: actions-rs/cargo@v1
with:
use-cross: ${{ matrix.target != 'x86_64' }}
command: test
args: --verbose --features "strict" ${{ matrix.mb_const_generics }} --target ${{ matrix.target }}-unknown-linux-gnu
- uses: actions-rs/cargo@v1
with:
use-cross: ${{ matrix.target != 'x86_64' }}
command: doc
args: --features "strict" ${{ matrix.mb_const_generics }} --target ${{ matrix.target }}-unknown-linux-gnu
test-non-linux:
name: Test non-Linux
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- macos-latest
- windows-latest
rust:
- stable
mb_const_generics:
- ""
- "--features const-generics"
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- run: cargo test --verbose --features "strict" ${{ matrix.mb_const_generics }}
- run: cargo doc --features "strict" ${{ matrix.mb_const_generics }}
clippy:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt, clippy
- run: cargo fmt --all -- --check
- run: cargo clippy -- -D warnings
# Allow deprecated because we test the no_std feature.
- run: cargo clippy --all-features -- -D warnings -A deprecated