summaryrefslogtreecommitdiff
path: root/.gitlab/ci/test-docker.sh
blob: f99a25c8cde93958fd1956d6c15f52bd8a7266eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash

set -e

builddir=$(mktemp -d build_XXXXXX)
srcdir=$(pwd)

mkdir -p _ccache
export CCACHE_BASEDIR="$(pwd)"
export CCACHE_DIR="${CCACHE_BASEDIR}/_ccache"

ccache --zero-stats
ccache --show-stats

# Disable ccache while running Meson, to avoid cached compiler tests
export CCACHE_DISABLE=true
meson ${BUILD_OPTS} ${builddir} ${srcdir} || exit $?
unset CCACHE_DISABLE

cd ${builddir}

ninja || exit $?

cd ..

rm -rf ${builddir}

ccache --show-stats