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
language: rust
matrix:
include:
- rust: nightly
env: TEST_SUITE=suite_nightly
- rust: beta
env: TEST_SUITE=suite_beta
- rust: stable
env: TEST_SUITE=suite_stable
allow_failures:
- rust: nightly
- rust: beta
rust:
- nightly
- beta
- stable
env:
- CARGO_FEATURES=""
- CARGO_FEATURES="arbitrary"
- CARGO_FEATURES="mint"
- CARGO_FEATURES="alloc"
- 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:
apt:
packages:
@ -20,15 +25,16 @@ addons:
script:
- rustc --version
- cargo --version
- cargo build --verbose
- cargo build --verbose --features arbitrary
- 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
- ./ci/build.sh
- ./ci/test.sh
env:
matrix:
- CARGO_FEATURE_SYSTEM_NETLIB=1 CARGO_FEATURE_EXCLUDE_LAPACKE=1 CARGO_FEATURE_EXCLUDE_CBLAS=1
matrix:
exclude:
- 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