36 lines
595 B
YAML
36 lines
595 B
YAML
image: 'rust:latest'
|
|
|
|
stages:
|
|
- test
|
|
- build
|
|
|
|
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 {{ DEPENDENCIES }}
|
|
|
|
test:
|
|
stage: test
|
|
script:
|
|
- rustc --version
|
|
- cargo --version
|
|
- cargo test --verbose
|
|
|
|
build_release:
|
|
stage: build
|
|
script:
|
|
- rustc --version
|
|
- cargo --version
|
|
- cargo build --release
|
|
artifacts:
|
|
paths:
|
|
- target/release/lifx-mqtt-bridge
|
|
|
|
cache:
|
|
paths:
|
|
- apt/
|
|
- cargo/
|
|
- target/
|