diff options
Diffstat (limited to '.gitlab-ci/prepare-artifacts.sh')
-rwxr-xr-x | .gitlab-ci/prepare-artifacts.sh | 29 |
1 files changed, 29 insertions, 0 deletions
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 |