mesa/.gitlab-ci/container/x86_test-gl.sh

98 lines
1.8 KiB
Bash
Raw Normal View History

#!/bin/bash
set -e
set -o xtrace
export DEBIAN_FRONTEND=noninteractive
# Ephemeral packages (installed for this script and removed again at the end)
STABLE_EPHEMERAL=" \
autoconf \
automake \
ccache \
clang-10 \
cmake \
g++ \
libclang-cpp10-dev \
libgbm-dev \
libgles2-mesa-dev \
libpcre3-dev \
libpciaccess-dev \
libpng-dev \
ci: Use cts_runner for our dEQP runs. This runner is a little project by Bas, written in C++, that spawns threads that then loop grabbing chunks of the (randomly shuffled but consistently so) test list and hand it to a dEQP instance. As the remaining list gets shorter, so do the chunks, so hopefully the threads all complete effectively at once. It also handles restarting after crashes automatically. I've extended the runner a bit to do what I was doing in the bash scripts before, like the skip list and expected failures handling. This project should also be a good baseline for extending to handle retesting of intermittent failures. By switching to it, we can have the swrast tests just take up one job slot on the shared runners and keep their allotment of CPUs busy, instead of taking up job slots with single-threaded dEQP jobs. It will also let us (eventually, once I reprovision) switch the freedreno runners over to threading within the job instead of running concurrent jobs, so that memory scribbles in one pipeline don't affect unrelated pipelines, and I can experiment with their parallelism (particularly on a306 where we are frequently backed up) without trashing other people's jobs. What we lose in this process is per-test output in the log (not a big loss, I think, since we summarize fails at the end and reducing log length keeps chrome from choking on our logs so badly). We also drop the renderer sanity checking, since it's not saving qpa files for us to go poke through. Given that all the drivers involved have fail lists, if we got the wrong renderer somehow, we'd get a job failure anyway. v2: Rebase on droppong of the autoscale cluster and the arm64 build/test split. Use a script to deduplicate the cts-runner build. v3: Rebase on the amd64 build/test container split. Acked-by: Daniel Stone <daniels@collabora.com> (v1) Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> (v2)
2019-11-04 18:54:41 +00:00
libvulkan-dev \
libwaffle-dev \
libxcb-keysyms1-dev \
libxkbcommon-dev \
libxrender-dev \
llvm-10-dev \
make \
meson \
ocl-icd-opencl-dev \
patch \
pkg-config \
python3-distutils \
python3.7-dev \
wget \
xz-utils \
"
apt-get install -y --no-remove \
$STABLE_EPHEMERAL \
clinfo \
libclang-common-10-dev \
libclang-cpp10 \
libxcb-shm0 \
ocl-icd-libopencl1 \
python3-lxml \
python3-simplejson
. .gitlab-ci/container/container_pre_build.sh
############### Build spirv-tools (debian too old)
. .gitlab-ci/build-spirv-tools.sh
############### Build libclc
. .gitlab-ci/build-libclc.sh
############### Build virglrenderer
. .gitlab-ci/build-virglrenderer.sh
############### Build piglit
INCLUDE_OPENCL_TESTS=1 . .gitlab-ci/build-piglit.sh
ci/deqp: Switch to a new dEQP runner written in Rust. I found the C++ runner hard to develop on, and we had stability issues and outstanding feature needs that made me want something I felt good about hacking on. Thus, Rewrite It In Rust of the deqp runner. The new runner includes: - Skip lists don't reshuffle the test list. - Known-flake handling without resorting to skip lists (fixing our main CI reliability issue on a3xx right now). - Per-thread Vulkan shader caches should speed up VK CI runtime. - Tracking of crashes separate from fails (so we can see progress on that front). - Logging of deqp stderr spam (particularly assertion failures!) in the CI log. - Integrated QPA filtering so we don't have bash perf issues for it. - Logging of what caselist to go look at for a given error report (in red, so it's easier to find in your CI log). - The code is 1/3 unit tests, and easy to extend for more coverage. - Non-LAVA CI runs create a failures.csv in artifacts that you can check in as your deqp-*-fails.txt file. - Test runtime is included in results.csv so you can debug how to speed up your CI job. - Pretty summary at the end of the run of slow/flaky/failed tests. Since this is a new runner with a different RNG, the test groups are shuffled one more time. This seems to result in some panfrost T720 stability issues (See its new deqp-panfrost-t720-flakes.txt), and one new flake in freedreno a630. Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7434>
2020-10-29 17:29:28 +00:00
############### Build dEQP runner (and install rust temporarily for it)
. .gitlab-ci/build-rust.sh
. .gitlab-ci/build-deqp-runner.sh
rm -rf /root/.rustup /root/.cargo
ci: Use cts_runner for our dEQP runs. This runner is a little project by Bas, written in C++, that spawns threads that then loop grabbing chunks of the (randomly shuffled but consistently so) test list and hand it to a dEQP instance. As the remaining list gets shorter, so do the chunks, so hopefully the threads all complete effectively at once. It also handles restarting after crashes automatically. I've extended the runner a bit to do what I was doing in the bash scripts before, like the skip list and expected failures handling. This project should also be a good baseline for extending to handle retesting of intermittent failures. By switching to it, we can have the swrast tests just take up one job slot on the shared runners and keep their allotment of CPUs busy, instead of taking up job slots with single-threaded dEQP jobs. It will also let us (eventually, once I reprovision) switch the freedreno runners over to threading within the job instead of running concurrent jobs, so that memory scribbles in one pipeline don't affect unrelated pipelines, and I can experiment with their parallelism (particularly on a306 where we are frequently backed up) without trashing other people's jobs. What we lose in this process is per-test output in the log (not a big loss, I think, since we summarize fails at the end and reducing log length keeps chrome from choking on our logs so badly). We also drop the renderer sanity checking, since it's not saving qpa files for us to go poke through. Given that all the drivers involved have fail lists, if we got the wrong renderer somehow, we'd get a job failure anyway. v2: Rebase on droppong of the autoscale cluster and the arm64 build/test split. Use a script to deduplicate the cts-runner build. v3: Rebase on the amd64 build/test container split. Acked-by: Daniel Stone <daniels@collabora.com> (v1) Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> (v2)
2019-11-04 18:54:41 +00:00
############### Build dEQP GL
DEQP_TARGET=surfaceless . .gitlab-ci/build-deqp.sh
############### Build apitrace
. .gitlab-ci/build-apitrace.sh
############### Build renderdoc
. .gitlab-ci/build-renderdoc.sh
############### Build libdrm
. .gitlab-ci/build-libdrm.sh
############### Uninstall the build software
ccache --show-stats
apt-get purge -y \
$STABLE_EPHEMERAL
apt-get autoremove -y --purge