From 11a1961b57d203a1f9328e96db9c7e0099c0fd77 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 23 May 2018 18:01:26 +0100 Subject: 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. --- .gitlab/ci/run-docker.sh | 2 +- .gitlab/ci/test-docker.sh | 15 +++++++++++---- 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 -- cgit v1.2.1