podcasts/.gitlab-ci.yml
2017-11-11 14:47:22 +02:00

77 lines
2.0 KiB
YAML

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
# kcov
# - apt-get install -y libcurl4-openssl-dev libelf-dev libdw-dev cmake gcc binutils-dev libiberty-dev
# variables:
# RUSTFLAGS: "-C link-dead-code"
# Build with meson
build:stable:
# Stable img
# https://hub.docker.com/_/rust/
image: "rust"
script:
- rustc --version && cargo --version
- ./configure --prefix=/usr/local
- make && sudo make install
build:nightly:
# Nightly
# https://hub.docker.com/r/rustlang/rust/
image: "rustlang/rust:nightly"
script:
- rustc --version && cargo --version
- ./configure --prefix=/usr/local
- make && sudo make install
test:stable:
# Stable img
# https://hub.docker.com/_/rust/
image: "rust"
script:
- rustc --version && cargo --version
- cargo build --all
- cargo test --all --verbose
test:nightly:
# Nightly
# https://hub.docker.com/r/rustlang/rust/
image: "rustlang/rust:nightly"
script:
- rustc --version && cargo --version
- cargo build --all
- cargo test --all --verbose
# - cargo bench
# Configure and run rustfmt on nightly
# Exits and builds fails if on bad format
rustfmt:
image: "rustlang/rust:nightly"
before_script:
- apt-get update -yqq
- apt-get install -yqq --no-install-recommends build-essential
- apt-get install -yqq --no-install-recommends build-essential libgtk-3-dev
- export PATH="$PATH:$HOME/.cargo/bin"
- which rustfmt || cargo install rustfmt-nightly
script:
- rustc --version && cargo --version
- cargo fmt --all -- --write-mode=diff
# Configure and run clippy on nightly
# Only fails on errors atm.
clippy:
image: "rustlang/rust:nightly"
before_script:
- apt-get update -yqq
- apt-get install -yqq --no-install-recommends build-essential
- apt-get install -yqq --no-install-recommends build-essential libgtk-3-dev
- export PATH="$PATH:$HOME/.cargo/bin"
- which rustfmt || cargo install clippy
script:
- rustc --version && cargo --version
- cargo clippy --all