Improve CI to include xargo builds.

This commit is contained in:
sebcrozet 2018-05-24 18:29:52 +02:00 committed by Sébastien Crozet
parent d759db682c
commit 4b8560651c
3 changed files with 46 additions and 22 deletions

View File

@ -1,16 +1,21 @@
sudo: false sudo: false
language: rust language: rust
matrix: rust:
include: - nightly
- rust: nightly - beta
env: TEST_SUITE=suite_nightly - stable
- rust: beta
env: TEST_SUITE=suite_beta env:
- rust: stable - CARGO_FEATURES=""
env: TEST_SUITE=suite_stable - CARGO_FEATURES="arbitrary"
allow_failures: - CARGO_FEATURES="mint"
- rust: nightly - CARGO_FEATURES="alloc"
- rust: beta - CARGO_FEATURES="serde-serialize"
- CARGO_FEATURES="abomonation-serialize"
- CARGO_FEATURES="debug arbitrary mint serde-serialize abomonation-serialize"
- NO_STD=1 CARGO_FEATURES=""
- NO_STD=1 CARGO_FEATURES="alloc"
addons: addons:
apt: apt:
packages: packages:
@ -20,15 +25,16 @@ addons:
script: script:
- rustc --version - rustc --version
- cargo --version - cargo --version
- cargo build --verbose - ./ci/build.sh
- cargo build --verbose --features arbitrary - ./ci/test.sh
- cargo build --verbose --features mint
- cargo build --verbose --features serde-serialize
- cargo build --verbose --features abomonation-serialize
- cargo test --verbose
- cargo test --verbose --features "debug arbitrary mint serde-serialize abomonation-serialize"
- cd nalgebra-lapack; cargo test --verbose
env: matrix:
matrix: exclude:
- CARGO_FEATURE_SYSTEM_NETLIB=1 CARGO_FEATURE_EXCLUDE_LAPACKE=1 CARGO_FEATURE_EXCLUDE_CBLAS=1 - rust: stable
env: NO_STD=1
- rust: beta
env: NO_STD=1
# - rust: stable
# NO_STD=1 CARGO_FEATURES="alloc"
# - rust: beta
# NO_STD=1 CARGO_FEATURES="alloc"

8
ci/build.sh Normal file
View File

@ -0,0 +1,8 @@
#! /bin/bash
if [ -z NO_STD ]; then
cargo build --verbose --features "${CARGO_FEATURES}";
else
cargo install xargo;
xargo build --verbose --no-default-features --target=x86_64-unknown-linux-gnu --features "${CARGO_FEATURES}";
fi

10
ci/test.sh Normal file
View File

@ -0,0 +1,10 @@
#! /bin/bash
if [ -z NO_STD ]; then
cargo test --verbose ${CARGO_FEATURES};
if [ -z CARGO_FEATURES ]; then
export CARGO_FEATURE_SYSTEM_NETLIB=1 CARGO_FEATURE_EXCLUDE_LAPACKE=1 CARGO_FEATURE_EXCLUDE_CBLAS=1
cd nalgebra-lapack; cargo test --verbose;
fi
fi