--- /dev/null
+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
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=()
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