stm32f4disc-demo/.gitlab-ci.yml

30 lines
709 B
YAML

# Use Rust docker image, see: https://hub.docker.com/_/rust/
image: rust:latest
# Set the Cargo dir manually so it can be cached
variables:
CARGO_HOME: $CI_PROJECT_DIR/cargo
# Cache the Cargo dir and build artifacts
cache:
paths:
- cargo/
- target/
# Add the thumbv7em-none-eabihf target for Rust
before_script:
- rustup target add thumbv7em-none-eabihf
# Defines stages which are to be executed
stages:
- build
# Run `cargo build` and `cargo test for the project with stable Rust
rust-build:
stage: build
image: rust:latest
script:
- rustc --version && cargo --version
- cargo build --release --jobs 1
- cargo test --lib --target x86_64-unknown-linux-gnu -- --test-threads 1