summaryrefslogtreecommitdiff
path: root/.gitlab-ci/prepare-artifacts.sh
diff options
context:
space:
mode:
Diffstat (limited to '.gitlab-ci/prepare-artifacts.sh')
-rwxr-xr-x.gitlab-ci/prepare-artifacts.sh30
1 files changed, 19 insertions, 11 deletions
diff --git a/.gitlab-ci/prepare-artifacts.sh b/.gitlab-ci/prepare-artifacts.sh
index bbc37ef1419..a58cf705535 100755
--- a/.gitlab-ci/prepare-artifacts.sh
+++ b/.gitlab-ci/prepare-artifacts.sh
@@ -1,4 +1,8 @@
-#!/bin/bash
+#!/usr/bin/env bash
+# shellcheck disable=SC2038 # TODO: rewrite the find
+# shellcheck disable=SC2086 # we want word splitting
+
+section_switch prepare-artifacts "artifacts: prepare"
set -e
set -o xtrace
@@ -10,7 +14,7 @@ rm -rf install/bin install/include
# 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"`
+ 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
@@ -19,7 +23,7 @@ else
STRIP="strip"
fi
if [ -z "$ARTIFACTS_DEBUG_SYMBOLS" ]; then
- find install -name \*.so -exec $STRIP {} \;
+ find install -name \*.so -exec $STRIP --strip-debug {} \;
fi
# Test runs don't pull down the git tree, so put the dEQP helper
@@ -31,12 +35,14 @@ 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/
-cp -Rp .gitlab-ci/deqp-runner.sh install/
-cp -Rp .gitlab-ci/crosvm-runner.sh install/
cp -Rp .gitlab-ci/crosvm-init.sh install/
-cp -Rp .gitlab-ci/deqp-*.txt install/
+cp -Rp .gitlab-ci/*.txt install/
cp -Rp .gitlab-ci/report-flakes.py install/
cp -Rp .gitlab-ci/vkd3d-proton install/
+cp -Rp .gitlab-ci/setup-test-env.sh install/
+cp -Rp .gitlab-ci/*-runner.sh install/
+cp -Rp .gitlab-ci/bin/structured_logger.py install/
+cp -Rp .gitlab-ci/bin/custom_logger.py install/
find . -path \*/ci/\*.txt \
-o -path \*/ci/\*.toml \
-o -path \*/ci/\*traces\*.yml \
@@ -48,11 +54,13 @@ mkdir -p artifacts/
tar -cf artifacts/install.tar install
cp -Rp .gitlab-ci/common artifacts/ci-common
cp -Rp .gitlab-ci/lava artifacts/
+cp -Rp .gitlab-ci/b2c artifacts/
-if [ -n "$MINIO_ARTIFACT_NAME" ]; then
+if [ -n "$S3_ARTIFACT_NAME" ]; then
# Pass needed files to the test stage
- MINIO_ARTIFACT_NAME="$MINIO_ARTIFACT_NAME.tar.gz"
- gzip -c artifacts/install.tar > ${MINIO_ARTIFACT_NAME}
- ci-fairy minio login $CI_JOB_JWT
- ci-fairy minio cp ${MINIO_ARTIFACT_NAME} minio://${PIPELINE_ARTIFACTS_BASE}/${MINIO_ARTIFACT_NAME}
+ S3_ARTIFACT_NAME="$S3_ARTIFACT_NAME.tar.zst"
+ zstd artifacts/install.tar -o ${S3_ARTIFACT_NAME}
+ ci-fairy s3cp --token-file "${CI_JOB_JWT_FILE}" ${S3_ARTIFACT_NAME} https://${PIPELINE_ARTIFACTS_BASE}/${S3_ARTIFACT_NAME}
fi
+
+section_end prepare-artifacts