Use a gitlab-ci template instead of script duplication.
This commit is contained in:
parent
c8c0699d9c
commit
35f7464540
@ -14,50 +14,26 @@ before_script:
|
|||||||
# kcov
|
# kcov
|
||||||
# - apt-get install -y libcurl4-openssl-dev libelf-dev libdw-dev cmake gcc binutils-dev libiberty-dev
|
# - 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
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
# RUSTFLAGS: "-C link-dead-code"
|
# RUSTFLAGS: "-C link-dead-code"
|
||||||
RUST_BACKTRACE: "FULL"
|
RUST_BACKTRACE: "FULL"
|
||||||
|
|
||||||
# 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
|
|
||||||
|
|
||||||
stable:test:
|
stable:test:
|
||||||
# Stable img
|
|
||||||
# https://hub.docker.com/_/rust/
|
# https://hub.docker.com/_/rust/
|
||||||
image: "rust"
|
image: "rust"
|
||||||
stage: test
|
<<: *cargo_test
|
||||||
script:
|
|
||||||
- rustc --version && cargo --version
|
|
||||||
- cargo build
|
|
||||||
- cargo test --verbose -- --test-threads=1
|
|
||||||
|
|
||||||
nightly:test:
|
nightly:test:
|
||||||
# Nightly
|
|
||||||
# https://hub.docker.com/r/rustlang/rust/
|
# https://hub.docker.com/r/rustlang/rust/
|
||||||
image: "rustlang/rust:nightly"
|
image: "rustlang/rust:nightly"
|
||||||
stage: test
|
<<: *cargo_test
|
||||||
script:
|
|
||||||
- rustc --version && cargo --version
|
|
||||||
- cargo build
|
|
||||||
- cargo test --verbose -- --test-threads=1
|
|
||||||
# - cargo bench
|
|
||||||
|
|
||||||
# Configure and run rustfmt on nightly
|
# Configure and run rustfmt on nightly
|
||||||
# Exits and builds fails if on bad format
|
# Exits and builds fails if on bad format
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user