From 546199edc41aec88e1537fe43a1699daa4259a3f Mon Sep 17 00:00:00 2001 From: ddorgan <david@peersystems.co.uk> Date: Wed, 3 Oct 2018 15:22:04 +0100 Subject: [PATCH] Initial .gitlab-ci.yml build file (#5) * Initial .gitlab-ci.yml build file * Update artifact binary name * Add back --release flag * Make sure rust toolchain is stable by default * Remove debug info * Rename test job names to address grumbles * Remove artifact collection --- .gitlab-ci.yml | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 00000000..71c7828e --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,48 @@ +stages: + - test + - build + +image: parity/rust:nightly + +variables: + CI_SERVER_NAME: "GitLab CI" + CARGO_HOME: "${CI_PROJECT_DIR}/.cargo" + RUST_TOOLCHAIN: "stable" + +cache: + key: "${CI_JOB_NAME}" + paths: + - ./target/ + - ./.cargo/ + + +before_script: + - ./scripts/init.sh + - export PATH="${CI_PROJECT_DIR}/cargo/bin/:$PATH" + - ./scripts/build.sh + + +#### stage: test + +test-rust-stable: + stage: test + script: + - time cargo test --all --release --locked + only: + - triggers + - tags + - master + - schedules + - web + tags: + - rust-stable + + +#### stage: build + +build-linux: + stage: build + script: + - cargo build --release + tags: + - rust-stable -- GitLab