From 59fcb019d02804f721477cac11fa6c23f1850ef1 Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Wed, 23 Oct 2019 18:42:53 +0200 Subject: gitlab-ci: Move artifact preparation to separate script It's currently only needed for the meson-main and meson-arm64 jobs, not the other meson build jobs. Also remove MESON_SHADERDB, just run .gitlab-ci/run-shader-db.sh directly from the meson-main job. v2: * Also run prepare-artifacts.sh in meson-arm64 script v3: * Move tarball creation into the new script as well, as it prevented ccache --show-stats from running in after_script Reviewed-by: Eric Engestrom # v1 Reviewed-by: Eric Anholt --- .gitlab-ci/meson-build.sh | 25 ------------------------- .gitlab-ci/prepare-artifacts.sh | 29 +++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 25 deletions(-) create mode 100755 .gitlab-ci/prepare-artifacts.sh (limited to '.gitlab-ci') diff --git a/.gitlab-ci/meson-build.sh b/.gitlab-ci/meson-build.sh index d56e526ef20..b618f45a2c2 100755 --- a/.gitlab-ci/meson-build.sh +++ b/.gitlab-ci/meson-build.sh @@ -62,28 +62,3 @@ ninja -j4 LC_ALL=C.UTF-8 ninja test ninja install cd .. - -if test -n "$MESON_SHADERDB"; then - ./.gitlab-ci/run-shader-db.sh; -fi - -# Delete 2MB of includes from artifacts. -rm -rf install/include - -# Strip the drivers in the artifacts to cut 80% of the artifacts size. -if [ -n "$CROSS" ]; then - STRIP=`sed -n -E "s/strip\s*=\s*'(.*)'/\1/p" "$CROSS_FILE"` - if [ -z "$STRIP" ]; then - echo "Failed to find strip command in cross file" - exit 1 - fi -else - STRIP="strip" -fi -find install -name \*.so -exec $STRIP {} \; - -# Test runs don't pull down the git tree, so put the dEQP helper -# script and associated bits there. -mkdir -p artifacts/ -cp -Rp .gitlab-ci/deqp* artifacts/ -# cp -Rp src/freedreno/ci/expected* artifacts/ diff --git a/.gitlab-ci/prepare-artifacts.sh b/.gitlab-ci/prepare-artifacts.sh new file mode 100755 index 00000000000..6df00da434e --- /dev/null +++ b/.gitlab-ci/prepare-artifacts.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +set -e +set -o xtrace + +# Delete 2MB of includes from artifacts. +rm -rf install/include + +# Strip the drivers in the artifacts to cut 80% of the artifacts size. +if [ -n "$CROSS" ]; then + STRIP=`sed -n -E "s/strip\s*=\s*'(.*)'/\1/p" "$CROSS_FILE"` + if [ -z "$STRIP" ]; then + echo "Failed to find strip command in cross file" + exit 1 + fi +else + STRIP="strip" +fi +find install -name \*.so -exec $STRIP {} \; + +# Test runs don't pull down the git tree, so put the dEQP helper +# script and associated bits there. +mkdir -p artifacts/ +cp -Rp .gitlab-ci/deqp* artifacts/ +# cp -Rp src/freedreno/ci/expected* artifacts/ + +# Tar up the install dir so that symlinks and hardlinks aren't each +# packed separately in the zip file. +tar -cf artifacts/install.tar install -- cgit v1.2.3