Michel Dänzer | 59fcb01 | 2019-10-23 18:42:53 +0200 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | set -e |
| 4 | set -o xtrace |
| 5 | |
Tomeu Vizoso | 22d9764 | 2019-12-17 11:50:14 +0100 | [diff] [blame] | 6 | CROSS_FILE=/cross_file-"$CROSS".txt |
| 7 | |
Michel Dänzer | af68475 | 2019-11-06 19:58:19 +0100 | [diff] [blame] | 8 | # Delete unused bin and includes from artifacts to save space. |
| 9 | rm -rf install/bin install/include |
Michel Dänzer | 59fcb01 | 2019-10-23 18:42:53 +0200 | [diff] [blame] | 10 | |
| 11 | # Strip the drivers in the artifacts to cut 80% of the artifacts size. |
| 12 | if [ -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 |
| 18 | else |
| 19 | STRIP="strip" |
| 20 | fi |
| 21 | find 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 Vizoso | 92f3c51 | 2020-03-24 12:58:30 +0100 | [diff] [blame] | 25 | cp VERSION install/ |
Eric Anholt | 72fe7b9 | 2020-06-08 15:36:16 -0700 | [diff] [blame] | 26 | cp -Rp .gitlab-ci/bare-metal install/ |
Tomeu Vizoso | 92f3c51 | 2020-03-24 12:58:30 +0100 | [diff] [blame] | 27 | cp -Rp .gitlab-ci/deqp* install/ |
| 28 | cp -Rp .gitlab-ci/piglit install/ |
Eric Anholt | b88c46f | 2020-06-08 14:51:59 -0700 | [diff] [blame] | 29 | if [ -d /lava-files ]; then |
| 30 | cp -Rp .gitlab-ci/traces-baremetal.yml install/traces.yml |
| 31 | else |
| 32 | cp -Rp .gitlab-ci/traces.yml install/ |
| 33 | fi |
Tomeu Vizoso | 92f3c51 | 2020-03-24 12:58:30 +0100 | [diff] [blame] | 34 | cp -Rp .gitlab-ci/tracie install/ |
| 35 | cp -Rp .gitlab-ci/tracie-runner-gl.sh install/ |
| 36 | cp -Rp .gitlab-ci/tracie-runner-vk.sh install/ |
| 37 | cp -Rp .gitlab-ci/fossils.yml install/ |
| 38 | cp -Rp .gitlab-ci/fossils install/ |
| 39 | cp -Rp .gitlab-ci/fossilize-runner.sh install/ |
| 40 | cp -Rp .gitlab-ci/deqp-runner.sh install/ |
| 41 | cp -Rp .gitlab-ci/deqp-*-fails.txt install/ |
| 42 | cp -Rp .gitlab-ci/deqp-*-skips.txt install/ |
Michel Dänzer | 59fcb01 | 2019-10-23 18:42:53 +0200 | [diff] [blame] | 43 | |
| 44 | # Tar up the install dir so that symlinks and hardlinks aren't each |
| 45 | # packed separately in the zip file. |
Tomeu Vizoso | 92f3c51 | 2020-03-24 12:58:30 +0100 | [diff] [blame] | 46 | mkdir -p artifacts/ |
Michel Dänzer | 59fcb01 | 2019-10-23 18:42:53 +0200 | [diff] [blame] | 47 | tar -cf artifacts/install.tar install |
Tomeu Vizoso | 22d9764 | 2019-12-17 11:50:14 +0100 | [diff] [blame] | 48 | |
| 49 | # If the container has LAVA stuff, prepare the artifacts for LAVA jobs |
Tomeu Vizoso | dcd171f | 2020-04-01 13:07:46 +0200 | [diff] [blame] | 50 | if [ -n "$UPLOAD_FOR_LAVA" ]; then |
Eric Anholt | 985343e | 2020-01-30 15:20:35 -0800 | [diff] [blame] | 51 | # 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 Garg | 087be7e | 2020-01-28 15:19:53 +0100 | [diff] [blame^] | 54 | cp $CI_PROJECT_DIR/.gitlab-ci/lava-tracie.yml.jinja2 artifacts/. |
Tomeu Vizoso | dcd171f | 2020-04-01 13:07:46 +0200 | [diff] [blame] | 55 | |
| 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 Vizoso | 22d9764 | 2019-12-17 11:50:14 +0100 | [diff] [blame] | 60 | fi |