From eba25e4acc3509c4d1503a1c808cfe8f216071c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Fri, 13 Sep 2019 02:00:46 +0200 Subject: [PATCH] CI: Use recent rust image, split build/test stages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- .gitlab-ci.yml | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3038e39f..cc36abc6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,10 +1,30 @@ -image: "scorpil/rust:nightly" +stages: + - build + - test -before_script: -- apt-get update -yqq -- apt-get install -yqq --no-install-recommends build-essential libssl-dev pkg-config +variables: + FEATURES: "" -test:cargo: +rust-latest-build: + stage: build + image: rust:latest script: - - rustc --version && cargo --version - - cargo test --verbose --jobs 1 --release + - cargo build --verbose --no-default-features --features=$FEATURES + +rust-nightly-build: + stage: build + image: rustlang/rust:nightly + script: + - cargo build --verbose --no-default-features --features=$FEATURES + +rust-latest-test: + stage: test + image: rust:latest + script: + - cargo test --verbose --no-default-features --features=$FEATURES + +rust-nightly-test: + stage: test + image: rustlang/rust:nightly + script: + - cargo test --verbose --no-default-features --features=$FEATURES