blob: a6328ab5f80ec4fe20ec36540320ca24f88af70d [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 Vizosoa1947f02020-07-09 22:29:39 +020025echo "$(cat VERSION) (git-$(git rev-parse HEAD | cut -b -10))" >> install/VERSION
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/
Tomeu Vizoso7d5f4d32020-08-05 10:17:26 +020029cp -Rp .gitlab-ci/traces*.yml install/
Tomeu Vizoso92f3c512020-03-24 12:58:30 +010030cp -Rp .gitlab-ci/tracie install/
31cp -Rp .gitlab-ci/tracie-runner-gl.sh install/
32cp -Rp .gitlab-ci/tracie-runner-vk.sh install/
33cp -Rp .gitlab-ci/fossils.yml install/
34cp -Rp .gitlab-ci/fossils install/
35cp -Rp .gitlab-ci/fossilize-runner.sh install/
36cp -Rp .gitlab-ci/deqp-runner.sh install/
Eric Anholt30da82c2020-08-19 10:30:12 -070037cp -Rp .gitlab-ci/deqp-*.txt install/
Michel Dänzer59fcb012019-10-23 18:42:53 +020038
39# Tar up the install dir so that symlinks and hardlinks aren't each
40# packed separately in the zip file.
Tomeu Vizoso92f3c512020-03-24 12:58:30 +010041mkdir -p artifacts/
Michel Dänzer59fcb012019-10-23 18:42:53 +020042tar -cf artifacts/install.tar install
Tomeu Vizoso22d97642019-12-17 11:50:14 +010043
Tomeu Vizosodcd171f2020-04-01 13:07:46 +020044if [ -n "$UPLOAD_FOR_LAVA" ]; then
Eric Anholt985343e2020-01-30 15:20:35 -080045 # 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 Garg087be7e2020-01-28 15:19:53 +010048 cp $CI_PROJECT_DIR/.gitlab-ci/lava-tracie.yml.jinja2 artifacts/.
Tomeu Vizosodcd171f2020-04-01 13:07:46 +020049
50 gzip -c artifacts/install.tar > mesa-${DEBIAN_ARCH}.tar.gz
Tomeu Vizosodcd171f2020-04-01 13:07:46 +020051 MINIO_PATH=minio-packet.freedesktop.org/artifacts/${CI_PROJECT_PATH}/${CI_PIPELINE_ID}
Tomeu Vizosoe933ac22020-07-30 11:09:38 +020052 ci-fairy minio login $CI_JOB_JWT
Tomeu Vizosodcd171f2020-04-01 13:07:46 +020053 ci-fairy minio cp mesa-${DEBIAN_ARCH}.tar.gz minio://${MINIO_PATH}/mesa-${DEBIAN_ARCH}.tar.gz
Tomeu Vizoso22d97642019-12-17 11:50:14 +010054fi