From 5dd57982785aa995652bea678654be19ae5540ec Mon Sep 17 00:00:00 2001 From: Jacob Lifshay Date: Wed, 20 Jul 2022 20:28:34 -0700 Subject: [PATCH] add gitlab ci --- .gitlab-ci.yml | 26 ++++++++++++++++++++++++++ install-deps.sh | 4 ++-- 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..cf64cf2 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,26 @@ +image: debian:10 + +cache: + when: always + paths: + - ccache + +build: + stage: build + before_script: + - apt-get update + # one package per line to simplify sorting, git diff, etc. + - >- + apt-get -y install + ccache + git + make + sudo + - export PATH="/usr/lib/ccache:$PATH" + - export CCACHE_BASEDIR="$PWD" + - export CCACHE_DIR="$PWD/ccache" + - export CCACHE_COMPILERCHECK=content + - ccache --zero-stats || true + - ccache --show-stats || true + script: + - make -j$(nproc) \ No newline at end of file diff --git a/install-deps.sh b/install-deps.sh index 11a9dd5..ab9af62 100755 --- a/install-deps.sh +++ b/install-deps.sh @@ -6,7 +6,7 @@ if [[ "$arches" == "" ]]; then fi # need to install g++ first so the local arch will get filtered out later -which g++ > /dev/null || (set -x; sudo apt-get install build-essential g++) +which g++ > /dev/null || (set -x; sudo apt-get install -y build-essential g++) needed=() @@ -32,5 +32,5 @@ which cmake > /dev/null || needed+=(cmake) which ccache > /dev/null || needed+=(ccache) if ((${#needed[@]})); then - (set -x; sudo apt-get install "${needed[@]}") + (set -x; sudo apt-get install -y "${needed[@]}") fi -- 2.30.2