Skip to content

Allow running tests with --no-default-features #90

Allow running tests with --no-default-features

Allow running tests with --no-default-features #90

Workflow file for this run

name: Continuous integration
on:
pull_request:
push:
branches:
- master
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
MIRIFLAGS: "-Zmiri-disable-isolation"
RUSTFLAGS: "-D warnings"
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
- beta
- nightly
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
test_no_default_features:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
- beta
- nightly
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- name: Build
run: cargo build --no-default-features --verbose
- name: Run tests
run: cargo test --no-default-features --verbose
# We have to test the MSRV without the zip crate, since the zip crate has a higher MSRV and
# doesn't consider a MSRV update to be a breaking change.
test_msrv:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- 1.64.0 # MSRV
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- name: Build
run: cargo build --no-default-features --features=num-complex-0_4 --verbose
- name: Run tests
run: cargo test --no-default-features --features=num-complex-0_4 --verbose
cross_test:
runs-on: ubuntu-latest
strategy:
matrix:
include:
# 64-bit, big-endian
- rust: stable
target: powerpc64-unknown-linux-gnu
# 32-bit, little-endian
- rust: stable
target: i686-unknown-linux-gnu
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
targets: ${{ matrix.target }}
- name: Install cross
run: cargo install cross -f
- name: Build
run: cross build --verbose --target=${{ matrix.target }}
- name: Run tests
run: cross test --verbose --target=${{ matrix.target }}
miri:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- nightly
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
components: miri
- name: Run tests with Miri
run: cargo miri test --verbose
clippy:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
components: clippy
- name: Clippy
run: cargo clippy
format:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
components: rustfmt
- name: Rustfmt
run: cargo fmt -- --check