2019-10-23 17:42:53 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
set -o xtrace
|
|
|
|
|
2019-12-17 10:50:14 +00:00
|
|
|
CROSS_FILE=/cross_file-"$CROSS".txt
|
|
|
|
|
2019-11-06 18:58:19 +00:00
|
|
|
# Delete unused bin and includes from artifacts to save space.
|
|
|
|
rm -rf install/bin install/include
|
2019-10-23 17:42:53 +01:00
|
|
|
|
|
|
|
# Strip the drivers in the artifacts to cut 80% of the artifacts size.
|
|
|
|
if [ -n "$CROSS" ]; then
|
|
|
|
STRIP=`sed -n -E "s/strip\s*=\s*'(.*)'/\1/p" "$CROSS_FILE"`
|
|
|
|
if [ -z "$STRIP" ]; then
|
|
|
|
echo "Failed to find strip command in cross file"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
STRIP="strip"
|
|
|
|
fi
|
2021-08-26 14:00:40 +01:00
|
|
|
if [ -z "$ARTIFACTS_DEBUG_SYMBOLS" ]; then
|
2021-01-14 17:56:52 +00:00
|
|
|
find install -name \*.so -exec $STRIP {} \;
|
|
|
|
fi
|
2019-10-23 17:42:53 +01:00
|
|
|
|
|
|
|
# Test runs don't pull down the git tree, so put the dEQP helper
|
|
|
|
# script and associated bits there.
|
2021-05-05 08:10:44 +01:00
|
|
|
echo "$(cat VERSION) (git-$(git rev-parse HEAD | cut -b -10))" > install/VERSION
|
2020-06-08 23:36:16 +01:00
|
|
|
cp -Rp .gitlab-ci/bare-metal install/
|
2021-04-22 23:51:56 +01:00
|
|
|
cp -Rp .gitlab-ci/common install/
|
2020-03-24 11:58:30 +00:00
|
|
|
cp -Rp .gitlab-ci/piglit install/
|
|
|
|
cp -Rp .gitlab-ci/fossils.yml install/
|
|
|
|
cp -Rp .gitlab-ci/fossils install/
|
|
|
|
cp -Rp .gitlab-ci/fossilize-runner.sh install/
|
2021-02-04 14:14:26 +00:00
|
|
|
cp -Rp .gitlab-ci/crosvm-init.sh install/
|
2021-10-25 18:27:10 +01:00
|
|
|
cp -Rp .gitlab-ci/*.txt install/
|
2021-05-26 18:45:33 +01:00
|
|
|
cp -Rp .gitlab-ci/report-flakes.py install/
|
2021-05-18 14:54:54 +01:00
|
|
|
cp -Rp .gitlab-ci/vkd3d-proton install/
|
2021-10-08 21:17:27 +01:00
|
|
|
cp -Rp .gitlab-ci/*-runner.sh install/
|
2021-02-19 17:31:38 +00:00
|
|
|
find . -path \*/ci/\*.txt \
|
2021-07-21 21:12:29 +01:00
|
|
|
-o -path \*/ci/\*.toml \
|
2021-02-19 17:31:38 +00:00
|
|
|
-o -path \*/ci/\*traces\*.yml \
|
|
|
|
| xargs -I '{}' cp -p '{}' install/
|
2019-10-23 17:42:53 +01:00
|
|
|
|
|
|
|
# Tar up the install dir so that symlinks and hardlinks aren't each
|
|
|
|
# packed separately in the zip file.
|
2020-03-24 11:58:30 +00:00
|
|
|
mkdir -p artifacts/
|
2019-10-23 17:42:53 +01:00
|
|
|
tar -cf artifacts/install.tar install
|
2021-06-10 17:00:32 +01:00
|
|
|
cp -Rp .gitlab-ci/common artifacts/ci-common
|
2021-06-10 11:10:10 +01:00
|
|
|
cp -Rp .gitlab-ci/lava artifacts/
|
2022-02-17 09:49:32 +00:00
|
|
|
cp -Rp .gitlab-ci/valve artifacts/
|
2019-12-17 10:50:14 +00:00
|
|
|
|
2021-02-15 20:35:41 +00:00
|
|
|
if [ -n "$MINIO_ARTIFACT_NAME" ]; then
|
2020-01-30 23:20:35 +00:00
|
|
|
# Pass needed files to the test stage
|
2021-02-15 20:35:41 +00:00
|
|
|
MINIO_ARTIFACT_NAME="$MINIO_ARTIFACT_NAME.tar.gz"
|
|
|
|
gzip -c artifacts/install.tar > ${MINIO_ARTIFACT_NAME}
|
2021-12-02 13:13:10 +00:00
|
|
|
ci-fairy minio login --token-file "${CI_JOB_JWT_FILE}"
|
2021-06-10 16:24:48 +01:00
|
|
|
ci-fairy minio cp ${MINIO_ARTIFACT_NAME} minio://${PIPELINE_ARTIFACTS_BASE}/${MINIO_ARTIFACT_NAME}
|
2019-12-17 10:50:14 +00:00
|
|
|
fi
|