image: 'rust:latest'
stages:
- test
- build
.rust_test_template:
stage: test
cache:
key: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
paths:
- cargo/
- target/
before_script:
- export CARGO_HOME="$CI_PROJECT_DIR/cargo"
- rustup --version
- rustc --version
- cargo --version
script:
- cargo test --all --verbose
- cargo doc --all --verbose
# No stable for now, until FixedSizeArray stabilizes
# test-stable:
# <<: *rust_test_template
# variables:
# RUSTUP_TOOLCHAIN: stable
test-nightly:
<<: *rust_test_template
variables:
RUSTUP_TOOLCHAIN: nightly