~mmach/netext73/mesa_2004

« back to all changes in this revision

Viewing changes to .gitlab-ci/prepare-artifacts.sh

  • Committer: mmach
  • Date: 2021-07-04 19:28:58 UTC
  • Revision ID: netbit73@gmail.com-20210704192858-3dzjz3h2a015l3mq
2021-07-04 21:20:24

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/bash
2
 
 
3
 
set -e
4
 
set -o xtrace
5
 
 
6
 
CROSS_FILE=/cross_file-"$CROSS".txt
7
 
 
8
 
# Delete unused bin and includes from artifacts to save space.
9
 
rm -rf install/bin install/include
10
 
 
11
 
# Strip the drivers in the artifacts to cut 80% of the artifacts size.
12
 
if [ -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
18
 
else
19
 
    STRIP="strip"
20
 
fi
21
 
if [ -z "$ARTIFACTS_DEBUG_SYMBOLS"]; then
22
 
    find install -name \*.so -exec $STRIP {} \;
23
 
fi
24
 
 
25
 
# Test runs don't pull down the git tree, so put the dEQP helper
26
 
# script and associated bits there.
27
 
echo "$(cat VERSION) (git-$(git rev-parse HEAD | cut -b -10))" >> install/VERSION
28
 
cp -Rp .gitlab-ci/bare-metal install/
29
 
cp -Rp .gitlab-ci/piglit install/
30
 
cp -Rp .gitlab-ci/fossils.yml install/
31
 
cp -Rp .gitlab-ci/fossils install/
32
 
cp -Rp .gitlab-ci/fossilize-runner.sh install/
33
 
cp -Rp .gitlab-ci/deqp-runner.sh install/
34
 
cp -Rp .gitlab-ci/deqp-*.txt install/
35
 
find . -path \*/ci/\*.txt \
36
 
    -o -path \*/ci/\*traces\*.yml \
37
 
    | xargs -I '{}' cp -p '{}' install/
38
 
 
39
 
# Tar up the install dir so that symlinks and hardlinks aren't each
40
 
# packed separately in the zip file.
41
 
mkdir -p artifacts/
42
 
tar -cf artifacts/install.tar install
43
 
 
44
 
if [ -n "$MINIO_ARTIFACT_NAME" ]; 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.yml.jinja2 artifacts/.
48
 
 
49
 
    MINIO_ARTIFACT_NAME="$MINIO_ARTIFACT_NAME.tar.gz"
50
 
    gzip -c artifacts/install.tar > ${MINIO_ARTIFACT_NAME}
51
 
    MINIO_PATH=${MINIO_HOST}/artifacts/${CI_PROJECT_PATH}/${CI_PIPELINE_ID}
52
 
    ci-fairy minio login $CI_JOB_JWT
53
 
    ci-fairy minio cp ${MINIO_ARTIFACT_NAME} minio://${MINIO_PATH}/${MINIO_ARTIFACT_NAME}
54
 
fi