podcasts/.gitlab-ci.yml
2017-12-22 18:49:24 +02:00

71 lines
1.5 KiB
YAML

stages:
# meson uses cargo to do the build
# so it's ok to have the tests first.
- test
# - build
- lint
before_script:
- apt-get update -yqq
- apt-get install -yqq --no-install-recommends build-essential
- apt-get install -yqq --no-install-recommends libgtk-3-dev
# - apt-get install -yqq --no-install-recommends meson
# kcov
# - apt-get install -y libcurl4-openssl-dev libelf-dev libdw-dev cmake gcc binutils-dev libiberty-dev
.cargo_test_template: &cargo_test
stage: test
script:
- rustc --version && cargo --version
- cargo build
- cargo test --verbose -- --test-threads=1
cache:
paths:
- target/
- cargo/
variables:
# RUSTFLAGS: "-C link-dead-code"
RUST_BACKTRACE: "FULL"
stable:test:
# https://hub.docker.com/_/rust/
image: "rust"
<<: *cargo_test
nightly:test:
# https://hub.docker.com/r/rustlang/rust/
image: "rustlang/rust:nightly"
<<: *cargo_test
# Configure and run rustfmt on nightly
# Exits and builds fails if on bad format
rustfmt:
image: "rustlang/rust:nightly"
stage: lint
variables:
CFG_RELEASE_CHANNEL: "nightly"
script:
- rustc --version && cargo --version
- cargo install rustfmt-nightly --force
- cargo fmt --all -- --write-mode=diff
cache:
paths:
- target/
- cargo/
# Configure and run clippy on nightly
# Only fails on errors atm.
clippy:
image: "rustlang/rust:nightly"
stage: lint
script:
- rustc --version && cargo --version
- cargo install clippy --force
- cargo clippy --all
cache:
paths:
- target/
- cargo/