Merge pull request #363 from sparsemat/dependabot/cargo/reqwest-0.12.7 #611
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: | |
push: | |
pull_request: | |
branches: | |
- master | |
schedule: | |
- cron: '0 0 15 * *' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
CARGO_TERM_COLOR: always | |
RUSTFLAGS: -D warnings | |
CLIPPY_DISABLE_DOCS_LINKS: 1 | |
jobs: | |
rustfmt: | |
name: rustfmt | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: {submodules: true} | |
- name: Install rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
components: rustfmt | |
- name: Check formatting | |
run: cargo fmt -- --check | |
documentation: | |
name: documentation | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: {submodules: true} | |
- name: Install rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
- name: Documentation | |
run: cargo doc --all-features --workspace | |
clippy: | |
name: clippy | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: {submodules: true} | |
- name: Install rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
components: clippy | |
- name: Run Clippy | |
run: cargo clippy --workspace --all-features -- -W clippy::doc_markdown -W clippy::needless_borrow -W clippy::checked_conversions -W clippy::unseparated_literal_suffix -W clippy::unreadable_literal -W clippy::if_not_else -W clippy::needless_continue -W clippy::match_same_arms -W clippy::match_wildcard_for_single_variants -W clippy::explicit_into_iter_loop -W clippy::needless_borrow | |
test: | |
name: test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- build: msrv | |
os: ubuntu-20.04 | |
rust: 1.77.0 | |
- build: stable | |
os: ubuntu-20.04 | |
rust: stable | |
- build: beta | |
os: ubuntu-20.04 | |
rust: beta | |
- build: nightly | |
os: ubuntu-20.04 | |
rust: nightly | |
- build: macos | |
os: macos-latest | |
rust: stable | |
- build: win-msvc | |
os: windows-2019 | |
rust: stable | |
- build: win-gnu | |
os: windows-2019 | |
rust: stable | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: {submodules: true} | |
- name: Install suitesparse | |
if: matrix.os == 'ubuntu-20.04' | |
run: | | |
sudo apt-get install libsuitesparse-dev | |
- name: Install rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: ${{ matrix.rust }} | |
- name: Build (exclude suitesparse) | |
run: cargo build --verbose --workspace --exclude suitesparse_ldl_sys --exclude sprs_suitesparse_ldl --exclude sprs_suitesparse_camd --exclude suitesparse_camd_sys --exclude suitesparse_umfpack_sys --exclude sprs_suitesparse_umfpack | |
if: matrix.os != 'ubuntu-20.04' | |
- name: Build (all) | |
run: cargo build --verbose --workspace | |
if: matrix.os == 'ubuntu-20.04' | |
- name: Test (exclude suitesparse) | |
run: cargo test --verbose --workspace --exclude suitesparse_ldl_sys --exclude sprs_suitesparse_ldl --exclude sprs_suitesparse_camd --exclude suitesparse_camd_sys --exclude suitesparse_umfpack_sys --exclude sprs_suitesparse_umfpack | |
if: matrix.os != 'ubuntu-20.04' | |
- name: Test (all) | |
run: cargo test --verbose --workspace | |
if: matrix.os == 'ubuntu-20.04' | |
- name: Test (suitesparse integration) | |
run: cargo test -p sprs-ldl --features "sprs-ldl/sprs_suitesparse_ldl sprs-ldl/sprs_suitesparse_camd" | |
if: matrix.os == 'ubuntu-20.04' && matrix.build == 'nightly' | |
benches: | |
name: benchmarks | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: {submodules: true} | |
- name: Install dependencies | |
run: | | |
sudo apt-get install libeigen3-dev libsuitesparse-dev | |
- name: Install rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: nightly | |
- name: Run benchmarks | |
run: | | |
cargo bench --workspace | |
optional_none: | |
name: Optional features (none selected) | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: {submodules: true} | |
- name: Install rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: nightly | |
- name: Run test | |
run: | | |
cargo test --no-default-features -p sprs | |
optional_approx: | |
name: Optional features (approx selected) | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: {submodules: true} | |
- name: Install rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: nightly | |
override: true | |
profile: minimal | |
- name: Run test | |
run: | | |
cargo test --features approx -p sprs | |
static_suitesparse: | |
name: static SuiteSparse | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- build: stable | |
os: ubuntu-20.04 | |
rust: stable | |
- build: macos | |
os: macos-latest | |
rust: stable | |
- build: win-msvc | |
os: windows-2019 | |
rust: stable | |
- build: win-gnu | |
os: windows-2019 | |
rust: stable | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: {submodules: true} | |
- name: Install rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: nightly | |
- name: Run tests (camd) | |
run: | | |
cd suitesparse_bindings/sprs_suitesparse_camd | |
cargo test -p suitesparse_camd_sys --features static -p sprs | |
- name: Run tests (ldl) | |
run: | | |
cd suitesparse_bindings/sprs_suitesparse_ldl | |
cargo test -p suitesparse_ldl_sys --features static -p sprs | |
miri: | |
name: Miri | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: {submodules: false} | |
- name: Install rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: nightly | |
components: miri | |
- name: Run test | |
run: | | |
cargo miri test -p sprs --no-default-features --features alga,approx,serde |