stages:
- syntax-check
- lint
- unit-test
- report
- deploy
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- target
- Cargo.lock
- coverage
variables:
CARGO_HOME: $CI_PROJECT_DIR/cargo
APT_CACHE_DIR: $CI_PROJECT_DIR/apt
before_script:
- apt-get update -yq
- apt-get install -o dir::cache::archives="$APT_CACHE_DIR" -y cmake gfortran
- set PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig
- cargo --version
- rustc --version
syntax-check:
stage: syntax-check
image: rust:latest
script:
- cargo check
fmt:
stage: lint
needs: [ "syntax-check" ]
image: rust:latest
script:
- echo
test-default:
stage: unit-test
needs: [ "fmt" ]
image: rust:latest
script:
- cargo test
test-native:
stage: unit-test
needs: [ "fmt" ]
image: rust:latest
script:
- cargo test --no-default-features --features native
test-serde:
stage: unit-test
needs: [ "fmt" ]
image: rust:latest
script:
- cargo test --no-default-features --features "native serde-serialize"
test-openblas:
stage: unit-test
needs: [ "fmt" ]
image: rust:latest
script:
- apt-get update -yq
- apt-get install -o dir::cache::archives="$APT_CACHE_DIR" -y cmake gfortran
- cargo test --tests --no-default-features --features openblas
test-netlib:
stage: unit-test
needs: [ "fmt" ]
image: rust:latest
script:
- apt-get update -yq
- apt-get install -o dir::cache::archives="$APT_CACHE_DIR" -y cmake gfortran
- cargo test --tests --no-default-features --features netlib
test-intelmkl:
stage: unit-test
needs: [ "fmt" ]
image: rust:latest
script:
- apt-get update -yq
- apt-get install -o dir::cache::archives="$APT_CACHE_DIR" -y cmake gfortran
- cargo test --tests --no-default-features --features intel-mkl