2022-12-11 16:46:41 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
section_switch prepare-artifacts "artifacts: prepare"
|
2019-10-23 17:42:53 +01:00
|
|
|
|
|
|
|
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
|
2022-11-26 20:29:38 +00:00
|
|
|
STRIP=$(sed -n -E "s/strip\s*=\s*\[?'(.*)'\]?/\1/p" "$CROSS_FILE")
|
2019-10-23 17:42:53 +01:00
|
|
|
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/
|
2022-06-22 12:27:18 +01:00
|
|
|
cp -Rp .gitlab-ci/valve install/
|
2021-05-18 14:54:54 +01:00
|
|
|
cp -Rp .gitlab-ci/vkd3d-proton install/
|
2023-03-03 07:53:05 +00:00
|
|
|
cp -Rp .gitlab-ci/setup-test-env.sh 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-06-22 13:36:02 +01:00
|
|
|
cp -Rp .gitlab-ci/b2c 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
|
2022-07-28 00:19:21 +01:00
|
|
|
MINIO_ARTIFACT_NAME="$MINIO_ARTIFACT_NAME.tar.zst"
|
|
|
|
zstd artifacts/install.tar -o ${MINIO_ARTIFACT_NAME}
|
2022-10-13 20:25:38 +01:00
|
|
|
ci-fairy s3cp --token-file "${CI_JOB_JWT_FILE}" ${MINIO_ARTIFACT_NAME} https://${PIPELINE_ARTIFACTS_BASE}/${MINIO_ARTIFACT_NAME}
|
2019-12-17 10:50:14 +00:00
|
|
|
fi
|
2022-12-11 16:46:41 +00:00
|
|
|
|
|
|
|
section_end prepare-artifacts
|