From 0ecc8dd0c31412204fb1ac97e49504aa3ee77caa Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Thu, 20 Jun 2019 17:05:37 -0700 Subject: try caching/globals in gitlab-ci --- .gitlab-ci.yml | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d8724581..f64e864c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,10 +1,21 @@ +cache: + key: "${CI_COMMIT_REF_SLUG}" + paths: + - python/.venv/ + - rust/target/ + - rust/.cargo_cache/ + +variables: + LC_ALL: "C.UTF-8" + LANG: "C.UTF-8" + PIPENV_VENV_IN_PROJECT: "true" + CARGO_HOME: ".cargo_cache" + +image: "rust:1.32-stretch" + unified_test: - image: "rust:1.32-stretch" variables: - LC_ALL: "C.UTF-8" - LANG: "C.UTF-8" - PIPENV_VENV_IN_PROJECT: "true" POSTGRES_DB: "fatcat_test" POSTGRES_USER: "fatcat_user" POSTGRES_PASSWORD: "fatcat_pw" @@ -13,9 +24,9 @@ unified_test: services: - "postgres:11" before_script: - - cargo install diesel_cli --version 1.3.1 - apt update -qy - apt install -y python3-dev python3-pip python3-wheel python3-requests python3-six python3-pytest libsnappy-dev libsodium-dev + - cargo install diesel_cli --version 1.3.1 - pip3 install pipenv - pipenv --version script: @@ -39,10 +50,6 @@ unified_test: rust_build_release: stage: build when: manual - image: "rust:1.32-stretch" - variables: - LC_ALL: "C.UTF-8" - LANG: "C.UTF-8" before_script: - apt update -qy - apt install -y python3-dev python3-pip python3-wheel python3-requests python3-six python3-pytest libsnappy-dev libsodium-dev @@ -58,11 +65,6 @@ rust_build_release: python_build_release: stage: build when: manual - image: "rust:1.32-stretch" - variables: - LC_ALL: "C.UTF-8" - LANG: "C.UTF-8" - PIPENV_VENV_IN_PROJECT: "true" before_script: - apt update -qy - apt install -y python3-dev python3-pip python3-wheel python3-requests python3-six python3-pytest libsnappy-dev libsodium-dev -- cgit v1.2.3