2020-04-06 00:43:25 +08:00
|
|
|
version: 2.1
|
|
|
|
|
|
|
|
executors:
|
|
|
|
rust-nightly-executor:
|
|
|
|
docker:
|
|
|
|
- image: rustlang/rust:nightly
|
|
|
|
rust-executor:
|
|
|
|
docker:
|
|
|
|
- image: rust:latest
|
|
|
|
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
check-fmt:
|
|
|
|
executor: rust-executor
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run:
|
|
|
|
name: install rustfmt
|
|
|
|
command: rustup component add rustfmt
|
|
|
|
- run:
|
|
|
|
name: check formatting
|
|
|
|
command: cargo fmt -- --check
|
2020-10-26 19:26:49 +08:00
|
|
|
clippy:
|
|
|
|
executor: rust-executor
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run:
|
|
|
|
name: install clippy
|
|
|
|
command: rustup component add clippy
|
|
|
|
- run:
|
|
|
|
name: clippy
|
|
|
|
command: cargo clippy
|
2020-04-06 00:43:25 +08:00
|
|
|
build-native:
|
|
|
|
executor: rust-executor
|
|
|
|
steps:
|
|
|
|
- checkout
|
2020-04-06 01:46:45 +08:00
|
|
|
- run: apt-get update
|
2020-04-06 01:57:31 +08:00
|
|
|
- run: apt-get install -y cmake gfortran libblas-dev liblapack-dev
|
2020-04-06 00:43:25 +08:00
|
|
|
- run:
|
|
|
|
name: build --no-default-feature
|
|
|
|
command: cargo build --no-default-features;
|
|
|
|
- run:
|
|
|
|
name: build (default features)
|
|
|
|
command: cargo build;
|
|
|
|
- run:
|
|
|
|
name: build --all-features
|
|
|
|
command: cargo build --all-features
|
|
|
|
- run:
|
|
|
|
name: build nalgebra-glm
|
|
|
|
command: cargo build -p nalgebra-glm --all-features
|
|
|
|
- run:
|
|
|
|
name: build nalgebra-lapack
|
2020-04-06 02:05:53 +08:00
|
|
|
command: cd nalgebra-lapack; cargo build
|
2020-04-06 00:48:21 +08:00
|
|
|
test-native:
|
|
|
|
executor: rust-executor
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run:
|
|
|
|
name: test
|
2021-01-26 15:47:47 +08:00
|
|
|
command: cargo test --features arbitrary --features serde-serialize --features abomonation-serialize --features sparse --features debug --features io --features compare --features libm --features proptest-support --features slow-tests
|
2020-04-06 00:48:21 +08:00
|
|
|
- run:
|
|
|
|
name: test nalgebra-glm
|
2020-11-17 15:37:56 +08:00
|
|
|
command: cargo test -p nalgebra-glm --features arbitrary --features serde-serialize --features abomonation-serialize --features sparse --features debug --features io --features compare --features libm --features slow-tests
|
2021-01-26 17:03:39 +08:00
|
|
|
- run:
|
|
|
|
name: test nalgebra-sparse
|
|
|
|
# Manifest-path is necessary because cargo otherwise won't correctly forward features
|
|
|
|
# We increase number of proptest cases to hopefully catch more potential bugs
|
|
|
|
command: PROPTEST_CASES=10000 cargo test --manifest-path=nalgebra-sparse/Cargo.toml --features compare,proptest-support
|
|
|
|
- run:
|
|
|
|
name: test nalgebra-sparse (slow tests)
|
|
|
|
# Unfortunately, the "slow-tests" take so much time that we need to run them with --release
|
|
|
|
command: PROPTEST_CASES=10000 cargo test --release --manifest-path=nalgebra-sparse/Cargo.toml --features compare,proptest-support,slow-tests slow
|
2020-04-06 00:43:25 +08:00
|
|
|
build-wasm:
|
|
|
|
executor: rust-executor
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run:
|
|
|
|
name: install cargo-web
|
|
|
|
command: cargo install -f cargo-web;
|
|
|
|
- run:
|
|
|
|
name: build --all-features
|
|
|
|
command: cargo web build --verbose --target wasm32-unknown-unknown;
|
|
|
|
- run:
|
|
|
|
name: build nalgebra-glm
|
|
|
|
command: cargo build -p nalgebra-glm --all-features
|
|
|
|
build-no-std:
|
2020-04-06 00:56:44 +08:00
|
|
|
executor: rust-nightly-executor
|
2020-04-06 00:43:25 +08:00
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run:
|
|
|
|
name: install xargo
|
2020-04-06 01:41:58 +08:00
|
|
|
command: cp .circleci/Xargo.toml .; rustup component add rust-src; cargo install -f xargo;
|
2020-04-06 00:43:25 +08:00
|
|
|
- run:
|
|
|
|
name: build
|
|
|
|
command: xargo build --verbose --no-default-features --target=x86_64-unknown-linux-gnu;
|
|
|
|
- run:
|
|
|
|
name: build --features alloc
|
2020-04-06 01:41:58 +08:00
|
|
|
command: xargo build --verbose --no-default-features --features alloc --target=x86_64-unknown-linux-gnu;
|
2020-04-06 00:43:25 +08:00
|
|
|
build-nightly:
|
|
|
|
executor: rust-nightly-executor
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run:
|
|
|
|
name: build --all-features
|
|
|
|
command: cargo build --all-features
|
|
|
|
|
|
|
|
|
|
|
|
workflows:
|
|
|
|
version: 2
|
|
|
|
build:
|
|
|
|
jobs:
|
|
|
|
- check-fmt
|
2020-10-26 19:26:49 +08:00
|
|
|
- clippy
|
2020-04-06 00:43:25 +08:00
|
|
|
- build-native:
|
|
|
|
requires:
|
|
|
|
- check-fmt
|
|
|
|
- build-wasm:
|
|
|
|
requires:
|
|
|
|
- check-fmt
|
|
|
|
- build-no-std:
|
|
|
|
requires:
|
|
|
|
- check-fmt
|
|
|
|
- build-nightly:
|
|
|
|
requires:
|
|
|
|
- check-fmt
|
2020-04-06 00:48:21 +08:00
|
|
|
- test-native:
|
|
|
|
requires:
|
|
|
|
- build-native
|