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 | a1947f0 | 2020-07-09 22:29:39 +0200 | [diff] [blame] | 25 | echo "$(cat VERSION) (git-$(git rev-parse HEAD | cut -b -10))" >> install/VERSION |
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/ |
Tomeu Vizoso | 7d5f4d3 | 2020-08-05 10:17:26 +0200 | [diff] [blame] | 29 | cp -Rp .gitlab-ci/traces*.yml install/ |
Tomeu Vizoso | 92f3c51 | 2020-03-24 12:58:30 +0100 | [diff] [blame] | 30 | cp -Rp .gitlab-ci/tracie install/ |
| 31 | cp -Rp .gitlab-ci/tracie-runner-gl.sh install/ |
| 32 | cp -Rp .gitlab-ci/tracie-runner-vk.sh install/ |
| 33 | cp -Rp .gitlab-ci/fossils.yml install/ |
| 34 | cp -Rp .gitlab-ci/fossils install/ |
| 35 | cp -Rp .gitlab-ci/fossilize-runner.sh install/ |
| 36 | cp -Rp .gitlab-ci/deqp-runner.sh install/ |
Eric Anholt | 30da82c | 2020-08-19 10:30:12 -0700 | [diff] [blame] | 37 | cp -Rp .gitlab-ci/deqp-*.txt install/ |
Michel Dänzer | 59fcb01 | 2019-10-23 18:42:53 +0200 | [diff] [blame] | 38 | |
| 39 | # Tar up the install dir so that symlinks and hardlinks aren't each |
| 40 | # packed separately in the zip file. |
Tomeu Vizoso | 92f3c51 | 2020-03-24 12:58:30 +0100 | [diff] [blame] | 41 | mkdir -p artifacts/ |
Michel Dänzer | 59fcb01 | 2019-10-23 18:42:53 +0200 | [diff] [blame] | 42 | tar -cf artifacts/install.tar install |
Tomeu Vizoso | 22d9764 | 2019-12-17 11:50:14 +0100 | [diff] [blame] | 43 | |
Tomeu Vizoso | dcd171f | 2020-04-01 13:07:46 +0200 | [diff] [blame] | 44 | if [ -n "$UPLOAD_FOR_LAVA" ]; then |
Eric Anholt | 985343e | 2020-01-30 15:20:35 -0800 | [diff] [blame] | 45 | # Pass needed files to the test stage |
| 46 | cp $CI_PROJECT_DIR/.gitlab-ci/generate_lava.py artifacts/. |
| 47 | cp $CI_PROJECT_DIR/.gitlab-ci/lava-deqp.yml.jinja2 artifacts/. |
Rohan Garg | 087be7e | 2020-01-28 15:19:53 +0100 | [diff] [blame] | 48 | cp $CI_PROJECT_DIR/.gitlab-ci/lava-tracie.yml.jinja2 artifacts/. |
Tomeu Vizoso | dcd171f | 2020-04-01 13:07:46 +0200 | [diff] [blame] | 49 | |
| 50 | gzip -c artifacts/install.tar > mesa-${DEBIAN_ARCH}.tar.gz |
Tomeu Vizoso | dcd171f | 2020-04-01 13:07:46 +0200 | [diff] [blame] | 51 | MINIO_PATH=minio-packet.freedesktop.org/artifacts/${CI_PROJECT_PATH}/${CI_PIPELINE_ID} |
Tomeu Vizoso | e933ac2 | 2020-07-30 11:09:38 +0200 | [diff] [blame] | 52 | ci-fairy minio login $CI_JOB_JWT |
Tomeu Vizoso | dcd171f | 2020-04-01 13:07:46 +0200 | [diff] [blame] | 53 | 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] | 54 | fi |