blob: fb7cc6306d916f51649a21452314a8ad2c83b225 [file] [log] [blame]
Michel Dänzer59fcb012019-10-23 18:42:53 +02001#!/bin/bash
2
3set -e
4set -o xtrace
5
Tomeu Vizoso22d97642019-12-17 11:50:14 +01006CROSS_FILE=/cross_file-"$CROSS".txt
7
Michel Dänzeraf684752019-11-06 19:58:19 +01008# Delete unused bin and includes from artifacts to save space.
9rm -rf install/bin install/include
Michel Dänzer59fcb012019-10-23 18:42:53 +020010
11# Strip the drivers in the artifacts to cut 80% of the artifacts size.
12if [ -n "$CROSS" ]; then
13 STRIP=`sed -n -E "s/strip\s*=\s*'(.*)'/\1/p" "$CROSS_FILE"`
14 if [ -z "$STRIP" ]; then
15 echo "Failed to find strip command in cross file"
16 exit 1
17 fi
18else
19 STRIP="strip"
20fi
21find install -name \*.so -exec $STRIP {} \;
22
23# Test runs don't pull down the git tree, so put the dEQP helper
24# script and associated bits there.
Tomeu Vizoso92f3c512020-03-24 12:58:30 +010025cp VERSION install/
Eric Anholt72fe7b92020-06-08 15:36:16 -070026cp -Rp .gitlab-ci/bare-metal install/
Tomeu Vizoso92f3c512020-03-24 12:58:30 +010027cp -Rp .gitlab-ci/deqp* install/
28cp -Rp .gitlab-ci/piglit install/
Eric Anholtb88c46f2020-06-08 14:51:59 -070029if [ -d /lava-files ]; then
30 cp -Rp .gitlab-ci/traces-baremetal.yml install/traces.yml
31else
32 cp -Rp .gitlab-ci/traces.yml install/
33fi
Tomeu Vizoso92f3c512020-03-24 12:58:30 +010034cp -Rp .gitlab-ci/tracie install/
35cp -Rp .gitlab-ci/tracie-runner-gl.sh install/
36cp -Rp .gitlab-ci/tracie-runner-vk.sh install/
37cp -Rp .gitlab-ci/fossils.yml install/
38cp -Rp .gitlab-ci/fossils install/
39cp -Rp .gitlab-ci/fossilize-runner.sh install/
40cp -Rp .gitlab-ci/deqp-runner.sh install/
41cp -Rp .gitlab-ci/deqp-*-fails.txt install/
42cp -Rp .gitlab-ci/deqp-*-skips.txt install/
Michel Dänzer59fcb012019-10-23 18:42:53 +020043
44# Tar up the install dir so that symlinks and hardlinks aren't each
45# packed separately in the zip file.
Tomeu Vizoso92f3c512020-03-24 12:58:30 +010046mkdir -p artifacts/
Michel Dänzer59fcb012019-10-23 18:42:53 +020047tar -cf artifacts/install.tar install
Tomeu Vizoso22d97642019-12-17 11:50:14 +010048
49# If the container has LAVA stuff, prepare the artifacts for LAVA jobs
Tomeu Vizosodcd171f2020-04-01 13:07:46 +020050if [ -n "$UPLOAD_FOR_LAVA" ]; then
Eric Anholt985343e2020-01-30 15:20:35 -080051 # Pass needed files to the test stage
52 cp $CI_PROJECT_DIR/.gitlab-ci/generate_lava.py artifacts/.
53 cp $CI_PROJECT_DIR/.gitlab-ci/lava-deqp.yml.jinja2 artifacts/.
Rohan Garg087be7e2020-01-28 15:19:53 +010054 cp $CI_PROJECT_DIR/.gitlab-ci/lava-tracie.yml.jinja2 artifacts/.
Tomeu Vizosodcd171f2020-04-01 13:07:46 +020055
56 gzip -c artifacts/install.tar > mesa-${DEBIAN_ARCH}.tar.gz
57 ci-fairy minio login $CI_JOB_JWT
58 MINIO_PATH=minio-packet.freedesktop.org/artifacts/${CI_PROJECT_PATH}/${CI_PIPELINE_ID}
59 ci-fairy minio cp mesa-${DEBIAN_ARCH}.tar.gz minio://${MINIO_PATH}/mesa-${DEBIAN_ARCH}.tar.gz
Tomeu Vizoso22d97642019-12-17 11:50:14 +010060fi