ci: Move container files into their own dir
[platform/upstream/mesa.git] / .gitlab-ci / container / build-deqp.sh
1 #!/bin/bash
2
3 set -ex
4
5 git config --global user.email "mesa@example.com"
6 git config --global user.name "Mesa CI"
7 git clone \
8     https://github.com/KhronosGroup/VK-GL-CTS.git \
9     -b vulkan-cts-1.2.5.0 \
10     --depth 1 \
11     /VK-GL-CTS
12 pushd /VK-GL-CTS
13
14 # --insecure is due to SSL cert failures hitting sourceforge for zlib and
15 # libpng (sigh).  The archives get their checksums checked anyway, and git
16 # always goes through ssh or https.
17 python3 external/fetch_sources.py --insecure
18
19 mkdir -p /deqp
20
21 # Save the testlog stylesheets:
22 cp doc/testlog-stylesheet/testlog.{css,xsl} /deqp
23 popd
24
25 pushd /deqp
26 cmake -S /VK-GL-CTS -B . -G Ninja \
27       -DDEQP_TARGET=${DEQP_TARGET:-x11_glx} \
28       -DCMAKE_BUILD_TYPE=Release \
29       $EXTRA_CMAKE_ARGS
30 ninja
31
32 # Copy out the mustpass lists we want.
33 mkdir /deqp/mustpass
34 cp /VK-GL-CTS/external/vulkancts/mustpass/master/vk-default.txt \
35    /deqp/mustpass/vk-master.txt
36
37 cp \
38     /deqp/external/openglcts/modules/gl_cts/data/mustpass/gles/aosp_mustpass/3.2.6.x/*.txt \
39     /deqp/mustpass/.
40 cp \
41     /deqp/external/openglcts/modules/gl_cts/data/mustpass/gl/khronos_mustpass/4.6.1.x/*-master.txt \
42     /deqp/mustpass/.
43
44 # Save *some* executor utils, but otherwise strip things down
45 # to reduct deqp build size:
46 mkdir /deqp/executor.save
47 cp /deqp/executor/testlog-to-* /deqp/executor.save
48 rm -rf /deqp/executor
49 mv /deqp/executor.save /deqp/executor
50
51 rm -rf /deqp/external/openglcts/modules/gl_cts/data/mustpass
52 rm -rf /deqp/external/openglcts/modules/cts-runner
53 rm -rf /deqp/modules/internal
54 rm -rf /deqp/execserver
55 rm -rf /deqp/modules/egl
56 rm -rf /deqp/framework
57 find -iname '*cmake*' -o -name '*ninja*' -o -name '*.o' -o -name '*.a' | xargs rm -rf
58 ${STRIP_CMD:-strip} external/vulkancts/modules/vulkan/deqp-vk
59 ${STRIP_CMD:-strip} external/openglcts/modules/glcts
60 ${STRIP_CMD:-strip} modules/*/deqp-*
61 du -sh *
62 rm -rf /VK-GL-CTS
63 popd