From bd1adb266771c7272e9b01edc9c8a5298a6c44de Mon Sep 17 00:00:00 2001 From: Alam Ed Arias <alam@srb2.org> Date: Thu, 12 Oct 2023 04:22:15 +0000 Subject: [PATCH] Update .gitlab-ci.yml file inline the script to setup ccache should be done in one line? --- .gitlab-ci.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 88872359f4..5c1f4a3ee6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,6 +21,9 @@ stages: # List of stages for jobs, and their order of execution - build +.default_Scripts: &ccache + export CCACHE_BASEDIR="$PWD";export CCACHE_DIR="$PWD/ccache";export CCACHE_COMPILERCHECK=content + .job_template: &job_build # This job runs in the build stage, which runs first. stage: build image: debian:stable-slim @@ -45,20 +48,13 @@ stages: # List of stages for jobs, and their order of execution - mkdir --parents --verbose $APT_CACHE_DIR/partial/ - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev git libopenmpt-dev gettext ccache mingw-w64 - apt-get --option dir::cache::archives="$APT_CACHE_DIR" autoclean - - export CCACHE_BASEDIR="$PWD" - - export CCACHE_DIR="$PWD/ccache" + - *ccache - ccache --zero-stats || true - ccache --show-stats || true after_script: - - export CCACHE_BASEDIR="$PWD" - - export CCACHE_DIR="$PWD/ccache" + - *ccache - ccache --show-stats -.default_Scripts: &ccache - - export CCACHE_BASEDIR="$PWD" - - export CCACHE_DIR="$PWD/ccache" - - export CCACHE_COMPILERCHECK=content - build-x86_64-linux-gnu: <<: *job_build artifacts: -- GitLab