Skip to content

Added missing feature for testing argmin-math (docs) #778

Added missing feature for testing argmin-math (docs)

Added missing feature for testing argmin-math (docs) #778

Workflow file for this run

name: argmin CI
on:
pull_request:
push:
branches:
- main
env:
CARGO_TERM_COLOR: always
jobs:
tests-argmin:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@stable
- name: Test (default features)
run: cargo test -p argmin --verbose
- name: Test (all features)
run: cargo test -p argmin --verbose --all-features
tests-argmin-serde1-feature:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v2
- uses: dtolnay/rust-toolchain@stable
- name: Test (no default features)
run: cargo test -p argmin --verbose --no-default-features
- name: Test with serde1 feature
run: cargo test -p argmin --verbose --no-default-features --features "serde1"
- name: Test with slog-logger feature
run: cargo test -p argmin --verbose --no-default-features --features "slog-logger"
tests-argmin-math:
runs-on: ubuntu-latest
# strategy:
# matrix:
# feature:
# - primitives
# - vec
# # ndarray with linalg, without serde
# - ndarray_latest,_dev_linalg
# - ndarray_v0_15,_dev_linalg
# - ndarray_v0_14,_dev_linalg
# - ndarray_v0_13,_dev_linalg
# # ndarray without linalg, without serde
# - ndarray_latest-nolinalg
# - ndarray_v0_15-nolinalg
# - ndarray_v0_14-nolinalg
# - ndarray_v0_13-nolinalg
# # ndarray with linalg, with serde
# - ndarray_latest-serde,_dev_linalg
# - ndarray_v0_15-serde,_dev_linalg
# - ndarray_v0_14-serde,_dev_linalg
# - ndarray_v0_13-serde,_dev_linalg
# # ndarray without linalg, with serde
# - ndarray_latest-nolinalg-serde
# - ndarray_v0_15-nolinalg-serde
# - ndarray_v0_14-nolinalg-serde
# - ndarray_v0_13-nolinalg-serde
# # nalgebra
# - nalgebra_latest-serde
# - nalgebra_v0_31-serde
# - nalgebra_v0_30-serde
# - nalgebra_v0_29-serde
steps:
- uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v2
- uses: dtolnay/rust-toolchain@stable
# - name: Test
# run: cargo test -p argmin-math --no-default-features --features "${{ matrix.feature }}"
# Default features
- name: argmin-math (primitives)
run: cargo test -p argmin-math --no-default-features --features "primitives"
- name: argmin-math (vec)
run: cargo test -p argmin-math --no-default-features --features "vec"
# ndarray without linalg, without serde
- name: argmin-math (ndarray_latest-nolinalg)
run: cargo test -p argmin-math --no-default-features --features "ndarray_latest-nolinalg"
- name: argmin-math (ndarray_v0_15-nolinalg)
run: cargo test -p argmin-math --no-default-features --features "ndarray_v0_15-nolinalg"
- name: argmin-math (ndarray_v0_14-nolinalg)
run: cargo test -p argmin-math --no-default-features --features "ndarray_v0_14-nolinalg"
- name: argmin-math (ndarray_v0_13-nolinalg)
run: cargo test -p argmin-math --no-default-features --features "ndarray_v0_13-nolinalg"
# ndarray with linalg, without serde
- name: argmin-math (ndarray_latest,_dev_linalg_latest)
run: cargo test -p argmin-math --no-default-features --features "ndarray_latest,_dev_linalg_latest"
- name: argmin-math (ndarray_v0_15,_dev_linalg_0_16)
run: cargo test -p argmin-math --no-default-features --features "ndarray_v0_15,_dev_linalg_0_16"
- name: argmin-math (ndarray_v0_14,_dev_linalg_0_13)
run: cargo test -p argmin-math --no-default-features --features "ndarray_v0_14,_dev_linalg_0_13"
- name: argmin-math (ndarray_v0_13,_dev_linalg_0_12)
run: cargo test -p argmin-math --no-default-features --features "ndarray_v0_13,_dev_linalg_0_12"
# ndarray without linalg, with serde
- name: argmin-math (ndarray_latest-serde,_dev_linalg_latest)
run: cargo test -p argmin-math --no-default-features --features "ndarray_latest-serde,_dev_linalg_latest"
- name: argmin-math (ndarray_v0_15-serde,_dev_linalg_0_16)
run: cargo test -p argmin-math --no-default-features --features "ndarray_v0_15-serde,_dev_linalg_0_16"
- name: argmin-math (ndarray_v0_14-serde,_dev_linalg_0_13)
run: cargo test -p argmin-math --no-default-features --features "ndarray_v0_14-serde,_dev_linalg_0_13"
- name: argmin-math (ndarray_v0_13-serde,_dev_linalg_0_12)
run: cargo test -p argmin-math --no-default-features --features "ndarray_v0_13-serde,_dev_linalg_0_12"
# ndarray with linalg, with serde
- name: argmin-math (ndarray_latest-serde,_dev_linalg_latest)
run: cargo test -p argmin-math --no-default-features --features "ndarray_latest-serde,_dev_linalg_latest"
- name: argmin-math (ndarray_v0_15-serde,_dev_linalg_0_16)
run: cargo test -p argmin-math --no-default-features --features "ndarray_v0_15-serde,_dev_linalg_0_16"
- name: argmin-math (ndarray_v0_14-serde,_dev_linalg_0_13)
run: cargo test -p argmin-math --no-default-features --features "ndarray_v0_14-serde,_dev_linalg_0_13"
- name: argmin-math (ndarray_v0_13-serde,_dev_linalg_0_12)
run: cargo test -p argmin-math --no-default-features --features "ndarray_v0_13-serde,_dev_linalg_0_12"
# nalgebra without serde
- name: argmin-math (nalgebra_latest)
run: cargo test -p argmin-math --no-default-features --features "nalgebra_latest"
- name: argmin-math (nalgebra_v0_32)
run: cargo test -p argmin-math --no-default-features --features "nalgebra_v0_32"
- name: argmin-math (nalgebra_v0_31)
run: cargo test -p argmin-math --no-default-features --features "nalgebra_v0_31"
- name: argmin-math (nalgebra_v0_30)
run: cargo test -p argmin-math --no-default-features --features "nalgebra_v0_30"
- name: argmin-math (nalgebra_v0_29)
run: cargo test -p argmin-math --no-default-features --features "nalgebra_v0_29"
# nalgebra with serde
- name: argmin-math (nalgebra_latest-serde)
run: cargo test -p argmin-math --no-default-features --features "nalgebra_latest-serde"
- name: argmin-math (nalgebra_v0_32-serde)
run: cargo test -p argmin-math --no-default-features --features "nalgebra_v0_32-serde"
- name: argmin-math (nalgebra_v0_31-serde)
run: cargo test -p argmin-math --no-default-features --features "nalgebra_v0_31-serde"
- name: argmin-math (nalgebra_v0_30-serde)
run: cargo test -p argmin-math --no-default-features --features "nalgebra_v0_30-serde"
- name: argmin-math (nalgebra_v0_29-serde)
run: cargo test -p argmin-math --no-default-features --features "nalgebra_v0_29-serde"
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v2
- uses: dtolnay/rust-toolchain@beta
with:
components: clippy
- name: Clippy (argmin-math)
run: cargo clippy -p argmin-math --all-targets --features "primitives,vec,nalgebra_latest-serde,ndarray_latest-serde" -- -D warnings
- name: Clippy (argmin) with default features
run: cargo clippy -p argmin --all-targets -- -D warnings
- name: Clippy (argmin) without default features
run: cargo clippy -p argmin --all-targets --no-default-features -- -D warnings
- name: Clippy (argmin) without serde1 feature
run: cargo clippy -p argmin --all-targets --no-default-features --features="slog-logger" -- -D warnings
- name: Clippy (argmin) with all features
run: cargo clippy -p argmin --all-targets --all-features -- -D warnings
rustfmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v2
- uses: dtolnay/rust-toolchain@beta
with:
components: rustfmt
- run: cargo fmt --all -- --check
docs-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v2
- uses: dtolnay/rust-toolchain@stable
- name: argmin docs
run: cargo rustdoc -p argmin --all-features -- -D warnings
- name: argmin-math docs
run: cargo rustdoc -p argmin-math --features "latest_all" -- -D warnings
wasm-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v2
- uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown,wasm32-unknown-emscripten,wasm32-wasi
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Build target wasm32-unknown-unknown
run: cargo build --target wasm32-unknown-unknown --features wasm-bindgen
- name: Build target wasm32-wasi with feature wasm-bindgen
run: cargo build --target wasm32-wasi --features wasm-bindgen
- name: Build target wasm32-unknown-emscripten
run: cargo build --target wasm32-unknown-emscripten --no-default-features --features wasm-bindgen
cargo-deny:
runs-on: ubuntu-latest
strategy:
matrix:
checks:
- advisories
- bans licenses sources
# Prevent sudden announcement of a new advisory from failing ci:
continue-on-error: ${{ matrix.checks == 'advisories' }}
steps:
- uses: actions/checkout@v2
- uses: EmbarkStudios/cargo-deny-action@v1
with:
command: check ${{ matrix.checks }}