76 lines
1.8 KiB
YAML
76 lines
1.8 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
|
|
|
|
# variables:
|
|
# RUSTFLAGS: "-C link-dead-code"
|
|
|
|
# Currently doesnt work.
|
|
# # 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
|
|
lint:rustfmt:
|
|
image: "rustlang/rust:nightly"
|
|
script:
|
|
- rustc --version && cargo --version
|
|
- cargo install rustfmt-nightly
|
|
- cargo fmt --all -- --write-mode=diff
|
|
|
|
# Configure and run clippy on nightly
|
|
# Only fails on errors atm.
|
|
lint:clippy:
|
|
image: "rustlang/rust:nightly"
|
|
script:
|
|
- rustc --version && cargo --version
|
|
- cargo install clippy
|
|
- cargo clippy --all
|