From 2a3db4ec7b62445864df016cb499f9bbb05baa1c Mon Sep 17 00:00:00 2001 From: Luke Anderson Date: Thu, 2 May 2019 15:15:16 +1000 Subject: [PATCH] Added a first attempt at a gitlab-ci.yml file. --- .gitlab-ci.yml | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000..dc6cdace1c --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,41 @@ +#Adapted from https://users.rust-lang.org/t/my-gitlab-config-docs-tests/16396 + +image: 'rust:latest' + +stages: + - test + - doc + - build + +variables: + CARGO_HOME: $CI_PROJECT_DIR/cargo + APT_CACHE_DIR: $CI_PROJECT_DIR/apt + +before_script: + - apt-get update -yq + - apt-get install -o dir::cache::archives="$APT_CACHE_DIR" -y clang libclang-dev cmake build-essential git unzip autoconf libtool + +test: + stage: test + script: + - rustc --version + - cargo --version + - cargo test --verbose + +pages: + stage: doc + script: + - cargo doc --no-deps + - mv target/doc public + # - echo '' > public/index.html + artifacts: + paths: + - public + only: + - master + +cache: + paths: + - apt/ + - cargo/ + - target/