summaryrefslogtreecommitdiff
path: root/.gitlab
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2018-05-23 18:01:26 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2018-05-23 18:01:26 +0100
commit11a1961b57d203a1f9328e96db9c7e0099c0fd77 (patch)
tree85bc3a712d2e6efef1f26233e982a3930bd1fdc8 /.gitlab
parent7caf0595b50a5ec51358a74fdfb7b22863436c15 (diff)
downloadgdk-pixbuf-11a1961b57d203a1f9328e96db9c7e0099c0fd77.tar.gz
ci: Update the scripts
Build inside a temporary directory, and ensure that the local run-docker.sh script imports the repo inside the Docker container.
Diffstat (limited to '.gitlab')
-rwxr-xr-x.gitlab/ci/run-docker.sh2
-rwxr-xr-x.gitlab/ci/test-docker.sh15
2 files changed, 12 insertions, 5 deletions
diff --git a/.gitlab/ci/run-docker.sh b/.gitlab/ci/run-docker.sh
index 02d265a49..b2e79a1b7 100755
--- a/.gitlab/ci/run-docker.sh
+++ b/.gitlab/ci/run-docker.sh
@@ -7,5 +7,5 @@ TAG="registry.gitlab.gnome.org/gnome/gdk-pixbuf/master:v1"
sudo docker build --build-arg HOST_USER_ID="$UID" --tag "${TAG}" \
--file "Dockerfile" .
sudo docker run --rm --security-opt label=disable \
- --volume "$(pwd)/..:/home/user/app" --workdir "/home/user/app" \
+ --volume "$(pwd)/../..:/home/user/app" --workdir "/home/user/app" \
--tty --interactive "${TAG}" bash
diff --git a/.gitlab/ci/test-docker.sh b/.gitlab/ci/test-docker.sh
index 53cac9dcb..5c2ecd688 100755
--- a/.gitlab/ci/test-docker.sh
+++ b/.gitlab/ci/test-docker.sh
@@ -2,6 +2,7 @@
set -e
+builddir=$(mktemp -d build_XXXXXX)
srcdir=$(pwd)
mkdir -p _ccache
@@ -10,12 +11,18 @@ 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 $srcdir
+meson ${builddir} ${srcdir} || exit $?
unset CCACHE_DISABLE
-cd _build
+cd ${builddir}
+
+ninja || exit $?
+
+cd ..
+
+rm -rf ${builddir}
-ninja
ccache --show-stats