1#!/bin/bash 2 3set -e 4set -o xtrace 5 6CROSS_FILE=/cross_file-"$CROSS".txt 7 8# Delete unused bin and includes from artifacts to save space. 9rm -rf install/bin install/include 10 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. 25echo "$(cat VERSION) (git-$(git rev-parse HEAD | cut -b -10))" >> install/VERSION 26cp -Rp .gitlab-ci/bare-metal install/ 27cp -Rp .gitlab-ci/deqp* install/ 28cp -Rp .gitlab-ci/piglit install/ 29cp -Rp .gitlab-ci/traces*.yml install/ 30cp -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/ 37cp -Rp .gitlab-ci/deqp-*.txt install/ 38 39# Tar up the install dir so that symlinks and hardlinks aren't each 40# packed separately in the zip file. 41mkdir -p artifacts/ 42tar -cf artifacts/install.tar install 43 44if [ -n "$UPLOAD_FOR_LAVA" ]; then 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/. 48 cp $CI_PROJECT_DIR/.gitlab-ci/lava-tracie.yml.jinja2 artifacts/. 49 50 gzip -c artifacts/install.tar > mesa-${DEBIAN_ARCH}.tar.gz 51 MINIO_PATH=minio-packet.freedesktop.org/artifacts/${CI_PROJECT_PATH}/${CI_PIPELINE_ID} 52 ci-fairy minio login $CI_JOB_JWT 53 ci-fairy minio cp mesa-${DEBIAN_ARCH}.tar.gz minio://${MINIO_PATH}/mesa-${DEBIAN_ARCH}.tar.gz 54fi 55