Remove CI

200 files changed +0 −15306

  • − .ci-farms-disabled/.placeholder
  • − .ci-farms-disabled/anholt
  • − .ci-farms/.placeholder
  • − .ci-farms/austriancoder
  • − .ci-farms/collabora
  • − .ci-farms/igalia
  • − .ci-farms/lima
  • − .ci-farms/microsoft
  • − .ci-farms/ondracka
  • − .ci-farms/pengutronix
  • − .ci-farms/valve-kws
  • − .ci-farms/valve-mupuf
  • − .ci-farms/vmware
  • − .github/workflows/macos.yml
  • − .gitlab-ci.yml
  • − .gitlab-ci/.flake8
  • − .gitlab-ci/all-flakes.txt
  • − .gitlab-ci/all-single-thread.txt
  • − .gitlab-ci/all-skips.txt
  • − .gitlab-ci/all-slow-skips.txt
  • − .gitlab-ci/android-cts-runner.sh
  • − .gitlab-ci/android-deqp-runner.sh
  • − .gitlab-ci/android-runner.sh
  • − .gitlab-ci/android-skips.txt
  • − .gitlab-ci/angle-skips.txt
  • − .gitlab-ci/bare-metal/.editorconfig
  • − .gitlab-ci/bare-metal/bm-init.sh
  • − .gitlab-ci/bare-metal/gitlab-ci.yml
  • − .gitlab-ci/bare-metal/poe-off
  • − .gitlab-ci/bare-metal/poe-on
  • − .gitlab-ci/bare-metal/poe-powered.sh
  • − .gitlab-ci/bare-metal/poe_run.py
  • − .gitlab-ci/bare-metal/rootfs-setup.sh
  • − .gitlab-ci/bare-metal/serial_buffer.py
  • − .gitlab-ci/bin
  • − .gitlab-ci/build/gitlab-ci-inc.yml
  • − .gitlab-ci/build/gitlab-ci.yml
  • − .gitlab-ci/ci-tron/gitlab-ci.yml
  • − .gitlab-ci/common/capture-devcoredump.sh
  • − .gitlab-ci/common/init-stage1.sh
  • − .gitlab-ci/common/init-stage2.sh
  • − .gitlab-ci/common/intel-gpu-freq.sh
  • − .gitlab-ci/common/kdl.sh
  • − .gitlab-ci/common/weston.ini
  • − .gitlab-ci/common/weston.sh
  • − .gitlab-ci/conditional-build-image-tags.yml
  • − .gitlab-ci/container/alpine/gitlab-ci.yml
  • − .gitlab-ci/container/alpine/x86_64_build.sh
  • − .gitlab-ci/container/baremetal_build.sh
  • − .gitlab-ci/container/build-android-cts.sh
  • − .gitlab-ci/container/build-android-x86_64-llvm.sh
  • − .gitlab-ci/container/build-angle.sh
  • − .gitlab-ci/container/build-apitrace.sh
  • − .gitlab-ci/container/build-bindgen.sh
  • − .gitlab-ci/container/build-crosvm.sh
  • − .gitlab-ci/container/build-deqp-runner.sh
  • − .gitlab-ci/container/build-deqp.sh
  • − .gitlab-ci/container/build-directx-headers.sh
  • − .gitlab-ci/container/build-fluster.sh
  • − .gitlab-ci/container/build-fossilize.sh
  • − .gitlab-ci/container/build-gfxreconstruct.sh
  • − .gitlab-ci/container/build-kdl.sh
  • − .gitlab-ci/container/build-libclc.sh
  • − .gitlab-ci/container/build-libdrm.sh
  • − .gitlab-ci/container/build-llvm-spirv.sh
  • − .gitlab-ci/container/build-mold.sh
  • − .gitlab-ci/container/build-perfetto.sh
  • − .gitlab-ci/container/build-piglit.sh
  • − .gitlab-ci/container/build-rust.sh
  • − .gitlab-ci/container/build-shader-db.sh
  • − .gitlab-ci/container/build-skqp.sh
  • − .gitlab-ci/container/build-skqp_base.gn
  • − .gitlab-ci/container/build-va-tools.sh
  • − .gitlab-ci/container/build-vkd3d-proton.sh
  • − .gitlab-ci/container/build-vulkan-validation.sh
  • − .gitlab-ci/container/build-wayland.sh
  • − .gitlab-ci/container/build-weston.sh
  • − .gitlab-ci/container/build-xwayland.sh
  • − .gitlab-ci/container/container_job_trampoline.sh
  • − .gitlab-ci/container/container_post_build.sh
  • − .gitlab-ci/container/container_pre_build.sh
  • − .gitlab-ci/container/create-android-cross-file.sh
  • − .gitlab-ci/container/create-android-ndk-pc.sh
  • − .gitlab-ci/container/create-cross-file.sh
  • − .gitlab-ci/container/cross_build.sh
  • − .gitlab-ci/container/debian/android_build.sh
  • − .gitlab-ci/container/debian/arm32_test-base.sh
  • − .gitlab-ci/container/debian/arm32_test-gl.sh
  • − .gitlab-ci/container/debian/arm32_test-vk.sh
  • − .gitlab-ci/container/debian/arm64_build.sh
  • − .gitlab-ci/container/debian/arm64_test-android-tools.sh
  • − .gitlab-ci/container/debian/arm64_test-android.sh
  • − .gitlab-ci/container/debian/arm64_test-base.sh
  • − .gitlab-ci/container/debian/arm64_test-gl.sh
  • − .gitlab-ci/container/debian/arm64_test-vk.sh
  • − .gitlab-ci/container/debian/baremetal_arm32_test-gl.sh
  • − .gitlab-ci/container/debian/baremetal_arm64_test-gl.sh
  • − .gitlab-ci/container/debian/baremetal_arm64_test-vk.sh
  • − .gitlab-ci/container/debian/baremetal_arm_test.sh
  • − .gitlab-ci/container/debian/gitlab-ci.yml
  • − .gitlab-ci/container/debian/llvm-snapshot.gpg.key
  • − .gitlab-ci/container/debian/maybe-add-llvm-repo.sh
  • − .gitlab-ci/container/debian/ppc64el_build.sh
  • − .gitlab-ci/container/debian/riscv64_build.sh
  • − .gitlab-ci/container/debian/s390x_build.sh
  • − .gitlab-ci/container/debian/test-android.sh
  • − .gitlab-ci/container/debian/test-base.sh
  • − .gitlab-ci/container/debian/test-gl.sh
  • − .gitlab-ci/container/debian/test-vk.sh
  • − .gitlab-ci/container/debian/winehq.gpg.key
  • − .gitlab-ci/container/debian/x86_32_build.sh
  • − .gitlab-ci/container/debian/x86_64_build-base.sh
  • − .gitlab-ci/container/debian/x86_64_build.sh
  • − .gitlab-ci/container/debian/x86_64_test-android.sh
  • − .gitlab-ci/container/debian/x86_64_test-base.sh
  • − .gitlab-ci/container/debian/x86_64_test-gl.sh
  • − .gitlab-ci/container/debian/x86_64_test-video.sh
  • − .gitlab-ci/container/debian/x86_64_test-vk.sh
  • − .gitlab-ci/container/fdo_cntr_export.sh
  • − .gitlab-ci/container/fedora/gitlab-ci.yml
  • − .gitlab-ci/container/fedora/x86_64_build.sh
  • − .gitlab-ci/container/gitlab-ci-inc.yml
  • − .gitlab-ci/container/gitlab-ci.yml
  • − .gitlab-ci/container/install-meson.sh
  • − .gitlab-ci/container/install-wine-apitrace.sh
  • − .gitlab-ci/container/install-wine-dxvk.sh
  • − .gitlab-ci/container/patches/build-deqp-gl_Build-Don-t-build-Vulkan-utilities-for-GL-builds.patch
  • − .gitlab-ci/container/patches/build-perfetto-Fix-C-standard-library-build-errors-with-Debian-13.patch
  • − .gitlab-ci/container/patches/build-skqp_BUILD.gn.patch
  • − .gitlab-ci/container/patches/build-skqp_fetch_gn.patch
  • − .gitlab-ci/container/patches/build-skqp_git-sync-deps.patch
  • − .gitlab-ci/container/patches/build-skqp_gl.patch
  • − .gitlab-ci/container/patches/build-skqp_include_cstdint.patch
  • − .gitlab-ci/container/patches/build-skqp_is_clang.py.patch
  • − .gitlab-ci/container/patches/build-skqp_nima.patch
  • − .gitlab-ci/container/patches/weston-no-xwm.patch
  • − .gitlab-ci/container/setup-rootfs.sh
  • − .gitlab-ci/container/setup-wine.sh
  • − .gitlab-ci/container/strip-rootfs.sh
  • − .gitlab-ci/container/windows/gitlab-ci.yml
  • − .gitlab-ci/create-llvm-meson-wrap-file.sh
  • − .gitlab-ci/cross-xfail-ppc64el
  • − .gitlab-ci/cross-xfail-s390x
  • − .gitlab-ci/crosvm-init.sh
  • − .gitlab-ci/crosvm-runner.sh
  • − .gitlab-ci/cuttlefish-runner.sh
  • − .gitlab-ci/deqp-runner.sh
  • − .gitlab-ci/docs
  • − .gitlab-ci/download-git-cache.sh
  • − .gitlab-ci/farm-rules.yml
  • − .gitlab-ci/fossilize-runner.sh
  • − .gitlab-ci/fossils.yml
  • − .gitlab-ci/fossils/fossils.sh
  • − .gitlab-ci/fossils/query_fossils_yaml.py
  • − .gitlab-ci/image-tags.yml
  • − .gitlab-ci/lava/gitlab-ci.yml
  • − .gitlab-ci/lava/lava-submit.sh
  • − .gitlab-ci/meson/build.sh
  • − .gitlab-ci/meson/time-strace.sh
  • − .gitlab-ci/meson/time.sh
  • − .gitlab-ci/piglit/disable-vs_in.diff
  • − .gitlab-ci/piglit/piglit-traces.sh
  • − .gitlab-ci/prepare-artifacts.sh
  • − .gitlab-ci/report-flakes.py
  • − .gitlab-ci/run-pytest.sh
  • − .gitlab-ci/run-shader-db.sh
  • − .gitlab-ci/run-shellcheck.sh
  • − .gitlab-ci/run-yamllint.sh
  • − .gitlab-ci/setup-test-env.sh
  • − .gitlab-ci/test-source-dep.yml
  • − .gitlab-ci/test/gitlab-ci-inc.yml
  • − .gitlab-ci/test/gitlab-ci.yml
  • − .gitlab-ci/vkd3d-runner.sh
  • − .gitlab-ci/windows/Dockerfile_build
  • − .gitlab-ci/windows/Dockerfile_msvc
  • − .gitlab-ci/windows/Dockerfile_test
  • − .gitlab-ci/windows/README.md
  • − .gitlab-ci/windows/deqp_runner_run.ps1
  • − .gitlab-ci/windows/mesa_build.ps1
  • − .gitlab-ci/windows/mesa_container.ps1
  • − .gitlab-ci/windows/mesa_deps_build.ps1
  • − .gitlab-ci/windows/mesa_deps_d3d.ps1
  • − .gitlab-ci/windows/mesa_deps_libva.ps1
  • − .gitlab-ci/windows/mesa_deps_msvc.ps1
  • − .gitlab-ci/windows/mesa_deps_packages.ps1
  • − .gitlab-ci/windows/mesa_deps_rust.ps1
  • − .gitlab-ci/windows/mesa_deps_test.ps1
  • − .gitlab-ci/windows/mesa_deps_test_deqp.ps1
  • − .gitlab-ci/windows/mesa_deps_test_piglit.ps1
  • − .gitlab-ci/windows/mesa_deps_vulkan_sdk.ps1
  • − .gitlab-ci/windows/mesa_deps_winget.ps1
  • − .gitlab-ci/windows/mesa_deps_winget_settings.json
  • − .gitlab-ci/windows/mesa_init_msvc.ps1
  • − .gitlab-ci/windows/piglit_run.ps1
  • − .gitlab-ci/windows/spirv2dxil_check.ps1
  • − .gitlab-ci/windows/spirv2dxil_run.ps1
  • − .gitlab-ci/windows/vainfo_run.ps1
  • − .gitlab/issue_templates/Bug Report - AMD Radeon Vulkan.md
  • − .gitlab/issue_templates/Bug Report.md
  • − .gitlab/merge_request_templates/Default.md
1diff --git a/.ci-farms-disabled/.placeholder b/.ci-farms-disabled/.placeholder
2deleted file mode 100644
3index e69de29..0000000
4diff --git a/.ci-farms-disabled/anholt b/.ci-farms-disabled/anholt
5deleted file mode 100644
6index e69de29..0000000
7diff --git a/.ci-farms/.placeholder b/.ci-farms/.placeholder
8deleted file mode 100644
9index e69de29..0000000
10diff --git a/.ci-farms/austriancoder b/.ci-farms/austriancoder
11deleted file mode 100644
12index e69de29..0000000
13diff --git a/.ci-farms/collabora b/.ci-farms/collabora
14deleted file mode 100644
15index e69de29..0000000
16diff --git a/.ci-farms/igalia b/.ci-farms/igalia
17deleted file mode 100644
18index e69de29..0000000
19diff --git a/.ci-farms/lima b/.ci-farms/lima
20deleted file mode 100644
21index e69de29..0000000
22diff --git a/.ci-farms/microsoft b/.ci-farms/microsoft
23deleted file mode 100644
24index e69de29..0000000
25diff --git a/.ci-farms/ondracka b/.ci-farms/ondracka
26deleted file mode 100644
27index e69de29..0000000
28diff --git a/.ci-farms/pengutronix b/.ci-farms/pengutronix
29deleted file mode 100644
30index e69de29..0000000
31diff --git a/.ci-farms/valve-kws b/.ci-farms/valve-kws
32deleted file mode 100644
33index e69de29..0000000
34diff --git a/.ci-farms/valve-mupuf b/.ci-farms/valve-mupuf
35deleted file mode 100644
36index e69de29..0000000
37diff --git a/.ci-farms/vmware b/.ci-farms/vmware
38deleted file mode 100644
39index e69de29..0000000
40diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml
41deleted file mode 100644
42index 7a24ce1..0000000
43--- a/.github/workflows/macos.yml
44+++ /dev/null
45@@ -1,60 +0,0 @@
46-name: macOS-CI
47-on: push
48-
49-permissions:
50- contents: read
51-
52-jobs:
53- macOS-CI:
54- strategy:
55- matrix:
56- glx_option: ['dri', 'xlib']
57- runs-on: macos-11
58- env:
59- GALLIUM_DUMP_CPU: true
60- MESON_EXEC: /Users/runner/Library/Python/3.11/bin/meson
61- steps:
62- - name: Checkout
63- uses: actions/checkout@v3
64- - name: Install Dependencies
65- run: |
66- cat > Brewfile <<EOL
67- brew "bison"
68- brew "expat"
69- brew "gettext"
70- brew "libx11"
71- brew "libxcb"
72- brew "libxdamage"
73- brew "libxext"
74- brew "molten-vk"
75- brew "ninja"
76- brew "pkg-config"
77- brew "python@3.10"
78- EOL
79-
80- brew update
81- brew bundle --verbose
82- - name: Install Mako and meson
83- run: pip3 install --user mako meson
84- - name: Configure
85- run: |
86- cat > native_config <<EOL
87- [binaries]
88- llvm-config = '/usr/local/opt/llvm/bin/llvm-config'
89- EOL
90- $MESON_EXEC . build --native-file=native_config -Dmoltenvk-dir=$(brew --prefix molten-vk) -Dbuild-tests=true -Dgallium-drivers=swrast,zink -Dglx=${{ matrix.glx_option }}
91- - name: Build
92- run: $MESON_EXEC compile -C build
93- - name: Test
94- run: $MESON_EXEC test -C build --print-errorlogs
95- - name: Install
96- run: $MESON_EXEC install -C build --destdir $PWD/install
97- - name: 'Upload Artifact'
98- if: always()
99- uses: actions/upload-artifact@v3
100- with:
101- name: macos-${{ matrix.glx_option }}-result
102- path: |
103- build/meson-logs/
104- install/
105- retention-days: 5
106diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
107deleted file mode 100644
108index 04fe129..0000000
109--- a/.gitlab-ci.yml
110+++ /dev/null
111@@ -1,427 +0,0 @@
112-# Types of CI pipelines:
113-# | pipeline name | context | description |
114-# |----------------------|-----------|-------------------------------------------------------------|
115-# | merge pipeline | mesa/mesa | pipeline running for an MR; if it passes the MR gets merged |
116-# | pre-merge pipeline | mesa/mesa | same as above, except its status doesn't affect the MR |
117-# | post-merge pipeline | mesa/mesa | pipeline immediately after merging |
118-# | fork pipeline | fork | pipeline running in a user fork |
119-# | scheduled pipeline | mesa/mesa | nightly pipelines, running every morning at 4am UTC |
120-# | direct-push pipeline | mesa/mesa | when commits are pushed directly to mesa/mesa, bypassing Marge and its gating pipeline |
121-#
122-# Note that the release branches maintained by the release manager fall under
123-# the "direct push" category.
124-#
125-# "context" indicates the permissions that the jobs get; notably, any
126-# container created in mesa/mesa gets pushed immediately for everyone to use
127-# as soon as the image tag change is merged.
128-#
129-# Merge pipelines contain all jobs that must pass before the MR can be merged.
130-# Pre-merge pipelines contain the exact same jobs as merge pipelines.
131-# Post-merge pipelines contain *only* the `pages` job that deploys the new
132-# version of the website.
133-# Fork pipelines contain everything.
134-# Scheduled pipelines only contain the container+build jobs, and some extra
135-# test jobs (typically "full" variants of pre-merge jobs that only run 1/X
136-# test cases), but not a repeat of the merge pipeline jobs.
137-# Direct-push pipelines contain the same jobs as merge pipelines.
138-
139-workflow:
140- rules:
141- # do not duplicate pipelines on merge pipelines
142- - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"
143- when: never
144- # Tag pipelines are disabled as it's too late to run all the tests by
145- # then, the release has been made based on the staging pipelines results
146- - if: $CI_COMMIT_TAG
147- when: never
148- # Merge pipeline
149- - if: &is-merge-attempt $GITLAB_USER_LOGIN == "marge-bot" && $CI_PIPELINE_SOURCE == "merge_request_event"
150- variables:
151- MESA_CI_PERFORMANCE_ENABLED: 1
152- FDO_RUNNER_JOB_PRIORITY_TAG_X86_64: priority:high
153- FDO_RUNNER_JOB_PRIORITY_TAG_X86_64_KVM: priority:high-kvm
154- FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64: priority:high-aarch64
155- CI_TRON_JOB_PRIORITY: high
156- JOB_PRIORITY: 75
157- # fast-fail in merge pipelines: stop early if we get this many unexpected fails/crashes
158- DEQP_RUNNER_MAX_FAILS: 40
159- # Post-merge pipeline
160- - if: &is-post-merge $GITLAB_USER_LOGIN == "marge-bot" && $CI_PIPELINE_SOURCE == "push"
161- variables:
162- FDO_RUNNER_JOB_PRIORITY_TAG_X86_64: priority:high
163- FDO_RUNNER_JOB_PRIORITY_TAG_X86_64_KVM: priority:high-kvm
164- FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64: priority:high-aarch64
165- # Pre-merge pipeline (because merge pipelines are already caught above)
166- - if: &is-merge-request $CI_PIPELINE_SOURCE == "merge_request_event"
167- # Push to a branch on a fork
168- - if: &is-push-to-fork $CI_PROJECT_NAMESPACE != "mesa" && $CI_PIPELINE_SOURCE == "push"
169- # Nightly pipeline
170- - if: &is-scheduled-pipeline $CI_PIPELINE_SOURCE == "schedule"
171- variables:
172- FDO_RUNNER_JOB_PRIORITY_TAG_X86_64: priority:low
173- FDO_RUNNER_JOB_PRIORITY_TAG_X86_64_KVM: priority:low-kvm
174- FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64: priority:low-aarch64
175- CI_TRON_JOB_PRIORITY: low
176- JOB_PRIORITY: 45
177- # (some) nightly builds perform LTO, so they take much longer than the
178- # short timeout allowed in other pipelines.
179- # Note: 0 = infinity = gitlab's job `timeout:` applies, which is 1h
180- BUILD_JOB_TIMEOUT_OVERRIDE: 0
181- # Pipeline for direct pushes to the default branch that bypassed the CI
182- - if: &is-push-to-upstream-default-branch $CI_PROJECT_NAMESPACE == "mesa" && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
183- variables:
184- JOB_PRIORITY: 70
185- # Pipeline for direct pushes from release maintainer
186- - if: &is-push-to-upstream-staging-branch $CI_PROJECT_NAMESPACE == "mesa" && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_REF_NAME =~ /^staging\//
187- variables:
188- JOB_PRIORITY: 70
189-
190-
191-variables:
192- FDO_UPSTREAM_REPO: mesa/mesa
193- MESA_TEMPLATES_COMMIT: &ci-templates-commit aec7a6ce7bb38902c70641526f6611e27141784a
194- CI_PRE_CLONE_SCRIPT: |-
195- set -o xtrace
196- curl --silent --location --fail --retry-connrefused --retry 3 --retry-delay 10 \
197- ${CI_PROJECT_URL}/-/raw/${CI_COMMIT_SHA}/.gitlab-ci/download-git-cache.sh | bash
198- set +o xtrace
199- S3_JWT_FILE: /s3_jwt
200- S3_JWT_FILE_SCRIPT: |-
201- echo -n '${S3_JWT}' > '${S3_JWT_FILE}' &&
202- S3_JWT_FILE_SCRIPT= &&
203- unset CI_JOB_JWT S3_JWT # Unsetting vulnerable env variables
204- S3_HOST: s3.freedesktop.org
205- # This bucket is used to fetch ANDROID prebuilts and images
206- S3_ANDROID_BUCKET: mesa-rootfs
207- # This bucket is used to fetch the kernel image
208- S3_KERNEL_BUCKET: mesa-rootfs
209- # Bucket for git cache
210- S3_GITCACHE_BUCKET: git-cache
211- # Bucket for the pipeline artifacts pushed to S3
212- S3_ARTIFACTS_BUCKET: artifacts
213- # Buckets for traces
214- S3_TRACIE_RESULTS_BUCKET: mesa-tracie-results
215- S3_TRACIE_PUBLIC_BUCKET: mesa-tracie-public
216- S3_TRACIE_PRIVATE_BUCKET: mesa-tracie-private
217- # Base path used for various artifacts
218- S3_BASE_PATH: "${S3_HOST}/${S3_KERNEL_BUCKET}"
219- # per-pipeline artifact storage on MinIO
220- PIPELINE_ARTIFACTS_BASE: ${S3_HOST}/${S3_ARTIFACTS_BUCKET}/${CI_PROJECT_PATH}/${CI_PIPELINE_ID}
221- # per-job artifact storage on MinIO
222- JOB_ARTIFACTS_BASE: ${PIPELINE_ARTIFACTS_BASE}/${CI_JOB_ID}
223- # reference images stored for traces
224- PIGLIT_REPLAY_REFERENCE_IMAGES_BASE: "${S3_HOST}/${S3_TRACIE_RESULTS_BUCKET}/$FDO_UPSTREAM_REPO"
225- # For individual CI farm status see .ci-farms folder
226- # Disable farm with `git mv .ci-farms{,-disabled}/$farm_name`
227- # Re-enable farm with `git mv .ci-farms{-disabled,}/$farm_name`
228- # NEVER MIX FARM MAINTENANCE WITH ANY OTHER CHANGE IN THE SAME MERGE REQUEST!
229- ARTIFACTS_BASE_URL: https://${CI_PROJECT_ROOT_NAMESPACE}.${CI_PAGES_DOMAIN}/-/${CI_PROJECT_NAME}/-/jobs/${CI_JOB_ID}/artifacts
230- # No point in continuing once the device is lost
231- MESA_VK_ABORT_ON_DEVICE_LOSS: 1
232- # Avoid the wall of "Unsupported SPIR-V capability" warnings in CI job log, hiding away useful output
233- MESA_SPIRV_LOG_LEVEL: error
234- # Default priority for non-merge pipelines
235- FDO_RUNNER_JOB_PRIORITY_TAG_X86_64: "" # Empty tags are ignored by gitlab
236- FDO_RUNNER_JOB_PRIORITY_TAG_X86_64_KVM: kvm
237- FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64: aarch64
238- CI_TRON_JOB_PRIORITY: default
239- JOB_PRIORITY: 50
240- DATA_STORAGE_PATH: data_storage
241- KERNEL_IMAGE_BASE: "https://$S3_HOST/$S3_KERNEL_BUCKET/$KERNEL_REPO/$KERNEL_TAG"
242- # Mesa-specific variables that shouldn't be forwarded to DUTs and crosvm
243- CI_EXCLUDE_ENV_VAR_REGEX: 'SCRIPTS_DIR|RESULTS_DIR'
244-
245- CI_TRON_JOB_TEMPLATE_PROJECT: &ci-tron-template-project gfx-ci/ci-tron
246- CI_TRON_JOB_TEMPLATE_COMMIT: &ci-tron-template-commit d649a2829517b078a3cb8f3c2e6c8775a5992abb
247- CI_TRON_JOB_TEMPLATE_PROJECT_URL: "https://gitlab.freedesktop.org/$CI_TRON_JOB_TEMPLATE_PROJECT"
248-
249-
250-default:
251- timeout: 1m # catch any jobs which don't specify a timeout
252- id_tokens:
253- S3_JWT:
254- aud: https://s3.freedesktop.org
255- before_script:
256- - >
257- export SCRIPTS_DIR=$(mktemp -d) &&
258- curl -L -s --retry 4 -f --retry-all-errors --retry-delay 60 -O --output-dir "${SCRIPTS_DIR}" "${CI_PROJECT_URL}/-/raw/${CI_COMMIT_SHA}/.gitlab-ci/setup-test-env.sh" &&
259- . ${SCRIPTS_DIR}/setup-test-env.sh
260- - eval "$S3_JWT_FILE_SCRIPT"
261-
262- # Retry when job fails. Failed jobs can be found in the Mesa CI Daily Reports:
263- # https://gitlab.freedesktop.org/mesa/mesa/-/issues/?sort=created_date&state=opened&label_name%5B%5D=CI%20daily
264- retry:
265- max: 1
266- # Ignore runner_unsupported, stale_schedule, archived_failure, or
267- # unmet_prerequisites
268- when:
269- - api_failure
270- - runner_system_failure
271- - script_failure
272- - job_execution_timeout
273- - scheduler_failure
274- - data_integrity_failure
275- - unknown_failure
276-
277-stages:
278- - sanity
279- - container
280- - git-archive
281- - build-for-tests
282- - build-only
283- - code-validation
284- - amd
285- - amd-nightly
286- - intel
287- - intel-nightly
288- - nouveau
289- - nouveau-nightly
290- - arm
291- - arm-nightly
292- - broadcom
293- - broadcom-nightly
294- - freedreno
295- - freedreno-nightly
296- - etnaviv
297- - etnaviv-nightly
298- - imagination-nightly
299- - software-renderer
300- - software-renderer-nightly
301- - layered-backends
302- - layered-backends-nightly
303- - performance
304- - deploy
305-
306-include:
307- - project: 'freedesktop/ci-templates'
308- ref: *ci-templates-commit
309- file:
310- - '/templates/alpine.yml'
311- - '/templates/debian.yml'
312- - '/templates/fedora.yml'
313- - '/templates/ci-fairy.yml'
314- - project: *ci-tron-template-project
315- ref: *ci-tron-template-commit
316- file: '/.gitlab-ci/dut.yml'
317- - local: '.gitlab-ci/image-tags.yml'
318- - local: '.gitlab-ci/bare-metal/gitlab-ci.yml'
319- - local: '.gitlab-ci/ci-tron/gitlab-ci.yml'
320- - local: '.gitlab-ci/lava/gitlab-ci.yml'
321- - local: '.gitlab-ci/container/gitlab-ci.yml'
322- - local: '.gitlab-ci/build/gitlab-ci.yml'
323- - local: '.gitlab-ci/test/gitlab-ci.yml'
324- - local: '.gitlab-ci/farm-rules.yml'
325- - local: '.gitlab-ci/test-source-dep.yml'
326- - local: 'docs/gitlab-ci.yml'
327- - local: 'src/**/ci/gitlab-ci.yml'
328-
329-
330-# Rules applied to every job in the pipeline
331-.common-rules:
332- rules:
333- - if: *is-push-to-fork
334- when: manual
335-
336-.never-post-merge-rules:
337- rules:
338- - if: *is-post-merge
339- when: never
340-
341-
342-# Note: make sure the branches in this list are the same as in
343-# `.build-only-delayed-rules` below.
344-.container-rules:
345- rules:
346- - !reference [.common-rules, rules]
347- # Run when re-enabling a disabled farm, but not when disabling it
348- - !reference [.disable-farm-rules, rules]
349- # Never run immediately after merging, as we just ran everything
350- - !reference [.never-post-merge-rules, rules]
351- # Only rebuild containers in merge pipelines if any tags have been
352- # changed, else we'll just use the already-built containers
353- - if: *is-merge-attempt
354- changes: &image_tags_path
355- - .gitlab-ci.yml
356- - .gitlab-ci/image-tags.yml
357- when: on_success
358- # Skip everything for pre-merge and merge pipelines which don't change
359- # anything in the build; we only do this for marge-bot and not user
360- # pipelines in a MR, because we might still need to run it to copy the
361- # container into the user's namespace.
362- - if: *is-merge-attempt
363- when: never
364- # Any MR pipeline which changes image-tags.yml needs to be able to
365- # rebuild the containers
366- - if: *is-merge-request
367- changes: *image_tags_path
368- when: manual
369- # ... if the MR pipeline runs as mesa/mesa and does not need a container
370- # rebuild, we can skip it
371- - if: &is-upstream-mr-pipeline $CI_PROJECT_PATH == $FDO_UPSTREAM_REPO && $CI_PIPELINE_SOURCE == "merge_request_event"
372- when: never
373- # ... however for MRs running inside the user namespace, we may need to
374- # run these jobs to copy the container images from upstream
375- - if: *is-merge-request
376- when: manual
377- # Build everything after someone bypassed the CI
378- - if: *is-push-to-upstream-default-branch
379- when: on_success
380- # Build everything when pushing to staging branches
381- - if: *is-push-to-upstream-staging-branch
382- when: on_success
383- # Scheduled pipelines reuse already-built containers
384- - if: *is-scheduled-pipeline
385- when: never
386- # Any other pipeline in the upstream should reuse already-built containers
387- - if: &is-upstream-pipeline $CI_PROJECT_PATH == $FDO_UPSTREAM_REPO
388- when: never
389- # Allow building everything in fork pipelines, but build nothing unless
390- # manually triggered
391- - when: manual
392-
393-# Note: make sure the branches in this list are the same as in
394-# `.build-only-delayed-rules` below.
395-.build-rules:
396- rules:
397- - !reference [.common-rules, rules]
398- # Run when re-enabling a disabled farm, but not when disabling it
399- - !reference [.disable-farm-rules, rules]
400- # Never run immediately after merging, as we just ran everything
401- - !reference [.never-post-merge-rules, rules]
402- # Build everything in merge pipelines, if any files affecting the pipeline
403- # were changed
404- - if: *is-merge-attempt
405- changes: &all_paths
406- - VERSION
407- - bin/git_sha1_gen.py
408- - bin/install_megadrivers.py
409- - bin/symbols-check.py
410- - bin/ci/**/*
411- # GitLab CI
412- - .gitlab-ci.yml
413- - .gitlab-ci/**/*
414- - .ci-farms/*
415- # Meson
416- - meson*
417- - build-support/**/*
418- - subprojects/**/*
419- # clang format
420- - .clang-format
421- - .clang-format-include
422- - .clang-format-ignore
423- # Source code
424- - include/**/*
425- - src/**/*
426- when: on_success
427- # Same as above, but for pre-merge pipelines
428- - if: *is-merge-request
429- changes: *all_paths
430- when: manual
431- # Skip everything for pre-merge and merge pipelines which don't change
432- # anything in the build
433- - if: *is-merge-attempt
434- when: never
435- - if: *is-merge-request
436- when: never
437- # Build everything after someone bypassed the CI
438- - if: *is-push-to-upstream-default-branch
439- when: on_success
440- # Build everything when pushing to staging branches
441- - if: *is-push-to-upstream-staging-branch
442- when: on_success
443- # Build everything in scheduled pipelines
444- - if: *is-scheduled-pipeline
445- when: on_success
446- # Allow building everything in fork pipelines, but build nothing unless
447- # manually triggered
448- - when: manual
449-
450-# Repeat of the above but with `when: on_success` replaced with
451-# `when: delayed` + `start_in:`, for build-only jobs.
452-# Note: make sure the branches in this list are the same as in
453-# `.container+build-rules` above.
454-.build-only-delayed-rules:
455- rules:
456- - !reference [.common-rules, rules]
457- # Run when re-enabling a disabled farm, but not when disabling it
458- - !reference [.disable-farm-rules, rules]
459- # Never run immediately after merging, as we just ran everything
460- - !reference [.never-post-merge-rules, rules]
461- # Build everything in merge pipelines, if any files affecting the pipeline
462- # were changed
463- - if: *is-merge-attempt
464- changes: *all_paths
465- when: delayed
466- start_in: &build-delay 5 minutes
467- # Same as above, but for pre-merge pipelines
468- - if: *is-merge-request
469- changes: *all_paths
470- when: manual
471- # Skip everything for pre-merge and merge pipelines which don't change
472- # anything in the build
473- - if: *is-merge-attempt
474- when: never
475- - if: *is-merge-request
476- when: never
477- # Build everything after someone bypassed the CI
478- - if: *is-push-to-upstream-default-branch
479- when: delayed
480- start_in: *build-delay
481- # Build everything when pushing to staging branches
482- - if: *is-push-to-upstream-staging-branch
483- when: delayed
484- start_in: *build-delay
485- # Build everything in scheduled pipelines
486- - if: *is-scheduled-pipeline
487- when: delayed
488- start_in: *build-delay
489- # Allow building everything in fork pipelines, but build nothing unless
490- # manually triggered
491- - when: manual
492-
493-# Sanity checks of MR settings and commit logs
494-sanity:
495- extends:
496- - .fdo.ci-fairy
497- stage: sanity
498- tags:
499- - placeholder-job
500- rules:
501- - if: *is-merge-request
502- when: on_success
503- - when: never
504- variables:
505- GIT_STRATEGY: none
506- script:
507- # ci-fairy check-commits --junit-xml=check-commits.xml
508- # ci-fairy check-merge-request --require-allow-collaboration --junit-xml=check-merge-request.xml
509- - |
510- set -eu
511- image_tags=(
512- ALPINE_X86_64_BUILD_TAG
513- DEBIAN_BUILD_BASE_TAG
514- DEBIAN_BUILD_TAG
515- DEBIAN_TEST_BASE_TAG
516- DEBIAN_TEST_ANDROID_TAG
517- DEBIAN_TEST_GL_TAG
518- DEBIAN_TEST_VK_TAG
519- FEDORA_X86_64_BUILD_TAG
520- FIRMWARE_TAG
521- KERNEL_TAG
522- PKG_REPO_REV
523- WINDOWS_X64_BUILD_TAG
524- WINDOWS_X64_MSVC_TAG
525- WINDOWS_X64_TEST_TAG
526- )
527- for var in "${image_tags[@]}"
528- do
529- if [ "$(echo -n "${!var}" | wc -c)" -gt 20 ]
530- then
531- echo "$var is too long; please make sure it is at most 20 chars."
532- exit 1
533- fi
534- done
535- artifacts:
536- when: on_failure
537- reports:
538- junit: check-*.xml
539diff --git a/.gitlab-ci/.flake8 b/.gitlab-ci/.flake8
540deleted file mode 100644
541index 1be72fc..0000000
542--- a/.gitlab-ci/.flake8
543+++ /dev/null
544@@ -1,33 +0,0 @@
545-[flake8]
546-exclude = .venv*,
547-
548-# PEP 8 Style Guide limits line length to 79 characters
549-max-line-length = 159
550-
551-ignore =
552- # continuation line under-indented for hanging indent
553- E121
554- # continuation line over-indented for hanging indent
555- E126,
556- # continuation line under-indented for visual indent
557- E128,
558- # whitespace before ':'
559- E203,
560- # missing whitespace around arithmetic operator
561- E226,
562- # missing whitespace after ','
563- E231,
564- # expected 2 blank lines, found 1
565- E302,
566- # too many blank lines
567- E303,
568- # imported but unused
569- F401,
570- # f-string is missing placeholders
571- F541,
572- # local variable assigned to but never used
573- F841,
574- # line break before binary operator
575- W503,
576- # line break after binary operator
577- W504,
578diff --git a/.gitlab-ci/all-flakes.txt b/.gitlab-ci/all-flakes.txt
579deleted file mode 100644
580index 1d8cb66..0000000
581--- a/.gitlab-ci/all-flakes.txt
582+++ /dev/null
583@@ -1,5 +0,0 @@
584-# wsi_common_display.c doesn't properly hand off the oldSwapchain to the new one,
585-# and you can end up trying to atomic commit before the last present has flipped,
586-# and the kernel throws an error.
587-dEQP-VK.wsi.direct.present_timing.basic.retired_swapchain
588-dEQP-VK.wsi.direct_drm.present_timing.basic.retired_swapchain
589diff --git a/.gitlab-ci/all-single-thread.txt b/.gitlab-ci/all-single-thread.txt
590deleted file mode 100644
591index 3ba0995..0000000
592--- a/.gitlab-ci/all-single-thread.txt
593+++ /dev/null
594@@ -1,39 +0,0 @@
595-# These tests require DRM master priveleges (sole access to the device),
596-# otherwise they return Skip.
597-dEQP-VK.wsi.direct.*
598-dEQP-VK.wsi.acquire_drm.*
599-
600-# These tests try to allocate up to half of the device memory, which doesn't go
601-# well when other tests are running in parallel.
602-dEQP-VK.memory.mapping.*.full.variable.implicit_unmap
603-dEQP-VK.memory.mapping.*.full.variable.implicit_unmap_map2
604-
605-# These allocate 600+MB of just the string for the spirv assembly in addition to
606-# normal deqp-vk memory overhead, which loves to thrash swap with other tests.
607-dEQP-VK.spirv_assembly.instruction.*.spirv_ids_abuse.lots_ids.*
608-
609-# 2GB GPU memory for zink-tu
610-spec@!opengl 1.2@tex3d-maxsize
611-# 1GB GPU memory for a 16kx16k-sized driver.
612-spec@ext_framebuffer_object@fbo-maxsize
613-# 6GB GPU memory for zink-tu
614-spec@!opengl 1.1@max-texture-size
615-
616-# 2GB GPU memory on tu
617-vkd3d-test_committed_non_zeroed_behavior_stress
618-# 600MB GPU memory on tu
619-vkd3d-test_fence_ping_pong_deadlock_stress_plain
620-# 2GB GPU memory on tu
621-vkd3d-test_heap_non_zeroed_behavior_stress
622-# 500MB GPU memory on tu
623-vkd3d-test_fence_wait_robustness
624-# Allocates a 2GB texel buffer
625-vkd3d-test_large_texel_buffer_view
626-# 550MB GPU memory on tu
627-vkd3d-test_placed_image_alignment
628-# Allocates until heap OOM.
629-vkd3d-test_stress_fallback_render_target_allocation_device
630-# 3GB GPU memory on tu
631-vkd3d-test_stress_suballocation_multithread
632-# 2GB GPU memory on tu
633-vkd3d-test_stress_suballocation_rebar
634diff --git a/.gitlab-ci/all-skips.txt b/.gitlab-ci/all-skips.txt
635deleted file mode 100644
636index fc2440f..0000000
637--- a/.gitlab-ci/all-skips.txt
638+++ /dev/null
639@@ -1,56 +0,0 @@
640-# Note: skips lists for CI are just a list of lines that, when
641-# non-zero-length and not starting with '#', will regex match to
642-# delete lines from the test list. Be careful.
643-
644-# This test checks the driver's reported conformance version against the
645-# version of the CTS we're running. This check fails every few months
646-# and everyone has to go and bump the number in every driver.
647-# Running this check only makes sense while preparing a conformance
648-# submission, so skip it in the regular CI.
649-dEQP-VK.api.driver_properties.conformance_version
650-
651-# Exclude this test which might fail when a new extension is implemented.
652-dEQP-VK.info.device_extensions
653-
654-# These are tremendously slow (pushing toward a minute), and aren't
655-# reliable to be run in parallel with other tests due to CPU-side timing.
656-dEQP-GLES[0-9]*.functional.flush_finish.*
657-
658-# piglit: WGL is Windows-only
659-wgl@.*
660-
661-# These are sensitive to CPU timing, and would need to be run in isolation
662-# on the system rather than in parallel with other tests.
663-glx@glx_arb_sync_control@timing.*
664-
665-# This test is not built with waffle, while we do build tests with waffle
666-spec@!opengl 1.1@windowoverlap
667-
668-# These test the loader more than the implementation and are broken because the
669-# Vulkan loader in Debian is too old
670-dEQP-VK.api.get_device_proc_addr.non_enabled
671-dEQP-VK.api.version_check.unavailable_entry_points
672-
673-# These tests are flaking too much recently on almost all drivers, so better skip them until the cause is identified
674-spec@arb_program_interface_query@arb_program_interface_query-getprogramresourceindex
675-spec@arb_program_interface_query@arb_program_interface_query-getprogramresourceindex@'vs_input2[1][0]' on GL_PROGRAM_INPUT
676-
677-# gbm does not support reading the front buffer after a swapbuffers, and
678-# that's intentional. Don't bother running these tests when PIGLIT_PLATFORM=gbm.
679-# Note that this doesn't include tests like fbo-sys-blit, which draw/read front
680-# but don't swap.
681-#
682-# piglit should probably be fixed to throw skip on this platform
683-spec@!opengl 1.0@gl-1.0-swapbuffers-behavior
684-spec@!opengl 1.1@read-front
685-
686-# Skip test everywhere
687-# Because even with a 256x256 map, it is over 1 GiB of texture memory
688-# allocated
689-# Also, individually, it was disabled in most of the tests as it is
690-# either too slow or results in an OOM
691-spec@!opengl 1.1@streaming-texture-leak
692-
693-# Fails everywhere, invalid test: https://gitlab.khronos.org/Tracker/vk-gl-cts/-/issues/6317
694-dEQP-VK.spirv_assembly.instruction.*.float_controls2.*.input_args.mat_det_testedWithout_NotNaN_arg1_nan_arg2_one_res_nan*
695-dEQP-VK.spirv_assembly.instruction.*.float_controls2.*.input_args.cross_testedWithout_NotNaN_arg1_nan_arg2_one_res_nan*
696diff --git a/.gitlab-ci/all-slow-skips.txt b/.gitlab-ci/all-slow-skips.txt
697deleted file mode 100644
698index 4d0a0ec..0000000
699--- a/.gitlab-ci/all-slow-skips.txt
700+++ /dev/null
701@@ -1,6 +0,0 @@
702-# These are variants of
703-# dEQP-VK.memory.mapping.suballocation.full.variable.implicit_unmap* that
704-# are very slow (often 30s on DUTs) due to allocating, mapping, filling,
705-# and reading back 32GB of memory, while not providing interesting pre-merge
706-# coverage for us.
707-dEQP-VK.memory.mapping.dedicated_alloc.*.implicit_unmap.*
708diff --git a/.gitlab-ci/android-cts-runner.sh b/.gitlab-ci/android-cts-runner.sh
709deleted file mode 100755
710index 2ae31b6..0000000
711--- a/.gitlab-ci/android-cts-runner.sh
712+++ /dev/null
713@@ -1,76 +0,0 @@
714-#!/usr/bin/env bash
715-# shellcheck disable=SC2086 # we want word splitting
716-# shellcheck disable=SC1091 # paths only become valid at runtime
717-
718-. "${SCRIPTS_DIR}/setup-test-env.sh"
719-
720-ci_tag_test_time_check "ANDROID_CTS_TAG"
721-
722-export PATH=/android-cts/jdk/bin/:$PATH
723-export JAVA_HOME=/android-cts/jdk
724-
725-# Wait for the appops service to show up
726-while [ "$($ADB shell dumpsys -l | grep appops)" = "" ] ; do sleep 1; done
727-
728-SKIP_FILE="$INSTALL/${GPU_VERSION}-android-cts-skips.txt"
729-
730-EXCLUDE_FILTERS=""
731-if [ -e "$SKIP_FILE" ]; then
732- EXCLUDE_FILTERS="$(grep -v -E "(^#|^[[:space:]]*$)" "$SKIP_FILE" | sed -e 's/\s*$//g' -e 's/.*/--exclude-filter "\0" /g')"
733-fi
734-
735-INCLUDE_FILE="$INSTALL/${GPU_VERSION}-android-cts-include.txt"
736-
737-if [ ! -e "$INCLUDE_FILE" ]; then
738- set +x
739- echo "ERROR: No include file (${GPU_VERSION}-android-cts-include.txt) found."
740- echo "This means that we are running the all available CTS modules."
741- echo "But the time to run it might be too long, please provide an include file instead."
742- exit 1
743-fi
744-
745-INCLUDE_FILTERS="$(grep -v -E "(^#|^[[:space:]]*$)" "$INCLUDE_FILE" | sed -e 's/\s*$//g' -e 's/.*/--include-filter "\0" /g')"
746-
747-if [ -n "${ANDROID_CTS_PREPARE_COMMAND:-}" ]; then
748- eval "$ANDROID_CTS_PREPARE_COMMAND"
749-fi
750-
751-uncollapsed_section_switch android_cts_test "Android CTS: testing"
752-
753-set +e
754-eval "/android-cts/tools/cts-tradefed" run commandAndExit cts-dev \
755- $INCLUDE_FILTERS \
756- $EXCLUDE_FILTERS
757-
758-SUMMARY_FILE=/android-cts/results/latest/invocation_summary.txt
759-
760-# Parse a line like `x/y modules completed` to check that all modules completed
761-COMPLETED_MODULES=$(sed -n -e '/modules completed/s/^\([0-9]\+\)\/\([0-9]\+\) .*$/\1/p' "$SUMMARY_FILE")
762-AVAILABLE_MODULES=$(sed -n -e '/modules completed/s/^\([0-9]\+\)\/\([0-9]\+\) .*$/\2/p' "$SUMMARY_FILE")
763-[ "$COMPLETED_MODULES" = "$AVAILABLE_MODULES" ]
764-# shellcheck disable=SC2319 # False-positive see https://github.com/koalaman/shellcheck/issues/2937#issuecomment-2660891195
765-MODULES_FAILED=$?
766-
767-# Parse a line like `FAILED : x` to check that no tests failed
768-[ "$(grep "^FAILED" "$SUMMARY_FILE" | tr -d ' ' | cut -d ':' -f 2)" = "0" ]
769-# shellcheck disable=SC2319 # False-positive see https://github.com/koalaman/shellcheck/issues/2937#issuecomment-2660891195
770-TESTS_FAILED=$?
771-
772-[ "$MODULES_FAILED" = "0" ] && [ "$TESTS_FAILED" = "0" ]
773-
774-# shellcheck disable=SC2034 # EXIT_CODE is used by the script that sources this one
775-EXIT_CODE=$?
776-set -e
777-
778-mkdir "${RESULTS_DIR}/android-cts"
779-cp -r "/android-cts/results/latest/" "${RESULTS_DIR}/android-cts/results"
780-cp -r "/android-cts/logs/latest/" "${RESULTS_DIR}/android-cts/logs"
781-
782-if [ -n "${ARTIFACTS_BASE_URL:-}" ]; then
783- echo "============================================"
784- echo "Review the Android CTS test results at: ${ARTIFACTS_BASE_URL}/results/android-cts/results/test_result.html"
785-fi
786-
787-section_end android_cts_test
788-
789-exit $EXIT_CODE
790diff --git a/.gitlab-ci/android-deqp-runner.sh b/.gitlab-ci/android-deqp-runner.sh
791deleted file mode 100755
792index 5714a6a..0000000
793--- a/.gitlab-ci/android-deqp-runner.sh
794+++ /dev/null
795@@ -1,112 +0,0 @@
796-#!/usr/bin/env bash
797-# shellcheck disable=SC2086 # we want word splitting
798-# shellcheck disable=SC1091 # paths only become valid at runtime
799-
800-. "${SCRIPTS_DIR}/setup-test-env.sh"
801-
802-# deqp
803-
804-$ADB shell mkdir -p /data/deqp
805-$ADB push /deqp-gles/modules/egl/deqp-egl-android /data/deqp
806-$ADB push /deqp-gles/mustpass/egl-main.txt.zst /data/deqp
807-$ADB push /deqp-gles/modules/gles2/deqp-gles2 /data/deqp
808-$ADB push /deqp-gles/mustpass/gles2-main.txt.zst /data/deqp
809-$ADB push /deqp-vk/external/vulkancts/modules/vulkan/* /data/deqp
810-$ADB push /deqp-vk/mustpass/vk-main.txt.zst /data/deqp
811-$ADB push /deqp-tools/* /data/deqp
812-$ADB push /deqp-runner/deqp-runner /data/deqp
813-
814-$ADB push "$INSTALL/all-skips.txt" /data/deqp
815-$ADB push "$INSTALL/android-skips.txt" /data/deqp
816-$ADB push "$INSTALL/angle-skips.txt" /data/deqp
817-if [ -e "$INSTALL/$GPU_VERSION-flakes.txt" ]; then
818- $ADB push "$INSTALL/$GPU_VERSION-flakes.txt" /data/deqp
819-fi
820-if [ -e "$INSTALL/$GPU_VERSION-fails.txt" ]; then
821- $ADB push "$INSTALL/$GPU_VERSION-fails.txt" /data/deqp
822-fi
823-if [ -e "$INSTALL/$GPU_VERSION-skips.txt" ]; then
824- $ADB push "$INSTALL/$GPU_VERSION-skips.txt" /data/deqp
825-fi
826-$ADB push "$INSTALL/deqp-$DEQP_SUITE.toml" /data/deqp
827-
828-BASELINE=""
829-if [ -e "$INSTALL/$GPU_VERSION-fails.txt" ]; then
830- BASELINE="--baseline /data/deqp/$GPU_VERSION-fails.txt"
831-fi
832-
833-# Default to an empty known flakes file if it doesn't exist.
834-$ADB shell "touch /data/deqp/$GPU_VERSION-flakes.txt"
835-
836-DEQP_SKIPS=""
837-if [ -e "$INSTALL/$GPU_VERSION-skips.txt" ]; then
838- DEQP_SKIPS="$DEQP_SKIPS /data/deqp/$GPU_VERSION-skips.txt"
839-fi
840-
841-if [ -n "${ANGLE_TAG:-}" ]; then
842- DEQP_SKIPS="$DEQP_SKIPS /data/deqp/angle-skips.txt"
843-fi
844-
845-AOSP_RESULTS=/data/deqp/results
846-uncollapsed_section_switch cuttlefish_test "cuttlefish: testing"
847-
848-# Print the detailed version with the list of backports and local patches
849-{ set +x; } 2>/dev/null
850-for api in vk-main vk gl gles; do
851- deqp_version_log=/deqp-$api/deqp-$api-version
852- if [ -r "$deqp_version_log" ]; then
853- cat "$deqp_version_log"
854- fi
855-done
856-set -x
857-
858-set +e
859-$ADB shell "mkdir ${AOSP_RESULTS}; cd ${AOSP_RESULTS}/..; \
860- XDG_CACHE_HOME=/data/local/tmp \
861- ./deqp-runner \
862- suite \
863- --suite /data/deqp/deqp-$DEQP_SUITE.toml \
864- --output $AOSP_RESULTS \
865- --skips /data/deqp/all-skips.txt $DEQP_SKIPS \
866- --flakes /data/deqp/$GPU_VERSION-flakes.txt \
867- --testlog-to-xml /data/deqp/testlog-to-xml \
868- --shader-cache-dir /data/local/tmp \
869- --fraction-start ${CI_NODE_INDEX:-1} \
870- --fraction $(( CI_NODE_TOTAL * ${DEQP_FRACTION:-1})) \
871- --jobs ${FDO_CI_CONCURRENT:-4} \
872- $BASELINE \
873- ${DEQP_RUNNER_MAX_FAILS:+--max-fails \"$DEQP_RUNNER_MAX_FAILS\"} \
874- "
875-
876-# shellcheck disable=SC2034 # EXIT_CODE is used by the script that sources this one
877-EXIT_CODE=$?
878-set -e
879-section_switch cuttlefish_results "cuttlefish: gathering the results"
880-
881-$ADB pull "$AOSP_RESULTS/." "$RESULTS_DIR"
882-
883-# Remove all but the first 50 individual XML files uploaded as artifacts, to
884-# save fd.o space when you break everything.
885-find $RESULTS_DIR -name \*.xml | \
886- sort -n |
887- sed -n '1,+49!p' | \
888- xargs rm -f
889-
890-# If any QPA XMLs are there, then include the XSL/CSS in our artifacts.
891-find $RESULTS_DIR -name \*.xml \
892- -exec cp /deqp-tools/testlog.css /deqp-tools/testlog.xsl "$RESULTS_DIR/" ";" \
893- -quit
894-
895-$ADB shell "cd ${AOSP_RESULTS}/..; \
896-./deqp-runner junit \
897- --testsuite dEQP \
898- --results $AOSP_RESULTS/failures.csv \
899- --output $AOSP_RESULTS/junit.xml \
900- --limit 50 \
901- --template \"See $ARTIFACTS_BASE_URL/results/{{testcase}}.xml\""
902-
903-$ADB pull "$AOSP_RESULTS/junit.xml" "$RESULTS_DIR"
904-
905-section_end cuttlefish_results
906-
907-exit $EXIT_CODE
908diff --git a/.gitlab-ci/android-runner.sh b/.gitlab-ci/android-runner.sh
909deleted file mode 100755
910index 1a15e1b..0000000
911--- a/.gitlab-ci/android-runner.sh
912+++ /dev/null
913@@ -1,149 +0,0 @@
914-#!/usr/bin/env bash
915-# shellcheck disable=SC2086 # we want word splitting
916-# shellcheck disable=SC1091 # paths only become valid at runtime
917-
918-set -uex
919-
920-# Set default ADB command if not set already
921-
922-: "${ADB:=adb}"
923-
924-$ADB wait-for-device root
925-sleep 1
926-
927-# overlay
928-
929-REMOUNT_PATHS="/vendor"
930-if [ "$ANDROID_VERSION" -ge 15 ]; then
931- REMOUNT_PATHS="$REMOUNT_PATHS /system"
932-fi
933-
934-OV_TMPFS="/data/overlay-remount"
935-$ADB shell mkdir -p "$OV_TMPFS"
936-$ADB shell mount -t tmpfs none "$OV_TMPFS"
937-
938-for path in $REMOUNT_PATHS; do
939- $ADB shell mkdir -p "${OV_TMPFS}${path}-upper"
940- $ADB shell mkdir -p "${OV_TMPFS}${path}-work"
941-
942- opts="lowerdir=${path},upperdir=${OV_TMPFS}${path}-upper,workdir=${OV_TMPFS}${path}-work"
943- $ADB shell mount -t overlay -o "$opts" none ${path}
944-done
945-
946-$ADB shell setenforce 0
947-
948-$ADB push /android-tools/eglinfo /data
949-$ADB push /android-tools/vulkaninfo /data
950-
951-get_gles_runtime_renderer() {
952- while [ "$($ADB shell XDG_CACHE_HOME=/data/local/tmp /data/eglinfo | grep 'OpenGL ES profile renderer':)" = "" ] ; do sleep 1; done
953- $ADB shell XDG_CACHE_HOME=/data/local/tmp /data/eglinfo | grep 'OpenGL ES profile renderer' | head -1
954-}
955-
956-get_gles_runtime_version() {
957- while [ "$($ADB shell XDG_CACHE_HOME=/data/local/tmp /data/eglinfo | grep 'OpenGL ES profile version:')" = "" ] ; do sleep 1; done
958- $ADB shell XDG_CACHE_HOME=/data/local/tmp /data/eglinfo | grep 'OpenGL ES profile version:' | head -1
959-}
960-
961-get_vk_runtime_device_name() {
962- $ADB shell XDG_CACHE_HOME=/data/local/tmp /data/vulkaninfo | grep deviceName | head -1
963-}
964-
965-get_vk_runtime_version() {
966- $ADB shell XDG_CACHE_HOME=/data/local/tmp /data/vulkaninfo | grep driverInfo | head -1
967-}
968-
969-# Check what GLES & VK implementation is used before uploading the new libraries
970-get_gles_runtime_renderer
971-get_gles_runtime_version
972-get_vk_runtime_device_name
973-get_vk_runtime_version
974-
975-# replace libraries
976-
977-$ADB shell rm -f /vendor/lib64/libgallium_dri.so*
978-$ADB shell rm -f /vendor/lib64/egl/libEGL_mesa.so*
979-$ADB shell rm -f /vendor/lib64/egl/libGLESv1_CM_mesa.so*
980-$ADB shell rm -f /vendor/lib64/egl/libGLESv2_mesa.so*
981-
982-$ADB push "$INSTALL/lib/libgallium_dri.so" /vendor/lib64/libgallium_dri.so
983-$ADB push "$INSTALL/lib/libEGL.so" /vendor/lib64/egl/libEGL_mesa.so
984-$ADB push "$INSTALL/lib/libGLESv1_CM.so" /vendor/lib64/egl/libGLESv1_CM_mesa.so
985-$ADB push "$INSTALL/lib/libGLESv2.so" /vendor/lib64/egl/libGLESv2_mesa.so
986-
987-# Remove and replace Vulkan drivers
988-if [ "${CUTTLEFISH_GPU_MODE:-}" = "venus" ] || [ "${CUTTLEFISH_GPU_MODE:-}" = "venus_guest_angle" ]; then
989- $ADB shell rm -f /vendor/lib64/hw/vulkan.virtio.so*
990- $ADB push "$INSTALL/lib/libvulkan_virtio.so" /vendor/lib64/hw/vulkan.virtio.so
991-else
992- $ADB shell rm -f /vendor/lib64/hw/vulkan.${VK_DRIVER}.so*
993- $ADB push "$INSTALL/lib/libvulkan_${VK_DRIVER}.so" /vendor/lib64/hw/vulkan.${VK_DRIVER}.so
994-fi
995-
996-$ADB shell rm -f /vendor/lib64/egl/libEGL_emulation.so*
997-$ADB shell rm -f /vendor/lib64/egl/libGLESv1_CM_emulation.so*
998-$ADB shell rm -f /vendor/lib64/egl/libGLESv2_emulation.so*
999-
1000-if [ -n "${ANGLE_TAG:-}" ]; then
1001- ANGLE_DEST_PATH=/vendor/lib64/egl
1002- if [ "$ANDROID_VERSION" -ge 15 ]; then
1003- ANGLE_DEST_PATH=/system/lib64
1004- fi
1005-
1006- $ADB shell rm -f "$ANGLE_DEST_PATH/libEGL_angle.so"*
1007- $ADB shell rm -f "$ANGLE_DEST_PATH/libGLESv1_CM_angle.so"*
1008- $ADB shell rm -f "$ANGLE_DEST_PATH/libGLESv2_angle.so"*
1009-
1010- $ADB push /angle/libEGL_angle.so "$ANGLE_DEST_PATH/libEGL_angle.so"
1011- $ADB push /angle/libGLESv1_CM_angle.so "$ANGLE_DEST_PATH/libGLESv1_CM_angle.so"
1012- $ADB push /angle/libGLESv2_angle.so "$ANGLE_DEST_PATH/libGLESv2_angle.so"
1013-fi
1014-
1015-# Check what GLES & VK implementation is used after uploading the new libraries
1016-MESA_BUILD_VERSION=$(cat "$INSTALL/VERSION")
1017-get_gles_runtime_renderer
1018-GLES_RUNTIME_VERSION="$(get_gles_runtime_version)"
1019-get_vk_runtime_device_name
1020-VK_RUNTIME_VERSION="$(get_vk_runtime_version)"
1021-
1022-if [ -n "${ANGLE_TAG:-}" ]; then
1023- # Note: we are injecting the ANGLE libs too, so we need to check if the
1024- # new ANGLE libs are being used.
1025- ANGLE_HASH=$(head -c 12 /angle/version)
1026- if ! printf "%s" "$GLES_RUNTIME_VERSION" | grep --quiet "${ANGLE_HASH}"; then
1027- echo "Fatal: Android is loading a wrong version of the ANGLE libs: ${ANGLE_HASH}" 1>&2
1028- exit 1
1029- fi
1030-fi
1031-
1032-if ! printf "%s" "$VK_RUNTIME_VERSION" | grep -Fq -- "${MESA_BUILD_VERSION}"; then
1033- echo "Fatal: Android is loading a wrong version of the Mesa3D Vulkan libs: ${VK_RUNTIME_VERSION}" 1>&2
1034- exit 1
1035-fi
1036-
1037-get_surfaceflinger_pid() {
1038- while [ "$($ADB shell dumpsys -l | grep 'SurfaceFlinger$')" = "" ] ; do sleep 1; done
1039- $ADB shell ps -A | grep -i surfaceflinger | tr -s ' ' | cut -d ' ' -f 2
1040-}
1041-
1042-OLD_SF_PID=$(get_surfaceflinger_pid)
1043-
1044-# restart Android shell, so that services use the new libraries
1045-$ADB shell stop
1046-$ADB shell start
1047-
1048-# Check that SurfaceFlinger restarted, to ensure that new libraries have been picked up
1049-NEW_SF_PID=$(get_surfaceflinger_pid)
1050-
1051-if [ "$OLD_SF_PID" == "$NEW_SF_PID" ]; then
1052- echo "Fatal: check that SurfaceFlinger restarted" 1>&2
1053- exit 1
1054-fi
1055-
1056-# These should be the last commands of the script in order to correctly
1057-# propagate the exit code.
1058-if [ -n "${ANDROID_CTS_TAG:-}" ]; then
1059- . "$(dirname "$0")/android-cts-runner.sh"
1060-else
1061- . "$(dirname "$0")/android-deqp-runner.sh"
1062-fi
1063diff --git a/.gitlab-ci/android-skips.txt b/.gitlab-ci/android-skips.txt
1064deleted file mode 100644
1065index 21e9e2f..0000000
1066--- a/.gitlab-ci/android-skips.txt
1067+++ /dev/null
1068@@ -1,8 +0,0 @@
1069-# Skip these tests when running fractional dEQP batches, as the AHB tests are expected
1070-# to be handled separately in a non-fractional run within the deqp-runner suite.
1071-dEQP-VK.api.external.memory.android_hardware_buffer.*
1072-
1073-# Skip all WSI tests: the DEQP_ANDROID_EXE build used can't create native windows, as
1074-# only APKs support window creation on Android.
1075-dEQP-VK.image.swapchain_mutable.*
1076-dEQP-VK.wsi.*
1077diff --git a/.gitlab-ci/angle-skips.txt b/.gitlab-ci/angle-skips.txt
1078deleted file mode 100644
1079index 4ccedad..0000000
1080--- a/.gitlab-ci/angle-skips.txt
1081+++ /dev/null
1082@@ -1,7 +0,0 @@
1083-# Unlike zink which does support it, ANGLE relies on a waiver to not implement
1084-# capturing individual array elements (see waivers.xml and gles3-waivers.txt in the CTS)
1085-dEQP-GLES3.functional.transform_feedback.array_element.*
1086-dEQP-GLES3.functional.transform_feedback.random.*
1087-dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.*_array_element
1088-dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.*.array.*
1089-KHR-GLES31.core.program_interface_query.transform-feedback-types
1090diff --git a/.gitlab-ci/bare-metal/.editorconfig b/.gitlab-ci/bare-metal/.editorconfig
1091deleted file mode 100644
1092index 71174ec..0000000
1093--- a/.gitlab-ci/bare-metal/.editorconfig
1094+++ /dev/null
1095@@ -1,2 +0,0 @@
1096-[*.sh]
1097-indent_size = 2
1098diff --git a/.gitlab-ci/bare-metal/bm-init.sh b/.gitlab-ci/bare-metal/bm-init.sh
1099deleted file mode 100755
1100index 75a3ead..0000000
1101--- a/.gitlab-ci/bare-metal/bm-init.sh
1102+++ /dev/null
1103@@ -1,16 +0,0 @@
1104-#!/bin/sh
1105-
1106-# Init entrypoint for bare-metal devices; calls common init code.
1107-
1108-# First stage: very basic setup to bring up network and /dev etc
1109-/init-stage1.sh
1110-INIT_STAGE1_EXIT_CODE=$?
1111-
1112-export CURRENT_SECTION=dut_boot
1113-
1114-# Second stage: run jobs
1115-test $INIT_STAGE1_EXIT_CODE -eq 0 && /init-stage2.sh
1116-
1117-# Wait until the job would have timed out anyway, so we don't spew a "init
1118-# exited" panic.
1119-sleep 6000
1120diff --git a/.gitlab-ci/bare-metal/gitlab-ci.yml b/.gitlab-ci/bare-metal/gitlab-ci.yml
1121deleted file mode 100644
1122index f7900cd..0000000
1123--- a/.gitlab-ci/bare-metal/gitlab-ci.yml
1124+++ /dev/null
1125@@ -1,121 +0,0 @@
1126-.baremetal-test:
1127- extends:
1128- - .test
1129- # Cancel job if a newer commit is pushed to the same branch
1130- interruptible: true
1131- before_script:
1132- - !reference [.download_s3, before_script]
1133- variables:
1134- BM_ROOTFS: /rootfs-${DEBIAN_ARCH}
1135- artifacts:
1136- when: always
1137- name: "${CI_PROJECT_NAME}_${CI_JOB_NAME_SLUG}"
1138- paths:
1139- - results/
1140- - serial*.txt
1141- exclude:
1142- - results/*.shader_cache
1143- reports:
1144- junit: results/junit.xml
1145-
1146-# ARM testing of bare-metal boards attached to an x86 gitlab-runner system
1147-.baremetal-test-arm32-gl:
1148- extends:
1149- - .baremetal-test
1150- - .use-debian/baremetal_arm32_test-gl
1151- variables:
1152- DEBIAN_ARCH: armhf
1153- S3_ARTIFACT_NAME: mesa-arm32-default-debugoptimized
1154- needs:
1155- - job: debian/baremetal_arm32_test-gl
1156- optional: true
1157- - job: debian-arm32
1158- artifacts: false
1159-
1160-# ARM64 testing of bare-metal boards attached to an x86 gitlab-runner system
1161-.baremetal-test-arm64-gl:
1162- extends:
1163- - .baremetal-test
1164- - .use-debian/baremetal_arm64_test-gl
1165- variables:
1166- DEBIAN_ARCH: arm64
1167- S3_ARTIFACT_NAME: mesa-arm64-default-debugoptimized
1168- needs:
1169- - job: debian/baremetal_arm64_test-gl
1170- optional: true
1171- - job: debian-arm64
1172- artifacts: false
1173-
1174-# ARM64 testing of bare-metal boards attached to an x86 gitlab-runner system
1175-.baremetal-test-arm64-vk:
1176- extends:
1177- - .baremetal-test
1178- - .use-debian/baremetal_arm64_test-vk
1179- variables:
1180- DEBIAN_ARCH: arm64
1181- S3_ARTIFACT_NAME: mesa-arm64-default-debugoptimized
1182- needs:
1183- - job: debian/baremetal_arm64_test-vk
1184- optional: true
1185- - job: debian-arm64
1186- artifacts: false
1187-
1188-# ARM32/64 testing of bare-metal boards attached to an x86 gitlab-runner system, using an asan mesa build
1189-.baremetal-arm32-asan-test-gl:
1190- variables:
1191- S3_ARTIFACT_NAME: mesa-arm32-asan-debugoptimized
1192- DEQP_FORCE_ASAN: 1
1193- needs:
1194- - job: debian/baremetal_arm32_test-gl
1195- optional: true
1196- - job: debian-arm32-asan
1197- artifacts: false
1198-
1199-.baremetal-arm64-asan-test-gl:
1200- variables:
1201- S3_ARTIFACT_NAME: mesa-arm64-asan-debugoptimized
1202- DEQP_FORCE_ASAN: 1
1203- needs:
1204- - job: debian/baremetal_arm64_test-gl
1205- optional: true
1206- - job: debian-arm64-asan
1207- artifacts: false
1208-
1209-.baremetal-arm64-asan-test-vk:
1210- variables:
1211- S3_ARTIFACT_NAME: mesa-arm64-asan-debugoptimized
1212- DEQP_FORCE_ASAN: 1
1213- needs:
1214- - job: debian/baremetal_arm64_test-vk
1215- optional: true
1216- - job: debian-arm64-asan
1217- artifacts: false
1218-
1219-.baremetal-arm64-ubsan-test-gl:
1220- extends:
1221- - .baremetal-test
1222- - .use-debian/baremetal_arm64_test-gl
1223- variables:
1224- S3_ARTIFACT_NAME: mesa-arm64-ubsan-debugoptimized
1225- needs:
1226- - job: debian/baremetal_arm64_test-gl
1227- optional: true
1228- - job: debian-arm64-ubsan
1229- artifacts: false
1230-
1231-.baremetal-arm64-ubsan-test-vk:
1232- extends:
1233- - .baremetal-test
1234- - .use-debian/baremetal_arm64_test-vk
1235- variables:
1236- S3_ARTIFACT_NAME: mesa-arm64-ubsan-debugoptimized
1237- needs:
1238- - job: debian/baremetal_arm64_test-vk
1239- optional: true
1240- - job: debian-arm64-ubsan
1241- artifacts: false
1242-
1243-.baremetal-deqp-test:
1244- variables:
1245- HWCI_TEST_SCRIPT: "/install/deqp-runner.sh"
1246- FDO_CI_CONCURRENT: 0 # Default to number of CPUs
1247diff --git a/.gitlab-ci/bare-metal/poe-off b/.gitlab-ci/bare-metal/poe-off
1248deleted file mode 100755
1249index 6451720..0000000
1250--- a/.gitlab-ci/bare-metal/poe-off
1251+++ /dev/null
1252@@ -1,16 +0,0 @@
1253-#!/bin/bash
1254-
1255-if [ -z "$BM_POE_INTERFACE" ]; then
1256- echo "Must supply the PoE Interface to power up"
1257- exit 1
1258-fi
1259-
1260-if [ -z "$BM_POE_ADDRESS" ]; then
1261- echo "Must supply the PoE Switch host"
1262- exit 1
1263-fi
1264-
1265-SNMP_KEY="SNMPv2-SMI::mib-2.105.1.1.1.3.1.$((${BM_POE_BASE:-0} + BM_POE_INTERFACE))"
1266-SNMP_OFF="i 2"
1267-
1268-flock /var/run/poe.lock -c "snmpset -v2c -r 3 -t 30 -cmesaci $BM_POE_ADDRESS $SNMP_KEY $SNMP_OFF"
1269diff --git a/.gitlab-ci/bare-metal/poe-on b/.gitlab-ci/bare-metal/poe-on
1270deleted file mode 100755
1271index c5fde69..0000000
1272--- a/.gitlab-ci/bare-metal/poe-on
1273+++ /dev/null
1274@@ -1,19 +0,0 @@
1275-#!/bin/bash
1276-
1277-if [ -z "$BM_POE_INTERFACE" ]; then
1278- echo "Must supply the PoE Interface to power up"
1279- exit 1
1280-fi
1281-
1282-if [ -z "$BM_POE_ADDRESS" ]; then
1283- echo "Must supply the PoE Switch host"
1284- exit 1
1285-fi
1286-
1287-SNMP_KEY="SNMPv2-SMI::mib-2.105.1.1.1.3.1.$((${BM_POE_BASE:-0} + BM_POE_INTERFACE))"
1288-SNMP_ON="i 1"
1289-SNMP_OFF="i 2"
1290-
1291-flock /var/run/poe.lock -c "snmpset -v2c -r 3 -t 30 -cmesaci $BM_POE_ADDRESS $SNMP_KEY $SNMP_OFF"
1292-sleep 3s
1293-flock /var/run/poe.lock -c "snmpset -v2c -r 3 -t 30 -cmesaci $BM_POE_ADDRESS $SNMP_KEY $SNMP_ON"
1294diff --git a/.gitlab-ci/bare-metal/poe-powered.sh b/.gitlab-ci/bare-metal/poe-powered.sh
1295deleted file mode 100755
1296index 116e6a9..0000000
1297--- a/.gitlab-ci/bare-metal/poe-powered.sh
1298+++ /dev/null
1299@@ -1,192 +0,0 @@
1300-#!/bin/bash
1301-# shellcheck disable=SC1091
1302-# shellcheck disable=SC2034
1303-# shellcheck disable=SC2059
1304-# shellcheck disable=SC2086 # we want word splitting
1305-
1306-. "$SCRIPTS_DIR"/setup-test-env.sh
1307-
1308-# Boot script for devices attached to a PoE switch, using NFS for the root
1309-# filesystem.
1310-
1311-# We're run from the root of the repo, make a helper var for our paths
1312-BM=$CI_PROJECT_DIR/install/bare-metal
1313-CI_COMMON=$CI_PROJECT_DIR/install/common
1314-CI_INSTALL=$CI_PROJECT_DIR/install
1315-
1316-# Runner config checks
1317-if [ -z "$BM_SERIAL" ]; then
1318- echo "Must set BM_SERIAL in your gitlab-runner config.toml [[runners]] environment"
1319- echo "This is the serial port to listen the device."
1320- exit 1
1321-fi
1322-
1323-if [ -z "$BM_POE_ADDRESS" ]; then
1324- echo "Must set BM_POE_ADDRESS in your gitlab-runner config.toml [[runners]] environment"
1325- echo "This is the PoE switch address to connect for powering up/down devices."
1326- exit 1
1327-fi
1328-
1329-if [ -z "$BM_POE_INTERFACE" ]; then
1330- echo "Must set BM_POE_INTERFACE in your gitlab-runner config.toml [[runners]] environment"
1331- echo "This is the PoE switch interface where the device is connected."
1332- exit 1
1333-fi
1334-
1335-if [ -z "$BM_POWERUP" ]; then
1336- echo "Must set BM_POWERUP in your gitlab-runner config.toml [[runners]] environment"
1337- echo "This is a shell script that should power up the device and begin its boot sequence."
1338- exit 1
1339-fi
1340-
1341-if [ -z "$BM_POWERDOWN" ]; then
1342- echo "Must set BM_POWERDOWN in your gitlab-runner config.toml [[runners]] environment"
1343- echo "This is a shell script that should power off the device."
1344- exit 1
1345-fi
1346-
1347-if [ ! -d /nfs ]; then
1348- echo "NFS rootfs directory needs to be mounted at /nfs by the gitlab runner"
1349- exit 1
1350-fi
1351-
1352-if [ ! -d /tftp ]; then
1353- echo "TFTP directory for this board needs to be mounted at /tftp by the gitlab runner"
1354- exit 1
1355-fi
1356-
1357-# job config checks
1358-if [ -z "$BM_ROOTFS" ]; then
1359- echo "Must set BM_ROOTFS to your board's rootfs directory in the job's variables"
1360- exit 1
1361-fi
1362-
1363-if [ -z "$BM_BOOTFS" ] && { [ -z "$BM_KERNEL" ] || [ -z "$BM_DTB" ]; } ; then
1364- echo "Must set /boot files for the TFTP boot in the job's variables or set kernel and dtb"
1365- exit 1
1366-fi
1367-
1368-if [ -z "$BM_CMDLINE" ]; then
1369- echo "Must set BM_CMDLINE to your board's kernel command line arguments"
1370- exit 1
1371-fi
1372-
1373-section_start prepare_rootfs "Preparing rootfs components"
1374-
1375-set -ex
1376-
1377-date +'%F %T'
1378-
1379-# Clear out any previous run's artifacts.
1380-rm -rf results/
1381-mkdir -p results
1382-
1383-# Create the rootfs in the NFS directory. rm to make sure it's in a pristine
1384-# state, since it's volume-mounted on the host.
1385-rsync -a --delete $BM_ROOTFS/ /nfs/
1386-
1387-date +'%F %T'
1388-
1389-# If BM_BOOTFS is an URL, download it
1390-if echo $BM_BOOTFS | grep -q http; then
1391- curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
1392- "${FDO_HTTP_CACHE_URI:-}$BM_BOOTFS" -o /tmp/bootfs.tar
1393- BM_BOOTFS=/tmp/bootfs.tar
1394-fi
1395-
1396-date +'%F %T'
1397-
1398-# If BM_BOOTFS is a file, assume it is a tarball and uncompress it
1399-if [ -f "${BM_BOOTFS}" ]; then
1400- mkdir -p /tmp/bootfs
1401- tar xf $BM_BOOTFS -C /tmp/bootfs
1402- BM_BOOTFS=/tmp/bootfs
1403-fi
1404-
1405-date +'%F %T'
1406-
1407-# Install kernel modules (it could be either in /lib/modules or
1408-# /usr/lib/modules, but we want to install in the latter)
1409-if [ -n "${BM_BOOTFS}" ]; then
1410- [ -d $BM_BOOTFS/usr/lib/modules ] && rsync -a $BM_BOOTFS/usr/lib/modules/ /nfs/usr/lib/modules/
1411- [ -d $BM_BOOTFS/lib/modules ] && rsync -a $BM_BOOTFS/lib/modules/ /nfs/lib/modules/
1412-else
1413- echo "No modules!"
1414-fi
1415-
1416-
1417-date +'%F %T'
1418-
1419-# Install kernel image + bootloader files
1420-if [ -z "$BM_BOOTFS" ]; then
1421- mv "${BM_KERNEL}" "${BM_DTB}.dtb" /tftp/
1422-else # BM_BOOTFS
1423- rsync -aL --delete $BM_BOOTFS/boot/ /tftp/
1424-fi
1425-
1426-date +'%F %T'
1427-
1428-# Create the rootfs in the NFS directory
1429-. $BM/rootfs-setup.sh /nfs
1430-
1431-date +'%F %T'
1432-
1433-echo "$BM_CMDLINE" > /tftp/cmdline.txt
1434-
1435-# Add some options in config.txt, if defined
1436-if [ -n "$BM_BOOTCONFIG" ]; then
1437- printf "$BM_BOOTCONFIG" >> /tftp/config.txt
1438-fi
1439-
1440-section_end prepare_rootfs
1441-
1442-set +e
1443-STRUCTURED_LOG_FILE=results/job_detail.json
1444-export PYTHONPATH=$CI_INSTALL
1445-python3 $CI_INSTALL/custom_logger.py ${STRUCTURED_LOG_FILE} --update dut_job_type "${DEVICE_TYPE}"
1446-python3 $CI_INSTALL/custom_logger.py ${STRUCTURED_LOG_FILE} --update farm "${FARM}"
1447-ATTEMPTS=3
1448-first_attempt=True
1449-while [ $((ATTEMPTS--)) -gt 0 ]; do
1450- section_start dut_boot "Booting hardware device ..."
1451- python3 $CI_INSTALL/custom_logger.py ${STRUCTURED_LOG_FILE} --create-dut-job dut_name "${CI_RUNNER_DESCRIPTION}"
1452- # Update subtime time to CI_JOB_STARTED_AT only for the first run
1453- if [ "$first_attempt" = "True" ]; then
1454- python3 $CI_INSTALL/custom_logger.py ${STRUCTURED_LOG_FILE} --update-dut-time submit "${CI_JOB_STARTED_AT}"
1455- else
1456- python3 $CI_INSTALL/custom_logger.py ${STRUCTURED_LOG_FILE} --update-dut-time submit
1457- fi
1458- python3 $BM/poe_run.py \
1459- --dev="$BM_SERIAL" \
1460- --powerup="$BM_POWERUP" \
1461- --powerdown="$BM_POWERDOWN" \
1462- --boot-timeout-seconds ${BOOT_PHASE_TIMEOUT_SECONDS:-300} \
1463- --test-timeout-minutes ${TEST_PHASE_TIMEOUT_MINUTES:-$((CI_JOB_TIMEOUT/60 - ${TEST_SETUP_AND_UPLOAD_MARGIN_MINUTES:-5}))}
1464- ret=$?
1465-
1466- if [ $ret -eq 2 ]; then
1467- python3 $CI_INSTALL/custom_logger.py ${STRUCTURED_LOG_FILE} --close-dut-job
1468- first_attempt=False
1469- error "Device failed to boot; will retry"
1470- else
1471- # We're no longer in dut_boot by this point
1472- unset CURRENT_SECTION
1473- ATTEMPTS=0
1474- fi
1475-done
1476-
1477-section_start dut_cleanup "Cleaning up after job"
1478-python3 $CI_INSTALL/custom_logger.py ${STRUCTURED_LOG_FILE} --close-dut-job
1479-python3 $CI_INSTALL/custom_logger.py ${STRUCTURED_LOG_FILE} --close
1480-set -e
1481-
1482-date +'%F %T'
1483-
1484-# Bring artifacts back from the NFS dir to the build dir where gitlab-runner
1485-# will look for them.
1486-cp -Rp /nfs/results/. results/
1487-
1488-date +'%F %T'
1489-section_end dut_cleanup
1490-
1491-exit $ret
1492diff --git a/.gitlab-ci/bare-metal/poe_run.py b/.gitlab-ci/bare-metal/poe_run.py
1493deleted file mode 100755
1494index d9c8841..0000000
1495--- a/.gitlab-ci/bare-metal/poe_run.py
1496+++ /dev/null
1497@@ -1,133 +0,0 @@
1498-#!/usr/bin/env python3
1499-#
1500-# Copyright © 2020 Igalia, S.L.
1501-#
1502-# Permission is hereby granted, free of charge, to any person obtaining a
1503-# copy of this software and associated documentation files (the "Software"),
1504-# to deal in the Software without restriction, including without limitation
1505-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
1506-# and/or sell copies of the Software, and to permit persons to whom the
1507-# Software is furnished to do so, subject to the following conditions:
1508-#
1509-# The above copyright notice and this permission notice (including the next
1510-# paragraph) shall be included in all copies or substantial portions of the
1511-# Software.
1512-#
1513-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1514-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1515-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
1516-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1517-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
1518-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
1519-# IN THE SOFTWARE.
1520-
1521-import argparse
1522-import os
1523-import re
1524-import sys
1525-import threading
1526-
1527-from custom_logger import CustomLogger
1528-from serial_buffer import SerialBuffer
1529-
1530-class PoERun:
1531- def __init__(self, args, boot_timeout, test_timeout, logger):
1532- self.powerup = args.powerup
1533- self.powerdown = args.powerdown
1534- self.ser = SerialBuffer(
1535- args.dev, "results/serial-output.txt", ": ")
1536- self.boot_timeout = boot_timeout
1537- self.test_timeout = test_timeout
1538- self.logger = logger
1539-
1540- def print_error(self, message):
1541- RED = '\033[0;31m'
1542- NO_COLOR = '\033[0m'
1543- print(RED + message + NO_COLOR)
1544- self.logger.update_status_fail(message)
1545-
1546- def logged_system(self, cmd):
1547- print("Running '{}'".format(cmd))
1548- return os.system(cmd)
1549-
1550- def run(self):
1551- if self.logged_system(self.powerup) != 0:
1552- self.logger.update_status_fail("powerup failed")
1553- return 1
1554-
1555- boot_detected = False
1556- self.logger.create_job_phase("boot")
1557- for line in self.ser.lines(timeout=self.boot_timeout, phase="bootloader"):
1558- if re.search("Booting Linux", line):
1559- boot_detected = True
1560- break
1561-
1562- if not boot_detected:
1563- self.print_error(
1564- "Something wrong; couldn't detect the boot start up sequence")
1565- return 2
1566-
1567- self.logger.create_job_phase("test")
1568- for line in self.ser.lines(timeout=self.test_timeout, phase="test"):
1569- if re.search("---. end Kernel panic", line):
1570- self.logger.update_status_fail("kernel panic")
1571- return 1
1572-
1573- # Binning memory problems
1574- if re.search("binner overflow mem", line):
1575- self.print_error("Memory overflow in the binner; GPU hang")
1576- return 1
1577-
1578- if re.search("nouveau 57000000.gpu: bus: MMIO read of 00000000 FAULT at 137000", line):
1579- self.print_error("nouveau jetson boot bug, abandoning run.")
1580- return 1
1581-
1582- # network fail on tk1
1583- if re.search("NETDEV WATCHDOG:.* transmit queue 0 timed out", line):
1584- self.print_error("nouveau jetson tk1 network fail, abandoning run.")
1585- return 1
1586-
1587- result = re.search(r"hwci: mesa: exit_code: (\d+)", line)
1588- if result:
1589- exit_code = int(result.group(1))
1590-
1591- if exit_code == 0:
1592- self.logger.update_dut_job("status", "pass")
1593- else:
1594- self.logger.update_status_fail("test fail")
1595-
1596- self.logger.update_dut_job("exit_code", exit_code)
1597- return exit_code
1598-
1599- self.print_error(
1600- "Reached the end of the CPU serial log without finding a result")
1601- return 1
1602-
1603-
1604-def main():
1605- parser = argparse.ArgumentParser()
1606- parser.add_argument('--dev', type=str,
1607- help='Serial device to monitor', required=True)
1608- parser.add_argument('--powerup', type=str,
1609- help='shell command for rebooting', required=True)
1610- parser.add_argument('--powerdown', type=str,
1611- help='shell command for powering off', required=True)
1612- parser.add_argument(
1613- '--boot-timeout-seconds', type=int, help='Boot phase timeout (seconds)', required=True)
1614- parser.add_argument(
1615- '--test-timeout-minutes', type=int, help='Test phase timeout (minutes)', required=True)
1616- args = parser.parse_args()
1617-
1618- logger = CustomLogger("results/job_detail.json")
1619- logger.update_dut_time("start", None)
1620- poe = PoERun(args, args.boot_timeout_seconds, args.test_timeout_minutes * 60, logger)
1621- retval = poe.run()
1622-
1623- poe.logged_system(args.powerdown)
1624- logger.update_dut_time("end", None)
1625-
1626- sys.exit(retval)
1627-
1628-
1629-if __name__ == '__main__':
1630- main()
1631diff --git a/.gitlab-ci/bare-metal/rootfs-setup.sh b/.gitlab-ci/bare-metal/rootfs-setup.sh
1632deleted file mode 100644
1633index 90e45a6..0000000
1634--- a/.gitlab-ci/bare-metal/rootfs-setup.sh
1635+++ /dev/null
1636@@ -1,34 +0,0 @@
1637-#!/usr/bin/env bash
1638-# shellcheck disable=SC2086 # we want word splitting
1639-
1640-rootfs_dst=$1
1641-
1642-mkdir -p $rootfs_dst/results
1643-
1644-# Set up the init script that brings up the system.
1645-cp $BM/bm-init.sh $rootfs_dst/init
1646-cp $CI_COMMON/init*.sh $rootfs_dst/
1647-
1648-date +'%F %T'
1649-
1650-# Make JWT token available as file in the bare-metal storage to enable access
1651-# to MinIO
1652-cp "${S3_JWT_FILE}" "${rootfs_dst}${S3_JWT_FILE}"
1653-
1654-date +'%F %T'
1655-
1656-cp "$SCRIPTS_DIR/setup-test-env.sh" "$rootfs_dst/"
1657-
1658-set +x
1659-
1660-# Pass through relevant env vars from the gitlab job to the baremetal init script
1661-echo "Variables passed through:"
1662-filter_env_vars | tee $rootfs_dst/set-job-env-vars.sh
1663-
1664-set -x
1665-
1666-# Add the Mesa drivers we built, and make a consistent symlink to them.
1667-mkdir -p $rootfs_dst/$CI_PROJECT_DIR
1668-rsync -aH --delete $CI_PROJECT_DIR/install/ $rootfs_dst/$CI_PROJECT_DIR/install/
1669-
1670-date +'%F %T'
1671diff --git a/.gitlab-ci/bare-metal/serial_buffer.py b/.gitlab-ci/bare-metal/serial_buffer.py
1672deleted file mode 100755
1673index f57060e..0000000
1674--- a/.gitlab-ci/bare-metal/serial_buffer.py
1675+++ /dev/null
1676@@ -1,186 +0,0 @@
1677-#!/usr/bin/env python3
1678-#
1679-# Copyright © 2020 Google LLC
1680-#
1681-# Permission is hereby granted, free of charge, to any person obtaining a
1682-# copy of this software and associated documentation files (the "Software"),
1683-# to deal in the Software without restriction, including without limitation
1684-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
1685-# and/or sell copies of the Software, and to permit persons to whom the
1686-# Software is furnished to do so, subject to the following conditions:
1687-#
1688-# The above copyright notice and this permission notice (including the next
1689-# paragraph) shall be included in all copies or substantial portions of the
1690-# Software.
1691-#
1692-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1693-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1694-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
1695-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1696-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
1697-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
1698-# IN THE SOFTWARE.
1699-
1700-import argparse
1701-from datetime import datetime, UTC
1702-import queue
1703-import serial
1704-import threading
1705-import time
1706-
1707-
1708-class SerialBuffer:
1709- def __init__(self, dev, filename, prefix, timeout=None, line_queue=None):
1710- self.filename = filename
1711- self.dev = dev
1712-
1713- if dev:
1714- self.f = open(filename, "wb+")
1715- self.serial = serial.Serial(dev, 115200, timeout=timeout)
1716- else:
1717- self.f = open(filename, "rb")
1718- self.serial = None
1719-
1720- self.byte_queue = queue.Queue()
1721- # allow multiple SerialBuffers to share a line queue so you can merge
1722- # servo's CPU and EC streams into one thing to watch the boot/test
1723- # progress on.
1724- if line_queue:
1725- self.line_queue = line_queue
1726- else:
1727- self.line_queue = queue.Queue()
1728- self.prefix = prefix
1729- self.timeout = timeout
1730- self.sentinel = object()
1731- self.closing = False
1732-
1733- if self.dev:
1734- self.read_thread = threading.Thread(
1735- target=self.serial_read_thread_loop, daemon=True)
1736- else:
1737- self.read_thread = threading.Thread(
1738- target=self.serial_file_read_thread_loop, daemon=True)
1739- self.read_thread.start()
1740-
1741- self.lines_thread = threading.Thread(
1742- target=self.serial_lines_thread_loop, daemon=True)
1743- self.lines_thread.start()
1744-
1745- def close(self):
1746- self.closing = True
1747- if self.serial:
1748- self.serial.cancel_read()
1749- self.read_thread.join()
1750- self.lines_thread.join()
1751- if self.serial:
1752- self.serial.close()
1753-
1754- # Thread that just reads the bytes from the serial device to try to keep from
1755- # buffer overflowing it. If nothing is received in 1 minute, it finalizes.
1756- def serial_read_thread_loop(self):
1757- greet = "Serial thread reading from %s\n" % self.dev
1758- self.byte_queue.put(greet.encode())
1759-
1760- while not self.closing:
1761- try:
1762- b = self.serial.read()
1763- if len(b) == 0:
1764- break
1765- self.byte_queue.put(b)
1766- except Exception as err:
1767- print(self.prefix + str(err))
1768- break
1769- self.byte_queue.put(self.sentinel)
1770-
1771- # Thread that just reads the bytes from the file of serial output that some
1772- # other process is appending to.
1773- def serial_file_read_thread_loop(self):
1774- greet = "Serial thread reading from %s\n" % self.filename
1775- self.byte_queue.put(greet.encode())
1776-
1777- while not self.closing:
1778- line = self.f.readline()
1779- if line:
1780- self.byte_queue.put(line)
1781- else:
1782- time.sleep(0.1)
1783- self.byte_queue.put(self.sentinel)
1784-
1785- # Thread that processes the stream of bytes to 1) log to stdout, 2) log to
1786- # file, 3) add to the queue of lines to be read by program logic
1787-
1788- def serial_lines_thread_loop(self):
1789- line = bytearray()
1790- while True:
1791- bytes = self.byte_queue.get(block=True)
1792-
1793- if bytes == self.sentinel:
1794- self.read_thread.join()
1795- self.line_queue.put(self.sentinel)
1796- break
1797-
1798- # Write our data to the output file if we're the ones reading from
1799- # the serial device
1800- if self.dev:
1801- self.f.write(bytes)
1802- self.f.flush()
1803-
1804- for b in bytes:
1805- line.append(b)
1806- if b == b'\n'[0]:
1807- line = line.decode(errors="replace")
1808-
1809- ts = datetime.now(tz=UTC)
1810- ts_str = f"{ts.hour:02}:{ts.minute:02}:{ts.second:02}.{int(ts.microsecond / 1000):03}"
1811- print("{endc}{time}{prefix}{line}".format(
1812- time=ts_str, prefix=self.prefix, line=line, endc='\033[0m'), flush=True, end='')
1813-
1814- self.line_queue.put(line)
1815- line = bytearray()
1816-
1817- def lines(self, timeout=None, phase=None):
1818- start_time = time.monotonic()
1819- while True:
1820- read_timeout = None
1821- if timeout:
1822- read_timeout = timeout - (time.monotonic() - start_time)
1823- if read_timeout <= 0:
1824- print("read timeout waiting for serial during {}".format(phase))
1825- self.close()
1826- break
1827-
1828- try:
1829- line = self.line_queue.get(timeout=read_timeout)
1830- except queue.Empty:
1831- print("read timeout waiting for serial during {}".format(phase))
1832- self.close()
1833- break
1834-
1835- if line == self.sentinel:
1836- print("End of serial output")
1837- self.lines_thread.join()
1838- break
1839-
1840- yield line
1841-
1842-
1843-def main():
1844- parser = argparse.ArgumentParser()
1845-
1846- parser.add_argument('--dev', type=str, help='Serial device')
1847- parser.add_argument('--file', type=str,
1848- help='Filename for serial output', required=True)
1849- parser.add_argument('--prefix', type=str,
1850- help='Prefix for logging serial to stdout', nargs='?')
1851-
1852- args = parser.parse_args()
1853-
1854- ser = SerialBuffer(args.dev, args.file, args.prefix or "")
1855- for line in ser.lines():
1856- # We're just using this as a logger, so eat the produced lines and drop
1857- # them
1858- pass
1859-
1860-
1861-if __name__ == '__main__':
1862- main()
1863diff --git a/.gitlab-ci/bin b/.gitlab-ci/bin
1864deleted file mode 120000
1865index 32fb7dc..0000000
1866--- a/.gitlab-ci/bin
1867+++ /dev/null
1868@@ -1 +0,0 @@
1869-../bin/ci
1870\ No newline at end of file
1871diff --git a/.gitlab-ci/build/gitlab-ci-inc.yml b/.gitlab-ci/build/gitlab-ci-inc.yml
1872deleted file mode 100644
1873index 2dae5ac..0000000
1874--- a/.gitlab-ci/build/gitlab-ci-inc.yml
1875+++ /dev/null
1876@@ -1,94 +0,0 @@
1877-.meson-build-for-tests:
1878- extends:
1879- - .build-linux
1880- stage: build-for-tests
1881- script:
1882- - &meson-build timeout --verbose ${BUILD_JOB_TIMEOUT_OVERRIDE:-$BUILD_JOB_TIMEOUT} bash --login .gitlab-ci/meson/build.sh
1883- - .gitlab-ci/prepare-artifacts.sh
1884-
1885-.meson-build-only:
1886- extends:
1887- - .meson-build-for-tests
1888- - .build-only-delayed-rules
1889- stage: build-only
1890- script:
1891- - *meson-build
1892-
1893-# Shared between windows and Linux
1894-.build-common:
1895- extends: .build-rules
1896- # Cancel job if a newer commit is pushed to the same branch
1897- interruptible: true
1898- variables:
1899- # Build jobs are typically taking between 5-12 minutes, depending on how
1900- # much they build and how many new Rust compilers we have to build twice.
1901- # Allow 25 minutes as a reasonable margin: beyond this point, something
1902- # has gone badly wrong, and we should try again to see if we can get
1903- # something from it.
1904- #
1905- # Some jobs not in the critical path use a higher timeout, particularly
1906- # when building with ASan or UBSan.
1907- BUILD_JOB_TIMEOUT: 12m
1908- RUN_MESON_TESTS: "true"
1909- timeout: 16m
1910- # We don't want to download any previous job's artifacts
1911- dependencies: []
1912- artifacts:
1913- name: "${CI_PROJECT_NAME}_${CI_JOB_NAME_SLUG}"
1914- when: always
1915- paths:
1916- - _build/meson-logs/*.txt
1917- - _build/meson-logs/strace
1918- - _build/.ninja_log
1919- - artifacts
1920-
1921-.build-run-long:
1922- variables:
1923- BUILD_JOB_TIMEOUT: 18m
1924- timeout: 25m
1925-
1926-
1927-# Just Linux
1928-.build-linux:
1929- extends: .build-common
1930- variables:
1931- C_ARGS: >
1932- -Wno-error=deprecated-declarations
1933- CCACHE_COMPILERCHECK: "content"
1934- CCACHE_COMPRESS: "true"
1935- CCACHE_DIR: /cache/mesa/ccache
1936- # Use ccache transparently, and print stats before/after
1937- before_script:
1938- - !reference [default, before_script]
1939- - |
1940- export PATH="/usr/lib/ccache:$PATH"
1941- export CCACHE_BASEDIR="$PWD"
1942- if test -x /usr/bin/ccache; then
1943- section_start ccache_before "ccache stats before build"
1944- ccache --show-stats
1945- section_end ccache_before
1946- fi
1947- after_script:
1948- - if test -x /usr/bin/ccache; then ccache --show-stats | grep "Hits:"; fi
1949-
1950-.build-windows:
1951- extends:
1952- - .build-common
1953- - .windows-docker-tags
1954- cache:
1955- key: ${CI_JOB_NAME}
1956- paths:
1957- - subprojects/packagecache
1958-
1959-.ci-deqp-artifacts:
1960- artifacts:
1961- name: "${CI_PROJECT_NAME}_${CI_JOB_NAME_SLUG}"
1962- when: always
1963- untracked: false
1964- paths:
1965- # Watch out! Artifacts are relative to the build dir.
1966- # https://gitlab.com/gitlab-org/gitlab-ce/commit/8788fb925706cad594adf6917a6c5f6587dd1521
1967- - artifacts
1968- - _build/meson-logs/*.txt
1969- - _build/meson-logs/strace
1970- - _build/.ninja_log
1971diff --git a/.gitlab-ci/build/gitlab-ci.yml b/.gitlab-ci/build/gitlab-ci.yml
1972deleted file mode 100644
1973index 50c8b0e..0000000
1974--- a/.gitlab-ci/build/gitlab-ci.yml
1975+++ /dev/null
1976@@ -1,765 +0,0 @@
1977-include:
1978- - local: '.gitlab-ci/build/gitlab-ci-inc.yml'
1979-
1980-# Git archive
1981-
1982-make-git-archive:
1983- extends:
1984- - .fdo.ci-fairy
1985- stage: git-archive
1986- rules:
1987- - !reference [.scheduled_pipeline-rules, rules]
1988- script:
1989- # Compactify the .git directory
1990- - git gc --aggressive
1991- # Download & cache the perfetto subproject as well.
1992- - rm -rf subprojects/perfetto ; mkdir -p subprojects/perfetto && curl --fail --location https://github.com/google/perfetto/archive/$(grep 'revision =' subprojects/perfetto.wrap | cut -d ' ' -f3).tar.gz | tar zxf - --strip-components=1 -C subprojects/perfetto
1993- # compress the current folder
1994- - tar -cvzf ../$CI_PROJECT_NAME.tar.gz .
1995-
1996- - ci-fairy s3cp --token-file "${S3_JWT_FILE}" ../$CI_PROJECT_NAME.tar.gz https://$S3_HOST/git-cache/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/$CI_PROJECT_NAME.tar.gz
1997-
1998-debian-x86_64:
1999- extends:
2000- - .meson-build-for-tests
2001- - .use-debian/x86_64_build
2002- - .build-run-long # but it really shouldn't! tracked in mesa#12544
2003- - .ci-deqp-artifacts
2004- variables:
2005- UNWIND: "enabled"
2006- DRI_LOADERS: >
2007- -D egl=enabled
2008- -D gbm=enabled
2009- -D glvnd=disabled
2010- -D glx=dri
2011- -D platforms=x11,wayland
2012- GALLIUM_ST: >
2013- -D gallium-rusticl=true
2014- -D gallium-va=enabled
2015- GALLIUM_DRIVERS: "llvmpipe,softpipe,virgl,radeonsi,zink,iris,svga"
2016- VULKAN_DRIVERS: "swrast,amd,intel,virtio"
2017- BUILDTYPE: "debugoptimized"
2018- EXTRA_OPTION: >
2019- -D intel-elk=false
2020- -D spirv-to-dxil=true
2021- -D tools=drm-shim
2022- -D valgrind=disabled
2023- -D perfetto=true
2024- S3_ARTIFACT_NAME: mesa-x86_64-default-${BUILDTYPE}
2025- RUN_MESON_TESTS: "false" # debian-build-x86_64 already runs these
2026- artifacts:
2027- reports:
2028- junit: artifacts/ci_scripts_report.xml
2029-
2030-debian-x86_64-asan:
2031- extends:
2032- - debian-x86_64
2033- - .meson-build-for-tests
2034- - .build-run-long
2035- variables:
2036- VULKAN_DRIVERS: "swrast,amd,intel"
2037- GALLIUM_DRIVERS: "llvmpipe,softpipe,zink,r300"
2038- EXTRA_OPTION: >
2039- -D intel-elk=false
2040- -D intel-rt=false
2041- -D b_sanitize=address
2042- -D gallium-va=false
2043- -D gallium-rusticl=false
2044- -D mesa-clc=system
2045- -D tools=dlclose-skip
2046- -D valgrind=disabled
2047- S3_ARTIFACT_NAME: mesa-x86_64-asan-${BUILDTYPE}
2048- ARTIFACTS_DEBUG_SYMBOLS: 1
2049- RUN_MESON_TESTS: "false" # just too slow
2050- # Do a host build for mesa-clc (asan complains not being loaded as
2051- # the first library)
2052- HOST_BUILD_OPTIONS: >
2053- -D build-tests=false
2054- -D enable-glcpp-tests=false
2055- -D gallium-rusticl=false
2056- -D gallium-drivers=
2057- -D glx=disabled
2058- -D install-mesa-clc=true
2059- -D mesa-clc=enabled
2060- -D platforms=
2061- -D video-codecs=
2062- -D vulkan-drivers=
2063-
2064-debian-x86_64-msan:
2065- # https://github.com/google/sanitizers/wiki/MemorySanitizerLibcxxHowTo
2066- # msan cannot fully work until it's used together with msan libc
2067- extends:
2068- - debian-clang
2069- - .meson-build-only
2070- - .build-run-long
2071- variables:
2072- # l_undef is incompatible with msan
2073- EXTRA_OPTION:
2074- -D b_sanitize=memory
2075- -D b_lundef=false
2076- -D mesa-clc=system
2077- -D precomp-compiler=system
2078- S3_ARTIFACT_NAME: ""
2079- ARTIFACTS_DEBUG_SYMBOLS: 1
2080- # Don't run all the tests yet:
2081- # GLSL has some issues in sexpression reading.
2082- # gtest has issues in its test initialization.
2083- MESON_TEST_ARGS: "--suite glcpp --suite format"
2084- GALLIUM_DRIVERS: "freedreno,iris,nouveau,r300,r600,llvmpipe,softpipe,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,radeonsi,tegra,d3d12,crocus"
2085- VULKAN_DRIVERS: intel,amd,broadcom,virtio
2086- C_ARGS: >
2087- -Wno-error=constant-conversion
2088- -Wno-error=enum-conversion
2089- -Wno-error=initializer-overrides
2090- -Wno-error=sometimes-uninitialized
2091- -Werror=misleading-indentation
2092- -Wno-error=deprecated-declarations
2093- CPP_ARGS: >
2094- -Wno-error=c99-designator
2095- -Wno-error=overloaded-virtual
2096- -Wno-error=tautological-constant-out-of-range-compare
2097- -Wno-error=unused-private-field
2098- -Wno-error=deprecated-declarations
2099- RUN_MESON_TESTS: "false" # just too slow
2100- # Do a host build for mesa-clc and precomp-compiler (msan complains about uninitialized
2101- # values in the LLVM libs)
2102- HOST_BUILD_OPTIONS: >
2103- -D build-tests=false
2104- -D enable-glcpp-tests=false
2105- -D gallium-drivers=
2106- -D vulkan-drivers=
2107- -D video-codecs=
2108- -D glx=disabled
2109- -D platforms=
2110- -D mesa-clc=enabled
2111- -D install-mesa-clc=true
2112- -D precomp-compiler=enabled
2113- -D install-precomp-compiler=true
2114- -D tools=panfrost
2115-
2116-debian-x86_64-ubsan:
2117- extends:
2118- - debian-x86_64
2119- - .meson-build-for-tests
2120- - .build-run-long
2121- variables:
2122- GALLIUM_DRIVERS: "llvmpipe,softpipe"
2123- VULKAN_DRIVERS: "swrast"
2124- EXTRA_OPTION: >
2125- -D b_sanitize=undefined
2126- -D mesa-clc=system
2127- -D gallium-rusticl=false
2128- -D gallium-va=false
2129- S3_ARTIFACT_NAME: ""
2130- ARTIFACTS_DEBUG_SYMBOLS: 1
2131- RUN_MESON_TESTS: "false" # just too slow
2132- HOST_BUILD_OPTIONS: >
2133- -D build-tests=false
2134- -D enable-glcpp-tests=false
2135- -D gallium-rusticl=false
2136- -D gallium-drivers=
2137- -D vulkan-drivers=
2138- -D video-codecs=
2139- -D glx=disabled
2140- -D platforms=
2141- -D mesa-clc=enabled
2142- -D install-mesa-clc=true
2143-
2144-debian-build-x86_64:
2145- extends:
2146- - .meson-build-for-tests
2147- - .use-debian/x86_64_build
2148- variables:
2149- UNWIND: "enabled"
2150- C_ARGS: >
2151- -Wno-error=deprecated-declarations
2152- CPP_ARGS: >
2153- -Wno-error=deprecated-declarations
2154- DRI_LOADERS: >
2155- -D glx=dri
2156- -D gbm=enabled
2157- -D egl=enabled
2158- -D glvnd=disabled
2159- -D platforms=x11,wayland
2160- GALLIUM_ST: >
2161- -D gallium-extra-hud=true
2162- -D gallium-va=enabled
2163- -D gallium-rusticl=true
2164- -D legacy-wayland=bind-wayland-display
2165- GALLIUM_DRIVERS: "i915,iris,nouveau,r300,r600,freedreno,llvmpipe,softpipe,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,d3d12,asahi,crocus,radeonsi"
2166- VULKAN_DRIVERS: "intel_hasvk,imagination,microsoft-experimental,nouveau,swrast"
2167- BUILDTYPE: "debugoptimized"
2168- EXTRA_OPTION: >
2169- -D spirv-to-dxil=true
2170- -D tools=drm-shim,etnaviv,freedreno,glsl,intel,intel-ui,nir,nouveau,lima,panfrost,asahi
2171- -D perfetto=true
2172- S3_ARTIFACT_NAME: debian-build-x86_64
2173-
2174-# Test a release build with -Werror so new warnings don't sneak in.
2175-debian-release:
2176- extends:
2177- - .meson-build-only
2178- - .use-debian/x86_64_build
2179- variables:
2180- UNWIND: "enabled"
2181- C_ARGS: >
2182- -Wno-error=deprecated-declarations
2183- CPP_ARGS: >
2184- -Wno-error=deprecated-declarations
2185- DRI_LOADERS: >
2186- -D glx=dri
2187- -D gbm=enabled
2188- -D egl=enabled
2189- -D glvnd=disabled
2190- -D platforms=x11,wayland
2191- GALLIUM_ST: >
2192- -D gallium-extra-hud=true
2193- -D gallium-va=enabled
2194- -D gallium-rusticl=false
2195- -D llvm=enabled
2196- GALLIUM_DRIVERS: "i915,iris,nouveau,r300,freedreno,llvmpipe,softpipe,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,d3d12,asahi,crocus"
2197- VULKAN_DRIVERS: "swrast,intel_hasvk,imagination,microsoft-experimental"
2198- EXTRA_OPTION: >
2199- -D spirv-to-dxil=true
2200- -D tools=all
2201- -D mesa-clc=enabled
2202- -D precomp-compiler=enabled
2203- -D intel-rt=enabled
2204- -D imagination-srv=true
2205- BUILDTYPE: "release"
2206- S3_ARTIFACT_NAME: "mesa-x86_64-default-${BUILDTYPE}"
2207- script:
2208- - !reference [.meson-build-only, script]
2209- - 'if [ -n "$MESA_CI_PERFORMANCE_ENABLED" ]; then .gitlab-ci/prepare-artifacts.sh; fi'
2210-
2211-alpine-build-testing:
2212- extends:
2213- - .meson-build-only
2214- - .use-alpine/x86_64_build
2215- variables:
2216- BUILDTYPE: "release"
2217- C_ARGS: >
2218- -Wno-error=cpp
2219- -Wno-error=array-bounds
2220- -Wno-error=deprecated-declarations
2221- DRI_LOADERS: >
2222- -D glx=disabled
2223- -D gbm=enabled
2224- -D egl=enabled
2225- -D glvnd=disabled
2226- -D platforms=wayland
2227- GALLIUM_DRIVERS: "crocus,etnaviv,freedreno,iris,lima,nouveau,panfrost,r300,r600,radeonsi,svga,llvmpipe,softpipe,tegra,v3d,vc4,virgl,zink"
2228- GALLIUM_ST: >
2229- -D gallium-extra-hud=true
2230- -D gallium-va=enabled
2231- -D gallium-rusticl=false
2232- -D gles1=disabled
2233- -D gles2=enabled
2234- -D llvm=enabled
2235- -D llvm-orcjit=true
2236- -D microsoft-clc=disabled
2237- -D shared-llvm=enabled
2238- UNWIND: "disabled"
2239- VULKAN_DRIVERS: "amd,broadcom,freedreno,intel,imagination"
2240-
2241-fedora-release:
2242- extends:
2243- - .meson-build-only
2244- - .use-fedora/x86_64_build
2245- - .build-run-long
2246- # LTO builds can be really very slow, and we have no way to specify different
2247- # timeouts for pre-merge and nightly jobs
2248- timeout: 1h
2249- variables:
2250- BUILDTYPE: "release"
2251- # array-bounds are pure non-LTO gcc buggy warning
2252- # maybe-uninitialized is misfiring in nir_lower_gs_intrinsics.c, and
2253- # a "maybe" warning should never be an error anyway.
2254- C_ARGS: >
2255- -Wno-error=array-bounds
2256- -Wno-error=maybe-uninitialized
2257- -Wno-error=deprecated-declarations
2258- CPP_ARGS: >
2259- -Wno-error=deprecated-declarations
2260- DRI_LOADERS: >
2261- -D glx=dri
2262- -D gbm=enabled
2263- -D egl=enabled
2264- -D glvnd=enabled
2265- -D platforms=x11,wayland
2266- EXTRA_OPTION: >
2267- -D tools=drm-shim,etnaviv,freedreno,glsl,intel,nir,nouveau,lima,panfrost,imagination
2268- -D vulkan-layers=device-select,overlay
2269- -D intel-rt=enabled
2270- -D imagination-srv=true
2271- -D teflon=true
2272- GALLIUM_DRIVERS: "crocus,etnaviv,freedreno,i915,iris,lima,nouveau,panfrost,r300,r600,radeonsi,svga,llvmpipe,softpipe,tegra,v3d,vc4,virgl,zink"
2273- GALLIUM_ST: >
2274- -D gallium-extra-hud=true
2275- -D gallium-va=enabled
2276- -D gallium-rusticl=true
2277- -D gles1=disabled
2278- -D gles2=enabled
2279- -D llvm=enabled
2280- -D microsoft-clc=disabled
2281- -D shared-llvm=enabled
2282- UNWIND: "disabled"
2283- VULKAN_DRIVERS: "amd,asahi,broadcom,freedreno,imagination,intel,intel_hasvk"
2284-
2285-debian-android:
2286- extends:
2287- - .android-variables
2288- - .meson-cross
2289- - .use-debian/android_build
2290- - .ci-deqp-artifacts
2291- - .meson-build-for-tests
2292- variables:
2293- BUILDTYPE: debug
2294- UNWIND: "disabled"
2295- C_ARGS: >
2296- -Wno-error=asm-operand-widths
2297- -Wno-error=constant-conversion
2298- -Wno-error=enum-conversion
2299- -Wno-error=initializer-overrides
2300- -Wno-error=sometimes-uninitialized
2301- CPP_ARGS: >
2302- -Wno-error=c99-designator
2303- DRI_LOADERS: >
2304- -D glx=disabled
2305- -D gbm=disabled
2306- -D egl=enabled
2307- -D glvnd=disabled
2308- -D platforms=android
2309- FORCE_FALLBACK_FOR: llvm
2310- EXTRA_OPTION: >
2311- -D amd-use-llvm=false
2312- -D android-stub=true
2313- -D platform-sdk-version=${ANDROID_SDK_VERSION}
2314- -D cpp_rtti=false
2315- -D valgrind=disabled
2316- -D android-libbacktrace=disabled
2317- -D mesa-clc=system
2318- -D precomp-compiler=system
2319- -D perfetto=true
2320- -D freedreno-kmds=msm,virtio
2321- GALLIUM_ST: >
2322- -D gallium-va=disabled
2323- -D gallium-rusticl=false
2324- PKG_CONFIG_LIBDIR: "/disable/non/android/system/pc/files"
2325- HOST_BUILD_OPTIONS: >
2326- -D build-tests=false
2327- -D enable-glcpp-tests=false
2328- -D gallium-drivers=
2329- -D vulkan-drivers=
2330- -D video-codecs=
2331- -D glx=disabled
2332- -D platforms=
2333- -D mesa-clc=enabled
2334- -D install-mesa-clc=true
2335- -D precomp-compiler=enabled
2336- -D install-precomp-compiler=true
2337- -D tools=panfrost
2338- script:
2339- # x86_64 build:
2340- - export CROSS=x86_64-linux-android
2341- - export GALLIUM_DRIVERS=iris,radeonsi,softpipe,virgl,zink
2342- - export VULKAN_DRIVERS=amd,intel,nouveau,swrast,virtio
2343- - .gitlab-ci/create-llvm-meson-wrap-file.sh
2344- - export S3_ARTIFACT_NAME=mesa-x86_64-android-${BUILDTYPE}
2345- - !reference [.meson-build-for-tests, script]
2346- # remove all the files created by the previous build before the next build
2347- - git clean -dxf .
2348- # aarch64 build:
2349- - export CROSS=aarch64-linux-android
2350- - export GALLIUM_DRIVERS=etnaviv,freedreno,lima,panfrost,vc4,v3d,zink
2351- - export VULKAN_DRIVERS=freedreno,broadcom,panfrost,virtio
2352- - export S3_ARTIFACT_NAME=mesa-arm64-android-${BUILDTYPE}
2353- - !reference [.meson-build-for-tests, script]
2354-
2355-.meson-cross:
2356- extends:
2357- - .meson-build-only
2358- - .use-debian/x86_64_build
2359- variables:
2360- UNWIND: "disabled"
2361- DRI_LOADERS: >
2362- -D glx=dri
2363- -D gbm=enabled
2364- -D egl=enabled
2365- -D platforms=x11,wayland
2366- GALLIUM_ST: >
2367- -D gallium-va=disabled
2368-
2369-.meson-arm:
2370- extends:
2371- - .meson-cross
2372- - .use-debian/arm64_build
2373- variables:
2374- VULKAN_DRIVERS: "asahi,broadcom,freedreno"
2375- GALLIUM_DRIVERS: "etnaviv,freedreno,lima,nouveau,panfrost,llvmpipe,softpipe,tegra,v3d,vc4,zink"
2376- BUILDTYPE: "debugoptimized"
2377-
2378-debian-arm32:
2379- extends:
2380- - .meson-arm
2381- - .ci-deqp-artifacts
2382- - .meson-build-for-tests
2383- variables:
2384- CROSS: armhf
2385- DRI_LOADERS:
2386- -D glvnd=disabled
2387- # remove asahi & llvmpipe from the .meson-arm list because here we have llvm=disabled
2388- VULKAN_DRIVERS: "broadcom,freedreno"
2389- GALLIUM_DRIVERS: "etnaviv,freedreno,lima,nouveau,panfrost,softpipe,tegra,v3d,vc4,zink"
2390- EXTRA_OPTION: >
2391- -D llvm=disabled
2392- -D valgrind=disabled
2393- -D gallium-rusticl=false
2394- -D mesa-clc=system
2395- -D precomp-compiler=system
2396- HOST_BUILD_OPTIONS: >
2397- -D build-tests=false
2398- -D enable-glcpp-tests=false
2399- -D gallium-drivers=
2400- -D vulkan-drivers=
2401- -D video-codecs=
2402- -D glx=disabled
2403- -D platforms=
2404- -D mesa-clc=enabled
2405- -D install-mesa-clc=true
2406- -D precomp-compiler=enabled
2407- -D install-precomp-compiler=true
2408- -D tools=panfrost
2409- S3_ARTIFACT_NAME: mesa-arm32-default-${BUILDTYPE}
2410- # The strip command segfaults, failing to strip the binary and leaving
2411- # tempfiles in our artifacts.
2412- ARTIFACTS_DEBUG_SYMBOLS: 1
2413-
2414-debian-arm32-asan:
2415- extends:
2416- - debian-arm32
2417- - .meson-build-for-tests
2418- - .build-run-long
2419- variables:
2420- GALLIUM_DRIVERS: "etnaviv"
2421- VULKAN_DRIVERS: ""
2422- DRI_LOADERS:
2423- -D glvnd=disabled
2424- EXTRA_OPTION: >
2425- -D llvm=disabled
2426- -D b_sanitize=address
2427- -D valgrind=disabled
2428- -D tools=dlclose-skip
2429- -D gallium-rusticl=false
2430- ARTIFACTS_DEBUG_SYMBOLS: 1
2431- RUN_MESON_TESTS: "false" # just too slow
2432- S3_ARTIFACT_NAME: mesa-arm32-asan-${BUILDTYPE}
2433-
2434-debian-arm64:
2435- extends:
2436- - .meson-arm
2437- - .ci-deqp-artifacts
2438- - .meson-build-for-tests
2439- variables:
2440- GALLIUM_DRIVERS: "etnaviv,freedreno,lima,panfrost,v3d,vc4,zink"
2441- VULKAN_DRIVERS: "broadcom,freedreno,imagination,panfrost"
2442- DRI_LOADERS:
2443- -D glvnd=disabled
2444- EXTRA_OPTION: >
2445- -D valgrind=disabled
2446- -D imagination-srv=true
2447- -D freedreno-kmds=msm,virtio
2448- -D teflon=true
2449- -D perfetto=true
2450- GALLIUM_ST:
2451- -D gallium-rusticl=true
2452- -D legacy-wayland=bind-wayland-display
2453- RUN_MESON_TESTS: "false" # run by debian-arm64-build-testing
2454- S3_ARTIFACT_NAME: mesa-arm64-default-${BUILDTYPE}
2455-
2456-debian-arm64-asan:
2457- extends:
2458- - debian-arm64
2459- - .meson-build-for-tests
2460- - .build-run-long
2461- variables:
2462- VULKAN_DRIVERS: "broadcom,freedreno,panfrost"
2463- GALLIUM_DRIVERS: "freedreno,vc4,v3d,panfrost"
2464- DRI_LOADERS:
2465- -D glvnd=disabled
2466- EXTRA_OPTION: >
2467- -D b_sanitize=address
2468- -D valgrind=disabled
2469- -D tools=dlclose-skip
2470- -D gallium-rusticl=false
2471- ARTIFACTS_DEBUG_SYMBOLS: 1
2472- RUN_MESON_TESTS: "false" # just too slow
2473- S3_ARTIFACT_NAME: mesa-arm64-asan-${BUILDTYPE}
2474-
2475-debian-arm64-ubsan:
2476- extends:
2477- - debian-arm64
2478- - .meson-build-for-tests
2479- - .build-run-long
2480- variables:
2481- VULKAN_DRIVERS: "broadcom"
2482- GALLIUM_DRIVERS: "v3d,vc4"
2483- C_ARGS: >
2484- -Wno-error=array-bounds
2485- DRI_LOADERS:
2486- -D glvnd=disabled
2487- EXTRA_OPTION: >
2488- -D b_sanitize=undefined
2489- -D gallium-rusticl=false
2490- ARTIFACTS_DEBUG_SYMBOLS: 1
2491- RUN_MESON_TESTS: "false" # just too slow
2492- S3_ARTIFACT_NAME: mesa-arm64-ubsan-${BUILDTYPE}
2493-
2494-debian-arm64-build-test:
2495- extends:
2496- - .meson-arm
2497- - .ci-deqp-artifacts
2498- - .meson-build-only
2499- variables:
2500- VULKAN_DRIVERS: "amd,asahi,imagination,nouveau"
2501- DRI_LOADERS:
2502- -D glvnd=disabled
2503- EXTRA_OPTION: >
2504- -D tools=panfrost,imagination
2505- -D perfetto=true
2506-
2507-debian-arm64-release:
2508- extends:
2509- - debian-arm64
2510- - .meson-build-only
2511- variables:
2512- BUILDTYPE: release
2513- S3_ARTIFACT_NAME: mesa-arm64-default-${BUILDTYPE}
2514- script:
2515- - !reference [.meson-build-only, script]
2516- - 'if [ -n "$MESA_CI_PERFORMANCE_ENABLED" ]; then .gitlab-ci/prepare-artifacts.sh; fi'
2517-
2518-debian-no-libdrm:
2519- extends:
2520- - .meson-arm
2521- - .meson-build-only
2522- variables:
2523- VULKAN_DRIVERS: freedreno
2524- GALLIUM_DRIVERS: "zink,llvmpipe"
2525- BUILDTYPE: release
2526- EXTRA_OPTION: >
2527- -D freedreno-kmds=kgsl
2528- -D glx=dri
2529- -D gbm=disabled
2530- -D egl=enabled
2531- -D perfetto=true
2532- -D platforms=x11,wayland
2533-
2534-debian-clang:
2535- extends:
2536- - .meson-build-only
2537- - .use-debian/x86_64_build
2538- variables:
2539- BUILDTYPE: debug
2540- UNWIND: "enabled"
2541- C_ARGS: >
2542- -Wno-error=constant-conversion
2543- -Wno-error=enum-conversion
2544- -Wno-error=initializer-overrides
2545- -Wno-error=sometimes-uninitialized
2546- -Werror=misleading-indentation
2547- -Wno-error=deprecated-declarations
2548- CPP_ARGS: >
2549- -Wno-error=c99-designator
2550- -Wno-error=overloaded-virtual
2551- -Wno-error=tautological-constant-out-of-range-compare
2552- -Wno-error=unused-private-field
2553- -Wno-error=vla-cxx-extension
2554- -Wno-error=deprecated-declarations
2555- DRI_LOADERS: >
2556- -D glx=dri
2557- -D gbm=enabled
2558- -D egl=enabled
2559- -D glvnd=enabled
2560- -D platforms=x11,wayland
2561- GALLIUM_ST: >
2562- -D gallium-extra-hud=true
2563- -D gallium-va=enabled
2564- -D gles1=enabled
2565- -D gles2=enabled
2566- -D llvm=enabled
2567- -D microsoft-clc=disabled
2568- -D shared-llvm=enabled
2569- GALLIUM_DRIVERS: "iris,nouveau,r300,r600,freedreno,llvmpipe,softpipe,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,radeonsi,tegra,d3d12,crocus,i915,asahi"
2570- VULKAN_DRIVERS: intel,amd,freedreno,broadcom,virtio,swrast,panfrost,imagination,microsoft-experimental,nouveau
2571- EXTRA_OPTION:
2572- -D spirv-to-dxil=true
2573- -D imagination-srv=true
2574- -D tools=drm-shim,etnaviv,freedreno,glsl,intel,intel-ui,nir,nouveau,lima,panfrost,asahi,imagination
2575- -D vulkan-layers=device-select,overlay
2576- -D build-radv-tests=true
2577- -D build-aco-tests=true
2578- -D mesa-clc=enabled
2579- -D precomp-compiler=enabled
2580- -D intel-rt=enabled
2581- -D imagination-srv=true
2582- -D teflon=true
2583- CC: clang-${LLVM_VERSION}
2584- CXX: clang++-${LLVM_VERSION}
2585-
2586-debian-clang-release:
2587- extends:
2588- - debian-clang
2589- - .meson-build-only
2590- - .build-run-long
2591- variables:
2592- BUILDTYPE: "release"
2593- C_ARGS: >
2594- -Wno-error=constant-conversion
2595- -Wno-error=enum-conversion
2596- -Wno-error=initializer-overrides
2597- -Wno-error=sometimes-uninitialized
2598- -Wno-error=deprecated-declarations
2599- CPP_ARGS: >
2600- -Wno-error=c99-designator
2601- -Wno-error=overloaded-virtual
2602- -Wno-error=tautological-constant-out-of-range-compare
2603- -Wno-error=unused-private-field
2604- -Wno-error=vla-cxx-extension
2605- -Wno-error=deprecated-declarations
2606- DRI_LOADERS: >
2607- -D glx=xlib
2608- -D platforms=x11,wayland
2609- GALLIUM_ST: >
2610- -D gallium-extra-hud=true
2611- -D gallium-va=enabled
2612- -D gles1=disabled
2613- -D gles2=disabled
2614- -D llvm=enabled
2615- -D microsoft-clc=disabled
2616- -D shared-llvm=enabled
2617-
2618-windows-msvc:
2619- extends:
2620- - .build-windows
2621- - .use-windows_build_msvc
2622- - .windows-build-rules
2623- stage: build-for-tests
2624- script:
2625- - pwsh -ExecutionPolicy RemoteSigned .\.gitlab-ci\windows\mesa_build.ps1
2626- artifacts:
2627- paths:
2628- - _build/meson-logs/*.txt
2629- - _install/
2630-
2631-debian-vulkan:
2632- extends:
2633- - .meson-build-only
2634- - .use-debian/x86_64_build
2635- variables:
2636- BUILDTYPE: debug
2637- UNWIND: "disabled"
2638- DRI_LOADERS: >
2639- -D glx=disabled
2640- -D gbm=disabled
2641- -D egl=disabled
2642- -D opengl=false
2643- -D gles1=disabled
2644- -D gles2=disabled
2645- -D glvnd=disabled
2646- -D platforms=x11,wayland
2647- GALLIUM_ST: >
2648- -D gallium-va=disabled
2649- -D gallium-rusticl=false
2650- -D b_sanitize=undefined
2651- -D c_args=-fno-sanitize-recover=all
2652- -D cpp_args=-fno-sanitize-recover=all
2653- UBSAN_OPTIONS: "print_stacktrace=1"
2654- VULKAN_DRIVERS: amd,asahi,broadcom,freedreno,intel,intel_hasvk,panfrost,virtio,imagination,microsoft-experimental,nouveau,kosmickrisp
2655- EXTRA_OPTION: >
2656- -D vulkan-layers=device-select,overlay
2657- -D tools=drm-shim
2658- -D build-radv-tests=true
2659- -D build-aco-tests=true
2660- -D intel-rt=disabled
2661- -D imagination-srv=true
2662-
2663-debian-x86_32:
2664- extends:
2665- - .meson-cross
2666- - .use-debian/x86_32_build
2667- - .meson-build-only
2668- - .build-run-long # it's not clear why this runs long, but it also doesn't matter much
2669- variables:
2670- BUILDTYPE: debug
2671- CROSS: i386
2672- VULKAN_DRIVERS: intel,amd,swrast,virtio,panfrost
2673- GALLIUM_DRIVERS: "iris,nouveau,r300,r600,radeonsi,llvmpipe,softpipe,virgl,zink,crocus,d3d12,panfrost"
2674- DRI_LOADERS:
2675- -D glvnd=disabled
2676- EXTRA_OPTION: >
2677- -D vulkan-layers=device-select,overlay
2678- -D mesa-clc=system
2679- CPP_ARGS: >
2680- -Wno-error=deprecated-declarations
2681- C_LINK_ARGS: >
2682- -Wl,--no-warn-rwx-segments
2683- CPP_LINK_ARGS: >
2684- -Wl,--no-warn-rwx-segments
2685- HOST_BUILD_OPTIONS: >
2686- -D build-tests=false
2687- -D enable-glcpp-tests=false
2688- -D gallium-drivers=
2689- -D vulkan-drivers=
2690- -D video-codecs=
2691- -D glx=disabled
2692- -D platforms=
2693- -D mesa-clc=enabled
2694- -D install-mesa-clc=true
2695-
2696-# In case of issues with this job, contact @frankbinns
2697-.debian-riscv64:
2698- extends:
2699- - .meson-cross
2700- - .use-debian/riscv64_build
2701- - .meson-build-only
2702- tags:
2703- - $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64_KVM
2704- variables:
2705- BUILDTYPE: debug
2706- CROSS: riscv64
2707- GALLIUM_DRIVERS: "llvmpipe,zink"
2708- VULKAN_DRIVERS: "swrast"
2709- # See https://gitlab.freedesktop.org/mesa/mesa/-/issues/14123
2710- MESON_TEST_ARGS: "--no-suite mesa:llvmpipe"
2711-
2712-# While s390 is dead, s390x is very much alive, and one of the last major
2713-# big-endian platforms, so it provides useful coverage.
2714-# In case of issues with this job, contact @ajax
2715-.debian-s390x:
2716- extends:
2717- - .meson-cross
2718- - .use-debian/s390x_build
2719- - .meson-build-only
2720- tags:
2721- - $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64_KVM
2722- variables:
2723- BUILDTYPE: debug
2724- CROSS: s390x
2725- GALLIUM_DRIVERS: "llvmpipe,virgl,zink"
2726- VULKAN_DRIVERS: "swrast,virtio"
2727- DRI_LOADERS:
2728- -D glvnd=disabled
2729-
2730-.debian-ppc64el:
2731- extends:
2732- - .meson-cross
2733- - .use-debian/ppc64el_build
2734- - .meson-build-only
2735- variables:
2736- BUILDTYPE: debug
2737- CROSS: ppc64el
2738- GALLIUM_DRIVERS: "nouveau,llvmpipe,softpipe,virgl,zink"
2739- VULKAN_DRIVERS: "swrast"
2740- DRI_LOADERS:
2741- -D glvnd=disabled
2742diff --git a/.gitlab-ci/ci-tron/gitlab-ci.yml b/.gitlab-ci/ci-tron/gitlab-ci.yml
2743deleted file mode 100644
2744index ec03668..0000000
2745--- a/.gitlab-ci/ci-tron/gitlab-ci.yml
2746+++ /dev/null
2747@@ -1,287 +0,0 @@
2748-# For CI-tron based testing farm jobs.
2749-.ci-tron-test:
2750- extends:
2751- - .ci-tron-b2c-job-v1
2752- variables:
2753- GIT_STRATEGY: none
2754- B2C_VERSION: v0.9.17 # Linux 6.16.3
2755-
2756- CI_TRON_PATTERN__JOB_SUCCESS__REGEX: 'hwci: mesa: exit_code: 0\r$'
2757- CI_TRON_PATTERN__SESSION_END__REGEX: '^.*It''s now safe to turn off your computer\r$'
2758-
2759- CI_TRON_TIMEOUT__FIRST_CONSOLE_ACTIVITY__MINUTES: 2
2760- CI_TRON_TIMEOUT__FIRST_CONSOLE_ACTIVITY__RETRIES: 3
2761- CI_TRON_TIMEOUT__CONSOLE_ACTIVITY__MINUTES: 5
2762-
2763- DEQP_RUNNER_SHADER_CACHE_DIR: /cache
2764- VKD3D_SHADER_CACHE_PATH: /cache
2765- PIGLIT_CACHE_DIR: /cache
2766-
2767- CI_TRON__B2C_ARTIFACT_EXCLUSION: "install/*"
2768- CI_TRON_HTTP_ARTIFACT__INSTALL__PATH: "/install.tar.zst"
2769- CI_TRON_HTTP_ARTIFACT__INSTALL__URL: "https://$PIPELINE_ARTIFACTS_BASE/$S3_ARTIFACT_NAME.tar.zst"
2770-
2771- CI_TRON__B2C_MACHINE_REGISTRATION_CMD: "setup --tags $CI_TRON_DUT_SETUP_TAGS"
2772-
2773- CI_TRON__B2C_IMAGE_UNDER_TEST: $MESA_IMAGE
2774- CI_TRON__B2C_EXEC_SHELL: bash
2775- CI_TRON__B2C_EXEC_SHELL_FLAGS: "-euc -o pipefail"
2776- CI_TRON__B2C_EXEC_CMD: "curl --silent --fail-with-body {{ job.http.url }}$CI_TRON_HTTP_ARTIFACT__INSTALL__PATH | tar --zstd --extract && export SCRIPTS_DIR=$$PWD/install && $$SCRIPTS_DIR/common/init-stage2.sh"
2777-
2778- # Assume by default this is running deqp, as that's almost always true
2779- HWCI_TEST_SCRIPT: install/deqp-runner.sh
2780-
2781- # Per-job files need to be in CI_PROJECT_DIR
2782- S3_JWT_FILE: $CI_PROJECT_DIR/s3_jwt
2783-
2784- # Keep the job script in the artifacts
2785- CI_TRON_JOB_SCRIPT_PATH: results/job_script.sh
2786- tags:
2787- - farm:$RUNNER_FARM_LOCATION
2788- - ci-tron:priority:$CI_TRON_JOB_PRIORITY
2789- - $CI_TRON_DUT_SETUP_TAGS
2790-
2791- # Override the default before_script, as it is not compatible with the CI-tron environment. We just keep the clearing
2792- # of the JWT token for security reasons
2793- before_script:
2794- - |
2795- set -eu
2796-
2797- eval "$S3_JWT_FILE_SCRIPT"
2798-
2799- for var in CI_TRON_DUT_SETUP_TAGS; do
2800- if [[ -z "$(eval echo \${$var:-})" ]]; then
2801- echo "The required variable '$var' is missing"
2802- exit 1
2803- fi
2804- done
2805-
2806- # Open a section that will be closed by b2c
2807- echo -e "\n\e[0Ksection_start:`date +%s`:b2c_kernel_boot[collapsed=true]\r\e[0K\e[0;36mSubmitting the CI-tron job and booting the DUT\e[0m\n"
2808-
2809- # Anything our job places in results/ will be collected by the
2810- # Gitlab coordinator for status presentation. results/junit.xml
2811- # will be parsed by the UI for more detailed explanations of
2812- # test execution.
2813- artifacts:
2814- when: always
2815- name: "${CI_PROJECT_NAME}_${CI_JOB_NAME_SLUG}"
2816- paths:
2817- - results
2818- reports:
2819- junit: results/**/junit.xml
2820-
2821-.ci-tron-x86_64-test:
2822- extends:
2823- - .ci-tron-test
2824- variables:
2825- CI_TRON_INITRAMFS__B2C__URL: 'https://gitlab.freedesktop.org/gfx-ci/boot2container/-/releases/$B2C_VERSION/downloads/initramfs.linux_amd64.cpio.xz'
2826- CI_TRON_KERNEL__URL: 'https://gitlab.freedesktop.org/gfx-ci/boot2container/-/releases/$B2C_VERSION/downloads/linux-x86_64'
2827-
2828- # Set the following variables if you need AMD, Intel, or NVIDIA support
2829- # CI_TRON_INITRAMFS__DEPMOD__URL: "https://gitlab.freedesktop.org/gfx-ci/boot2container/-/releases/$B2C_VERSION/downloads/linux-x86_64.depmod.cpio.xz"
2830- # CI_TRON_INITRAMFS__GPU__URL: "https://gitlab.freedesktop.org/gfx-ci/boot2container/-/releases/$B2C_VERSION/downloads/linux-x86_64.gpu.cpio"
2831- # CI_TRON_INITRAMFS__GPU__FORMAT__0__ARCHIVE__KEEP__0__PATH: "(lib/(modules|firmware/amdgpu)/.*)"
2832-
2833- S3_ARTIFACT_NAME: "mesa-x86_64-default-debugoptimized"
2834-
2835-.ci-tron-x86_64-test-vk:
2836- extends:
2837- - .use-debian/x86_64_test-vk
2838- - .ci-tron-x86_64-test
2839- needs:
2840- - job: debian/x86_64_test-vk
2841- artifacts: false
2842- optional: true
2843- - job: debian-x86_64
2844- artifacts: false
2845-
2846-.ci-tron-x86_64-test-vk-manual:
2847- extends:
2848- - .use-debian/x86_64_test-vk
2849- - .ci-tron-x86_64-test
2850- variables:
2851- S3_ARTIFACT_NAME: "debian-build-x86_64"
2852- needs:
2853- - job: debian/x86_64_test-vk
2854- artifacts: false
2855- optional: true
2856- - job: debian-build-x86_64
2857- artifacts: false
2858-
2859-.ci-tron-x86_64-test-video:
2860- extends:
2861- - .use-debian/x86_64_test-video
2862- - .ci-tron-x86_64-test
2863- needs:
2864- - job: debian/x86_64_test-video
2865- artifacts: false
2866- optional: true
2867- - job: debian-x86_64
2868- artifacts: false
2869-
2870-.ci-tron-x86_64-test-gl:
2871- extends:
2872- - .use-debian/x86_64_test-gl
2873- - .ci-tron-x86_64-test
2874- needs:
2875- - job: debian/x86_64_test-gl
2876- artifacts: false
2877- optional: true
2878- - job: debian-x86_64
2879- artifacts: false
2880-
2881-.ci-tron-x86_64-test-gl-manual:
2882- extends:
2883- - .use-debian/x86_64_test-gl
2884- - .ci-tron-x86_64-test
2885- variables:
2886- S3_ARTIFACT_NAME: "debian-build-x86_64"
2887- needs:
2888- - job: debian/x86_64_test-gl
2889- artifacts: false
2890- optional: true
2891- - job: debian-build-x86_64
2892- artifacts: false
2893-
2894-.ci-tron-x86_64-test-gl-asan-manual:
2895- extends:
2896- - .use-debian/x86_64_test-gl
2897- - .ci-tron-x86_64-test
2898- variables:
2899- S3_ARTIFACT_NAME: "mesa-x86_64-asan-debugoptimized"
2900- DEQP_FORCE_ASAN: 1
2901- needs:
2902- - job: debian/x86_64_test-gl
2903- artifacts: false
2904- optional: true
2905- - job: debian-x86_64-asan
2906- artifacts: false
2907-
2908-.ci-tron-arm64-test:
2909- extends:
2910- - .ci-tron-test
2911- variables:
2912- CI_TRON_INITRAMFS__B2C__URL: 'https://gitlab.freedesktop.org/gfx-ci/boot2container/-/releases/$B2C_VERSION/downloads/initramfs.linux_arm64.cpio.xz'
2913- CI_TRON_KERNEL__URL: 'https://gitlab.freedesktop.org/gfx-ci/boot2container/-/releases/$B2C_VERSION/downloads/linux-arm64'
2914- S3_ARTIFACT_NAME: "mesa-arm64-default-debugoptimized"
2915-
2916-.ci-tron-arm64-test-vk:
2917- extends:
2918- - .use-debian/arm64_test-vk
2919- - .ci-tron-arm64-test
2920- needs:
2921- - job: debian/arm64_test-vk
2922- artifacts: false
2923- optional: true
2924- - job: debian-arm64
2925- artifacts: false
2926-
2927-.ci-tron-arm64-test-asan-vk:
2928- extends:
2929- - .use-debian/arm64_test-vk
2930- - .ci-tron-arm64-test
2931- variables:
2932- S3_ARTIFACT_NAME: "mesa-arm64-asan-debugoptimized"
2933- DEQP_FORCE_ASAN: 1
2934- needs:
2935- - job: debian/arm64_test-vk
2936- artifacts: false
2937- optional: true
2938- - job: debian-arm64-asan
2939- artifacts: false
2940-
2941-.ci-tron-arm64-test-ubsan-vk:
2942- extends:
2943- - .use-debian/arm64_test-vk
2944- - .ci-tron-arm64-test
2945- variables:
2946- S3_ARTIFACT_NAME: "mesa-arm64-ubsan-debugoptimized"
2947- needs:
2948- - job: debian/arm64_test-vk
2949- artifacts: false
2950- optional: true
2951- - job: debian-arm64-ubsan
2952- artifacts: false
2953-
2954-.ci-tron-arm64-test-gl:
2955- extends:
2956- - .use-debian/arm64_test-gl
2957- - .ci-tron-arm64-test
2958- needs:
2959- - job: debian/arm64_test-gl
2960- artifacts: false
2961- optional: true
2962- - job: debian-arm64
2963- artifacts: false
2964-
2965-.ci-tron-arm64-test-asan-gl:
2966- extends:
2967- - .use-debian/arm64_test-gl
2968- - .ci-tron-arm64-test
2969- variables:
2970- S3_ARTIFACT_NAME: "mesa-arm64-asan-debugoptimized"
2971- DEQP_FORCE_ASAN: 1
2972- needs:
2973- - job: debian/arm64_test-gl
2974- artifacts: false
2975- optional: true
2976- - job: debian-arm64-asan
2977- artifacts: false
2978-
2979-.ci-tron-arm64-test-ubsan-gl:
2980- extends:
2981- - .use-debian/arm64_test-gl
2982- - .ci-tron-arm64-test
2983- variables:
2984- S3_ARTIFACT_NAME: "mesa-arm64-ubsan-debugoptimized"
2985- needs:
2986- - job: debian/arm64_test-gl
2987- artifacts: false
2988- optional: true
2989- - job: debian-arm64-ubsan
2990- artifacts: false
2991-
2992-.ci-tron-arm32-test:
2993- extends:
2994- - .ci-tron-test
2995- variables:
2996- CI_TRON_INITRAMFS__B2C__URL: 'https://gitlab.freedesktop.org/gfx-ci/boot2container/-/releases/$B2C_VERSION/downloads/initramfs.linux_arm.cpio.xz'
2997- CI_TRON_KERNEL__URL: 'https://gitlab.freedesktop.org/gfx-ci/boot2container/-/releases/$B2C_VERSION/downloads/linux-arm'
2998- S3_ARTIFACT_NAME: "mesa-arm32-default-debugoptimized"
2999-
3000-.ci-tron-arm32-test-vk:
3001- extends:
3002- - .use-debian/arm32_test-vk
3003- - .ci-tron-arm32-test
3004- needs:
3005- - job: debian/arm32_test-vk
3006- artifacts: false
3007- optional: true
3008- - job: debian-arm32
3009- artifacts: false
3010-
3011-.ci-tron-arm32-test-gl:
3012- extends:
3013- - .use-debian/arm32_test-gl
3014- - .ci-tron-arm32-test
3015- needs:
3016- - job: debian/arm32_test-gl
3017- artifacts: false
3018- optional: true
3019- - job: debian-arm32
3020- artifacts: false
3021-
3022-.ci-tron-arm32-test-asan-gl:
3023- extends:
3024- - .use-debian/arm32_test-gl
3025- - .ci-tron-arm32-test
3026- variables:
3027- S3_ARTIFACT_NAME: "mesa-arm32-asan-debugoptimized"
3028- DEQP_FORCE_ASAN: 1
3029- needs:
3030- - job: debian/arm32_test-gl
3031- artifacts: false
3032- optional: true
3033- - job: debian-arm32-asan
3034- artifacts: false
3035diff --git a/.gitlab-ci/common/capture-devcoredump.sh b/.gitlab-ci/common/capture-devcoredump.sh
3036deleted file mode 100755
3037index f5f615d..0000000
3038--- a/.gitlab-ci/common/capture-devcoredump.sh
3039+++ /dev/null
3040@@ -1,35 +0,0 @@
3041-#!/usr/bin/env bash
3042-# shellcheck disable=SC2035
3043-# shellcheck disable=SC2061
3044-# shellcheck disable=SC2086 # we want word splitting
3045-
3046-while true; do
3047- devcds=$(find /sys/devices/virtual/devcoredump/ -name data 2>/dev/null)
3048- for i in $devcds; do
3049- echo "Found a devcoredump at $i."
3050- if cp $i $RESULTS_DIR/first.devcore; then
3051- echo 1 > $i
3052- echo "Saved to the job artifacts at /first.devcore"
3053- exit 0
3054- fi
3055- done
3056- i915_error_states=$(find /sys/devices/ -path */drm/card*/error)
3057- for i in $i915_error_states; do
3058- tmpfile=$(mktemp)
3059- cp "$i" "$tmpfile"
3060- filesize=$(stat --printf="%s" "$tmpfile")
3061- # Does the file contain "No error state collected" ?
3062- if [ "$filesize" = 25 ]; then
3063- rm "$tmpfile"
3064- else
3065- echo "Found an i915 error state at $i size=$filesize."
3066- if cp "$tmpfile" $RESULTS_DIR/first.i915_error_state; then
3067- rm "$tmpfile"
3068- echo 1 > "$i"
3069- echo "Saved to the job artifacts at /first.i915_error_state"
3070- exit 0
3071- fi
3072- fi
3073- done
3074- sleep 10
3075-done
3076diff --git a/.gitlab-ci/common/init-stage1.sh b/.gitlab-ci/common/init-stage1.sh
3077deleted file mode 100755
3078index a41b968..0000000
3079--- a/.gitlab-ci/common/init-stage1.sh
3080+++ /dev/null
3081@@ -1,37 +0,0 @@
3082-#!/bin/sh
3083-
3084-# Very early init, used to make sure devices and network are set up and
3085-# reachable.
3086-
3087-set -ex
3088-
3089-cd /
3090-
3091-findmnt --mountpoint /proc || mount -t proc none /proc
3092-findmnt --mountpoint /sys || mount -t sysfs none /sys
3093-findmnt --mountpoint /sys/kernel/debug || mount -t debugfs none /sys/kernel/debug
3094-findmnt --mountpoint /dev || mount -t devtmpfs none /dev
3095-mkdir -p /dev/pts
3096-findmnt --mountpoint /dev/pts || mount -t devpts devpts /dev/pts
3097-mkdir -p /dev/shm
3098-findmnt --mountpoint /dev/shm || mount -t tmpfs -o noexec,nodev,nosuid tmpfs /dev/shm
3099-findmnt --mountpoint /tmp || mount -t tmpfs tmpfs /tmp
3100-
3101-# For the vmware farm, change the nameserver as 8.8.8.8 is off limit.
3102-# This is temporary and will be reverted once the farm is moved.
3103-if [ "${FARM:-}" = "vmware" ]; then
3104- echo "nameserver 192.19.189.10" > /etc/resolv.conf
3105-else
3106- echo "nameserver 8.8.8.8" > /etc/resolv.conf
3107-fi
3108-
3109-[ -z "$NFS_SERVER_IP" ] || echo "$NFS_SERVER_IP caching-proxy" >> /etc/hosts
3110-
3111-# Set the time so we can validate certificates before we fetch anything;
3112-# however as not all DUTs have network, make this non-fatal.
3113-for _ in 1 2 3; do ntpdig -sS pool.ntp.org && break || sleep 2; done || true
3114-
3115-# Create a symlink from /dev/fd to /proc/self/fd if /dev/fd is missing.
3116-if [ ! -e /dev/fd ]; then
3117- ln -s /proc/self/fd /dev/fd
3118-fi
3119diff --git a/.gitlab-ci/common/init-stage2.sh b/.gitlab-ci/common/init-stage2.sh
3120deleted file mode 100755
3121index 26693e1..0000000
3122--- a/.gitlab-ci/common/init-stage2.sh
3123+++ /dev/null
3124@@ -1,245 +0,0 @@
3125-#!/bin/bash
3126-# shellcheck disable=SC1090
3127-# shellcheck disable=SC1091
3128-# shellcheck disable=SC2086 # we want word splitting
3129-# shellcheck disable=SC2155
3130-
3131-# Second-stage init, used to set up devices and our job environment before
3132-# running tests.
3133-
3134-shopt -s extglob
3135-
3136-# Make sure to kill itself and all the children process from this script on
3137-# exiting, since any console output may interfere with LAVA signals handling,
3138-# which based on the log console.
3139-cleanup() {
3140- if [ "$BACKGROUND_PIDS" = "" ]; then
3141- return 0
3142- fi
3143-
3144- set +x
3145- echo "Killing all child processes"
3146- for pid in $BACKGROUND_PIDS
3147- do
3148- kill "$pid" 2>/dev/null || true
3149- done
3150-
3151- # Sleep just a little to give enough time for subprocesses to be gracefully
3152- # killed. Then apply a SIGKILL if necessary.
3153- sleep 5
3154- for pid in $BACKGROUND_PIDS
3155- do
3156- kill -9 "$pid" 2>/dev/null || true
3157- done
3158-
3159- BACKGROUND_PIDS=
3160- set -x
3161-}
3162-trap cleanup INT TERM EXIT
3163-
3164-# Space separated values with the PIDS of the processes started in the
3165-# background by this script
3166-BACKGROUND_PIDS=
3167-
3168-# Until we uniformize the install dir to /install, we need to make it
3169-# available to both possible CI_PROJECT_DIR paths.
3170-if [ "$GIT_STRATEGY" = empty ]; then
3171- ln -s "$CI_PROJECT_DIR" "${CI_PROJECT_DIR%-empty}"
3172-fi
3173-
3174-for path in '/dut-env-vars.sh' '/set-job-env-vars.sh' './set-job-env-vars.sh'; do
3175- [ -f "$path" ] && source "$path"
3176-done
3177-. "$SCRIPTS_DIR"/setup-test-env.sh
3178-
3179-# Flush out anything which might be stuck in a serial buffer
3180-echo
3181-echo
3182-echo
3183-
3184-section_switch init_stage2 "Pre-testing hardware setup"
3185-
3186-job_time=$(get_job_seconds)
3187-uptime=$(cut -d ' ' -f1 /proc/uptime)
3188-echo "$(get_current_minsec) after job start == $uptime sec after kernel boot time"
3189-printf -v uptime_rounded "%.0f" "$uptime"
3190-echo "Kernel boot occurred $((job_time-uptime_rounded)) seconds after job start"
3191-
3192-set -ex
3193-
3194-# Set up any devices required by the jobs
3195-[ -z "$HWCI_KERNEL_MODULES" ] || {
3196- echo -n $HWCI_KERNEL_MODULES | xargs -d, -n1 /usr/sbin/modprobe
3197-}
3198-
3199-# Set up ZRAM
3200-HWCI_ZRAM_SIZE=2G
3201-if /sbin/zramctl --find --size $HWCI_ZRAM_SIZE -a zstd; then
3202- mkswap /dev/zram0
3203- swapon /dev/zram0
3204- echo "zram: $HWCI_ZRAM_SIZE activated"
3205-else
3206- echo "zram: skipping, not supported"
3207-fi
3208-
3209-#
3210-# Load the KVM module specific to the detected CPU virtualization extensions:
3211-# - vmx for Intel VT
3212-# - svm for AMD-V
3213-#
3214-if [ -n "$HWCI_ENABLE_X86_KVM" ]; then
3215- unset KVM_KERNEL_MODULE
3216- {
3217- grep -qs '\bvmx\b' /proc/cpuinfo && KVM_KERNEL_MODULE=kvm_intel
3218- } || {
3219- grep -qs '\bsvm\b' /proc/cpuinfo && KVM_KERNEL_MODULE=kvm_amd
3220- }
3221-
3222- {
3223- [ -z "${KVM_KERNEL_MODULE}" ] && \
3224- echo "WARNING: Failed to detect CPU virtualization extensions"
3225- } || \
3226- modprobe ${KVM_KERNEL_MODULE}
3227-fi
3228-
3229-if ! [ -e /install/ ] && ! [ -e $CI_PROJECT_DIR/install/ ]; then
3230- echo "Missing install/ dir"
3231- exit 1
3232-fi
3233-
3234-# Fix prefix confusion: the build installs to $CI_PROJECT_DIR, but we expect
3235-# it in /install
3236-ln -sf $CI_PROJECT_DIR/install /install
3237-export LD_LIBRARY_PATH=/install/lib
3238-export LIBGL_DRIVERS_PATH=/install/lib/dri
3239-
3240-# https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22495#note_1876691
3241-# The navi21 boards seem to have trouble with ld.so.cache, so try explicitly
3242-# telling it to look in /usr/local/lib.
3243-export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
3244-
3245-# The Broadcom devices need /usr/local/bin unconditionally added to the path
3246-export PATH=/usr/local/bin:$PATH
3247-
3248-# Store Mesa's disk cache under /tmp, rather than sending it out over NFS.
3249-export XDG_CACHE_HOME=/tmp
3250-
3251-# If we need to specify a driver, it means several drivers could pick up this gpu;
3252-# ensure that the other driver can't accidentally be used
3253-if [ -n "$MESA_LOADER_DRIVER_OVERRIDE" ]; then
3254- rm /install/lib/dri/!($MESA_LOADER_DRIVER_OVERRIDE)_dri.so
3255-fi
3256-ls -1 /install/lib/dri/*_dri.so || true
3257-
3258-if [ "$HWCI_FREQ_MAX" = "true" ]; then
3259- # Ensure initialization of the DRM device (needed by MSM)
3260- head -0 /dev/dri/renderD128
3261-
3262- # Disable GPU frequency scaling
3263- DEVFREQ_GOVERNOR=$(find /sys/devices -name governor | grep gpu || true)
3264- test -z "$DEVFREQ_GOVERNOR" || echo performance > $DEVFREQ_GOVERNOR || true
3265-
3266- # Disable CPU frequency scaling
3267- echo performance | tee -a /sys/devices/system/cpu/cpufreq/policy*/scaling_governor || true
3268-
3269- # Disable GPU runtime power management
3270- GPU_AUTOSUSPEND=$(find /sys/devices -name autosuspend_delay_ms | grep gpu | head -1)
3271- test -z "$GPU_AUTOSUSPEND" || echo -1 > $GPU_AUTOSUSPEND || true
3272- # Lock Intel GPU frequency to 70% of the maximum allowed by hardware
3273- # and enable throttling detection & reporting.
3274- # Additionally, set the upper limit for CPU scaling frequency to 65% of the
3275- # maximum permitted, as an additional measure to mitigate thermal throttling.
3276- /install/common/intel-gpu-freq.sh -s 70% --cpu-set-max 65% -g all -d
3277-fi
3278-
3279-# Start a little daemon to capture sysfs records and produce a JSON file
3280-KDL_PATH=/install/common/kdl.sh
3281-if [ -x "$KDL_PATH" ]; then
3282- echo "launch kdl.sh!"
3283- $KDL_PATH &
3284- BACKGROUND_PIDS="$! $BACKGROUND_PIDS"
3285-else
3286- echo "kdl.sh not found!"
3287-fi
3288-
3289-# Increase freedreno hangcheck timer because it's right at the edge of the
3290-# spilling tests timing out (and some traces, too)
3291-if [ -n "$FREEDRENO_HANGCHECK_MS" ]; then
3292- echo $FREEDRENO_HANGCHECK_MS | tee -a /sys/kernel/debug/dri/128/hangcheck_period_ms
3293-fi
3294-
3295-# Start a little daemon to capture the first devcoredump we encounter. (They
3296-# expire after 5 minutes, so we poll for them).
3297-CAPTURE_DEVCOREDUMP=/install/common/capture-devcoredump.sh
3298-if [ -x "$CAPTURE_DEVCOREDUMP" ]; then
3299- $CAPTURE_DEVCOREDUMP &
3300- BACKGROUND_PIDS="$! $BACKGROUND_PIDS"
3301-fi
3302-
3303-ARCH=$(uname -m)
3304-export VK_DRIVER_FILES="/install/share/vulkan/icd.d/${VK_DRIVER}_icd.$ARCH.json"
3305-
3306-if [ -n "$HWCI_START_WESTON" ] && [ -n "$HWCI_START_XORG" ]; then
3307- echo "Please drop HWCI_START_XORG and instead use Weston XWayland for testing."
3308- exit 1
3309-fi
3310-
3311-# If we want Xorg to be running for the test, then we start it up before the
3312-# HWCI_TEST_SCRIPT because we need to use xinit to start X (otherwise
3313-# without using -displayfd you can race with Xorg's startup), but xinit will eat
3314-# your client's return code
3315-if [ -n "$HWCI_START_XORG" ]; then
3316- echo "touch /xorg-started; sleep 100000" > /xorg-script
3317- env \
3318- xinit /bin/sh /xorg-script -- /usr/bin/Xorg -noreset -s 0 -dpms -logfile "$RESULTS_DIR/Xorg.0.log" &
3319- BACKGROUND_PIDS="$! $BACKGROUND_PIDS"
3320-
3321- # Wait for xorg to be ready for connections.
3322- for _ in 1 2 3 4 5; do
3323- if [ -e /xorg-started ]; then
3324- break
3325- fi
3326- sleep 5
3327- done
3328- export DISPLAY=:0
3329-fi
3330-
3331-if [ -n "$HWCI_START_WESTON" ]; then
3332- . /install/common/weston.sh --renderer=gl
3333- BACKGROUND_PIDS="$! $BACKGROUND_PIDS"
3334-fi
3335-
3336-set +x
3337-
3338-section_end init_stage2
3339-
3340-echo "Running ${HWCI_TEST_SCRIPT} ${HWCI_TEST_ARGS} ..."
3341-
3342-set +e
3343-$HWCI_TEST_SCRIPT ${HWCI_TEST_ARGS:-}; EXIT_CODE=$?
3344-set -e
3345-
3346-section_start post_test_cleanup "Cleaning up after testing, uploading results"
3347-set -x
3348-
3349-# Make sure that capture-devcoredump is done before we start trying to tar up
3350-# artifacts -- if it's writing while tar is reading, tar will throw an error and
3351-# kill the job.
3352-cleanup
3353-
3354-# upload artifacts (lava jobs)
3355-if [ -n "$S3_RESULTS_UPLOAD" ]; then
3356- tar --zstd -cf results.tar.zst results/;
3357- ci-fairy s3cp --token-file "${S3_JWT_FILE}" results.tar.zst https://"$S3_RESULTS_UPLOAD"/results.tar.zst
3358-fi
3359-
3360-set +x
3361-section_end post_test_cleanup
3362-
3363-# Print the final result; both bare-metal and LAVA look for this string to get
3364-# the result of our run, so try really hard to get it out rather than losing
3365-# the run. The device gets shut down right at this point, and a630 seems to
3366-# enjoy corrupting the last line of serial output before shutdown.
3367-for _ in $(seq 0 3); do echo "hwci: mesa: exit_code: $EXIT_CODE"; sleep 1; echo; done
3368-
3369-exit $EXIT_CODE
3370diff --git a/.gitlab-ci/common/intel-gpu-freq.sh b/.gitlab-ci/common/intel-gpu-freq.sh
3371deleted file mode 100755
3372index 35da5a9..0000000
3373--- a/.gitlab-ci/common/intel-gpu-freq.sh
3374+++ /dev/null
3375@@ -1,820 +0,0 @@
3376-#!/usr/bin/env bash
3377-# shellcheck disable=SC2013
3378-# shellcheck disable=SC2015
3379-# shellcheck disable=SC2034
3380-# shellcheck disable=SC2046
3381-# shellcheck disable=SC2059
3382-# shellcheck disable=SC2086 # we want word splitting
3383-# shellcheck disable=SC2154
3384-# shellcheck disable=SC2155
3385-# shellcheck disable=SC2162
3386-# shellcheck disable=SC2229
3387-#
3388-# This is an utility script to manage Intel GPU frequencies.
3389-# It can be used for debugging performance problems or trying to obtain a stable
3390-# frequency while benchmarking.
3391-#
3392-# Note the Intel i915 GPU driver allows to change the minimum, maximum and boost
3393-# frequencies in steps of 50 MHz via:
3394-#
3395-# /sys/class/drm/card<n>/<freq_info>
3396-#
3397-# Where <n> is the DRM card index and <freq_info> one of the following:
3398-#
3399-# - gt_max_freq_mhz (enforced maximum freq)
3400-# - gt_min_freq_mhz (enforced minimum freq)
3401-# - gt_boost_freq_mhz (enforced boost freq)
3402-#
3403-# The hardware capabilities can be accessed via:
3404-#
3405-# - gt_RP0_freq_mhz (supported maximum freq)
3406-# - gt_RPn_freq_mhz (supported minimum freq)
3407-# - gt_RP1_freq_mhz (most efficient freq)
3408-#
3409-# The current frequency can be read from:
3410-# - gt_act_freq_mhz (the actual GPU freq)
3411-# - gt_cur_freq_mhz (the last requested freq)
3412-#
3413-# Intel later switched to per-tile sysfs interfaces, which is what the Xe DRM
3414-# driver exlusively uses, and the capabilites are now located under the
3415-# following directory for the first tile:
3416-#
3417-# /sys/class/drm/card<n>/device/tile0/gt0/freq0/<freq_info>
3418-#
3419-# Where <n> is the DRM card index and <freq_info> one of the following:
3420-#
3421-# - max_freq (enforced maximum freq)
3422-# - min_freq (enforced minimum freq)
3423-#
3424-# The hardware capabilities can be accessed via:
3425-#
3426-# - rp0_freq (supported maximum freq)
3427-# - rpn_freq (supported minimum freq)
3428-# - rpe_freq (most efficient freq)
3429-#
3430-# The current frequency can be read from:
3431-# - act_freq (the actual GPU freq)
3432-# - cur_freq (the last requested freq)
3433-#
3434-# Also note that in addition to GPU management, the script offers the
3435-# possibility to adjust CPU operating frequencies. However, this is currently
3436-# limited to just setting the maximum scaling frequency as percentage of the
3437-# maximum frequency allowed by the hardware.
3438-#
3439-# Copyright (C) 2022 Collabora Ltd.
3440-# Author: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
3441-#
3442-# SPDX-License-Identifier: MIT
3443-#
3444-
3445-#
3446-# Constants
3447-#
3448-
3449-# Check if any /sys/class/drm/cardX/device/tile0 directory exists to detect Xe
3450-USE_XE=0
3451-for i in $(seq 0 15); do
3452- if [ -d "/sys/class/drm/card$i/device/tile0" ]; then
3453- USE_XE=1
3454- break
3455- fi
3456-done
3457-
3458-# GPU
3459-if [ "$USE_XE" -eq 1 ]; then
3460- DRM_FREQ_SYSFS_PATTERN="/sys/class/drm/card%d/device/tile0/gt0/freq0/%s_freq"
3461- ENF_FREQ_INFO="max min"
3462- CAP_FREQ_INFO="rp0 rpn rpe"
3463-else
3464- DRM_FREQ_SYSFS_PATTERN="/sys/class/drm/card%d/gt_%s_freq_mhz"
3465- ENF_FREQ_INFO="max min boost"
3466- CAP_FREQ_INFO="RP0 RPn RP1"
3467-fi
3468-ACT_FREQ_INFO="act cur"
3469-THROTT_DETECT_SLEEP_SEC=2
3470-THROTT_DETECT_PID_FILE_PATH=/tmp/thrott-detect.pid
3471-
3472-# CPU
3473-CPU_SYSFS_PREFIX=/sys/devices/system/cpu
3474-CPU_PSTATE_SYSFS_PATTERN="${CPU_SYSFS_PREFIX}/intel_pstate/%s"
3475-CPU_FREQ_SYSFS_PATTERN="${CPU_SYSFS_PREFIX}/cpu%s/cpufreq/%s_freq"
3476-CAP_CPU_FREQ_INFO="cpuinfo_max cpuinfo_min"
3477-ENF_CPU_FREQ_INFO="scaling_max scaling_min"
3478-ACT_CPU_FREQ_INFO="scaling_cur"
3479-
3480-#
3481-# Global variables.
3482-#
3483-unset INTEL_DRM_CARD_INDEX
3484-unset GET_ACT_FREQ GET_ENF_FREQ GET_CAP_FREQ
3485-unset SET_MIN_FREQ SET_MAX_FREQ
3486-unset MONITOR_FREQ
3487-unset CPU_SET_MAX_FREQ
3488-unset DETECT_THROTT
3489-unset DRY_RUN
3490-
3491-#
3492-# Simple printf based stderr logger.
3493-#
3494-log() {
3495- local msg_type=$1
3496-
3497- shift
3498- printf "%s: %s: " "${msg_type}" "${0##*/}" >&2
3499- printf "$@" >&2
3500- printf "\n" >&2
3501-}
3502-
3503-#
3504-# Helper to print sysfs path for the given card index and freq info.
3505-#
3506-# arg1: Frequency info sysfs name, one of *_FREQ_INFO constants above
3507-# arg2: Video card index, defaults to INTEL_DRM_CARD_INDEX
3508-#
3509-print_freq_sysfs_path() {
3510- printf ${DRM_FREQ_SYSFS_PATTERN} "${2:-${INTEL_DRM_CARD_INDEX}}" "$1"
3511-}
3512-
3513-#
3514-# Helper to set INTEL_DRM_CARD_INDEX for the first identified Intel video card.
3515-#
3516-identify_intel_gpu() {
3517- local i=0 vendor path
3518-
3519- while [ ${i} -lt 16 ]; do
3520- [ -c "/dev/dri/card$i" ] || {
3521- i=$((i + 1))
3522- continue
3523- }
3524-
3525- path=$(print_freq_sysfs_path "" ${i})
3526- if [ "$USE_XE" -eq 1 ]; then
3527- path=${path%/*/*/*/*/*}/device/vendor
3528- else
3529- path=${path%/*}/device/vendor
3530- fi
3531-
3532- [ -r "${path}" ] && read vendor < "${path}" && \
3533- [ "${vendor}" = "0x8086" ] && INTEL_DRM_CARD_INDEX=$i && return 0
3534-
3535- i=$((i + 1))
3536- done
3537-
3538- return 1
3539-}
3540-
3541-#
3542-# Read the specified freq info from sysfs.
3543-#
3544-# arg1: Flag (y/n) to also enable printing the freq info.
3545-# arg2...: Frequency info sysfs name(s), see *_FREQ_INFO constants above
3546-# return: Global variable(s) FREQ_${arg} containing the requested information
3547-#
3548-read_freq_info() {
3549- local var val info path print=0 ret=0
3550-
3551- [ "$1" = "y" ] && print=1
3552- shift
3553-
3554- while [ $# -gt 0 ]; do
3555- info=$1
3556- shift
3557- var=FREQ_${info}
3558- path=$(print_freq_sysfs_path "${info}")
3559-
3560- [ -r ${path} ] && read ${var} < ${path} || {
3561- log ERROR "Failed to read freq info from: %s" "${path}"
3562- ret=1
3563- continue
3564- }
3565-
3566- [ -n "${var}" ] || {
3567- log ERROR "Got empty freq info from: %s" "${path}"
3568- ret=1
3569- continue
3570- }
3571-
3572- [ ${print} -eq 1 ] && {
3573- eval val=\$${var}
3574- printf "%6s: %4s MHz\n" "${info}" "${val}"
3575- }
3576- done
3577-
3578- return ${ret}
3579-}
3580-
3581-#
3582-# Display requested info.
3583-#
3584-print_freq_info() {
3585- local req_freq
3586-
3587- [ -n "${GET_CAP_FREQ}" ] && {
3588- printf "* Hardware capabilities\n"
3589- read_freq_info y ${CAP_FREQ_INFO}
3590- printf "\n"
3591- }
3592-
3593- [ -n "${GET_ENF_FREQ}" ] && {
3594- printf "* Enforcements\n"
3595- read_freq_info y ${ENF_FREQ_INFO}
3596- printf "\n"
3597- }
3598-
3599- [ -n "${GET_ACT_FREQ}" ] && {
3600- printf "* Actual\n"
3601- read_freq_info y ${ACT_FREQ_INFO}
3602- printf "\n"
3603- }
3604-}
3605-
3606-#
3607-# Helper to print frequency value as requested by user via '-s, --set' option.
3608-# arg1: user requested freq value
3609-#
3610-compute_freq_set() {
3611- local val
3612-
3613- case "$1" in
3614- +)
3615- val=$(eval "echo \${FREQ_$(echo $CAP_FREQ_INFO | cut -d' ' -f1)}") # FREQ_rp0 or FREQ_RP0
3616- ;;
3617- -)
3618- val=$(eval "echo \${FREQ_$(echo $CAP_FREQ_INFO | cut -d' ' -f2)}") # FREQ_rpn or FREQ_RPn
3619- ;;
3620- *%)
3621- val=$((${1%?} * $(eval "echo \${FREQ_$(echo $CAP_FREQ_INFO | cut -d' ' -f1)}") / 100))
3622- # Adjust freq to comply with 50 MHz increments
3623- val=$((val / 50 * 50))
3624- ;;
3625- *[!0-9]*)
3626- log ERROR "Cannot set freq to invalid value: %s" "$1"
3627- return 1
3628- ;;
3629- "")
3630- log ERROR "Cannot set freq to unspecified value"
3631- return 1
3632- ;;
3633- *)
3634- # Adjust freq to comply with 50 MHz increments
3635- val=$(($1 / 50 * 50))
3636- ;;
3637- esac
3638-
3639- printf "%s" "${val}"
3640-}
3641-
3642-#
3643-# Helper for set_freq().
3644-#
3645-set_freq_max() {
3646- log INFO "Setting GPU max freq to %s MHz" "${SET_MAX_FREQ}"
3647-
3648- read_freq_info n min || return $?
3649-
3650- # FREQ_rp0 or FREQ_RP0
3651- [ ${SET_MAX_FREQ} -gt $(eval "echo \${FREQ_$(echo $CAP_FREQ_INFO | cut -d' ' -f1)}") ] && {
3652- log ERROR "Cannot set GPU max freq (%s) to be greater than hw max freq (%s)" \
3653- "${SET_MAX_FREQ}" "$(eval "echo \${FREQ_$(echo $CAP_FREQ_INFO | cut -d' ' -f1)}")"
3654- return 1
3655- }
3656-
3657- # FREQ_rpn or FREQ_RPn
3658- [ ${SET_MAX_FREQ} -lt $(eval "echo \${FREQ_$(echo $CAP_FREQ_INFO | cut -d' ' -f2)}") ] && {
3659- log ERROR "Cannot set GPU max freq (%s) to be less than hw min freq (%s)" \
3660- "${SET_MIN_FREQ}" "$(eval "echo \${FREQ_$(echo $CAP_FREQ_INFO | cut -d' ' -f2)}")"
3661- return 1
3662- }
3663-
3664- [ ${SET_MAX_FREQ} -lt ${FREQ_min} ] && {
3665- log ERROR "Cannot set GPU max freq (%s) to be less than min freq (%s)" \
3666- "${SET_MAX_FREQ}" "${FREQ_min}"
3667- return 1
3668- }
3669-
3670- [ -z "${DRY_RUN}" ] || return 0
3671-
3672- # Write to max freq path
3673- if ! printf "%s" ${SET_MAX_FREQ} | tee $(print_freq_sysfs_path max) > /dev/null;
3674- then
3675- log ERROR "Failed to set GPU max frequency"
3676- return 1
3677- fi
3678-
3679- # Only write to boost if the sysfs file exists, as it's removed in Xe
3680- if [ -e "$(print_freq_sysfs_path boost)" ]; then
3681- if ! printf "%s" ${SET_MAX_FREQ} | tee $(print_freq_sysfs_path boost) > /dev/null;
3682- then
3683- log ERROR "Failed to set GPU boost frequency"
3684- return 1
3685- fi
3686- fi
3687-}
3688-
3689-#
3690-# Helper for set_freq().
3691-#
3692-set_freq_min() {
3693- log INFO "Setting GPU min freq to %s MHz" "${SET_MIN_FREQ}"
3694-
3695- read_freq_info n max || return $?
3696-
3697- [ ${SET_MIN_FREQ} -gt ${FREQ_max} ] && {
3698- log ERROR "Cannot set GPU min freq (%s) to be greater than max freq (%s)" \
3699- "${SET_MIN_FREQ}" "${FREQ_max}"
3700- return 1
3701- }
3702-
3703- [ ${SET_MIN_FREQ} -lt $(eval "echo \${FREQ_$(echo $CAP_FREQ_INFO | cut -d' ' -f2)}") ] && {
3704- log ERROR "Cannot set GPU min freq (%s) to be less than hw min freq (%s)" \
3705- "${SET_MIN_FREQ}" "$(eval "echo \${FREQ_$(echo $CAP_FREQ_INFO | cut -d' ' -f2)}")"
3706- return 1
3707- }
3708-
3709- [ -z "${DRY_RUN}" ] || return 0
3710-
3711- if ! printf "%s" ${SET_MIN_FREQ} > $(print_freq_sysfs_path min);
3712- then
3713- log ERROR "Failed to set GPU min frequency"
3714- return 1
3715- fi
3716-}
3717-
3718-#
3719-# Set min or max or both GPU frequencies to the user indicated values.
3720-#
3721-set_freq() {
3722- # Get hw max & min frequencies
3723- read_freq_info n $(echo $CAP_FREQ_INFO | cut -d' ' -f1,2) || return $? # RP0 RPn
3724-
3725- [ -z "${SET_MAX_FREQ}" ] || {
3726- SET_MAX_FREQ=$(compute_freq_set "${SET_MAX_FREQ}")
3727- [ -z "${SET_MAX_FREQ}" ] && return 1
3728- }
3729-
3730- [ -z "${SET_MIN_FREQ}" ] || {
3731- SET_MIN_FREQ=$(compute_freq_set "${SET_MIN_FREQ}")
3732- [ -z "${SET_MIN_FREQ}" ] && return 1
3733- }
3734-
3735- #
3736- # Ensure correct operation order, to avoid setting min freq
3737- # to a value which is larger than max freq.
3738- #
3739- # E.g.:
3740- # crt_min=crt_max=600; new_min=new_max=700
3741- # > operation order: max=700; min=700
3742- #
3743- # crt_min=crt_max=600; new_min=new_max=500
3744- # > operation order: min=500; max=500
3745- #
3746- if [ -n "${SET_MAX_FREQ}" ] && [ -n "${SET_MIN_FREQ}" ]; then
3747- [ ${SET_MAX_FREQ} -lt ${SET_MIN_FREQ} ] && {
3748- log ERROR "Cannot set GPU max freq to be less than min freq"
3749- return 1
3750- }
3751-
3752- read_freq_info n min || return $?
3753-
3754- if [ ${SET_MAX_FREQ} -lt ${FREQ_min} ]; then
3755- set_freq_min || return $?
3756- set_freq_max
3757- else
3758- set_freq_max || return $?
3759- set_freq_min
3760- fi
3761- elif [ -n "${SET_MAX_FREQ}" ]; then
3762- set_freq_max
3763- elif [ -n "${SET_MIN_FREQ}" ]; then
3764- set_freq_min
3765- else
3766- log "Unexpected call to set_freq()"
3767- return 1
3768- fi
3769-}
3770-
3771-#
3772-# Helper for detect_throttling().
3773-#
3774-get_thrott_detect_pid() {
3775- [ -e ${THROTT_DETECT_PID_FILE_PATH} ] || return 0
3776-
3777- local pid
3778- read pid < ${THROTT_DETECT_PID_FILE_PATH} || {
3779- log ERROR "Failed to read pid from: %s" "${THROTT_DETECT_PID_FILE_PATH}"
3780- return 1
3781- }
3782-
3783- local proc_path=/proc/${pid:-invalid}/cmdline
3784- [ -r ${proc_path} ] && grep -qs "${0##*/}" ${proc_path} && {
3785- printf "%s" "${pid}"
3786- return 0
3787- }
3788-
3789- # Remove orphaned PID file
3790- rm -rf ${THROTT_DETECT_PID_FILE_PATH}
3791- return 1
3792-}
3793-
3794-#
3795-# Control detection and reporting of GPU throttling events.
3796-# arg1: start - run throttle detector in background
3797-# stop - stop throttle detector process, if any
3798-# status - verify if throttle detector is running
3799-#
3800-detect_throttling() {
3801- local pid
3802- pid=$(get_thrott_detect_pid)
3803-
3804- case "$1" in
3805- status)
3806- printf "Throttling detector is "
3807- [ -z "${pid}" ] && printf "not running\n" && return 0
3808- printf "running (pid=%s)\n" ${pid}
3809- ;;
3810-
3811- stop)
3812- [ -z "${pid}" ] && return 0
3813-
3814- log INFO "Stopping throttling detector (pid=%s)" "${pid}"
3815- kill ${pid}; sleep 1; kill -0 ${pid} 2>/dev/null && kill -9 ${pid}
3816- rm -rf ${THROTT_DETECT_PID_FILE_PATH}
3817- ;;
3818-
3819- start)
3820- [ -n "${pid}" ] && {
3821- log WARN "Throttling detector is already running (pid=%s)" ${pid}
3822- return 0
3823- }
3824-
3825- (
3826- read_freq_info n $(echo $CAP_FREQ_INFO | cut -d' ' -f2) || return $? # RPn
3827-
3828- while true; do
3829- sleep ${THROTT_DETECT_SLEEP_SEC}
3830- read_freq_info n act min cur || exit $?
3831-
3832- #
3833- # The throttling seems to occur when act freq goes below min.
3834- # However, it's necessary to exclude the idle states, where
3835- # act freq normally reaches rpn and cur goes below min.
3836- #
3837- [ ${FREQ_act} -lt ${FREQ_min} ] && \
3838- [ ${FREQ_act} -gt $(eval "echo \${FREQ_$(echo $CAP_FREQ_INFO | cut -d' ' -f2)}") ] && \
3839- [ ${FREQ_cur} -ge ${FREQ_min} ] && \
3840- printf "GPU throttling detected: act=%s min=%s cur=%s rpn=%s\n" \
3841- ${FREQ_act} ${FREQ_min} ${FREQ_cur} $(eval "echo \${FREQ_$(echo $CAP_FREQ_INFO | cut -d' ' -f2)}")
3842- done
3843- ) &
3844-
3845- pid=$!
3846- log INFO "Started GPU throttling detector (pid=%s)" ${pid}
3847-
3848- printf "%s\n" ${pid} > ${THROTT_DETECT_PID_FILE_PATH} || \
3849- log WARN "Failed to write throttle detector PID file"
3850- ;;
3851- esac
3852-}
3853-
3854-#
3855-# Retrieve the list of online CPUs.
3856-#
3857-get_online_cpus() {
3858- local path cpu_index
3859-
3860- printf "0"
3861- for path in $(grep 1 ${CPU_SYSFS_PREFIX}/cpu*/online); do
3862- cpu_index=${path##*/cpu}
3863- printf " %s" ${cpu_index%%/*}
3864- done
3865-}
3866-
3867-#
3868-# Helper to print sysfs path for the given CPU index and freq info.
3869-#
3870-# arg1: Frequency info sysfs name, one of *_CPU_FREQ_INFO constants above
3871-# arg2: CPU index
3872-#
3873-print_cpu_freq_sysfs_path() {
3874- printf ${CPU_FREQ_SYSFS_PATTERN} "$2" "$1"
3875-}
3876-
3877-#
3878-# Read the specified CPU freq info from sysfs.
3879-#
3880-# arg1: CPU index
3881-# arg2: Flag (y/n) to also enable printing the freq info.
3882-# arg3...: Frequency info sysfs name(s), see *_CPU_FREQ_INFO constants above
3883-# return: Global variable(s) CPU_FREQ_${arg} containing the requested information
3884-#
3885-read_cpu_freq_info() {
3886- local var val info path cpu_index print=0 ret=0
3887-
3888- cpu_index=$1
3889- [ "$2" = "y" ] && print=1
3890- shift 2
3891-
3892- while [ $# -gt 0 ]; do
3893- info=$1
3894- shift
3895- var=CPU_FREQ_${info}
3896- path=$(print_cpu_freq_sysfs_path "${info}" ${cpu_index})
3897-
3898- [ -r ${path} ] && read ${var} < ${path} || {
3899- log ERROR "Failed to read CPU freq info from: %s" "${path}"
3900- ret=1
3901- continue
3902- }
3903-
3904- [ -n "${var}" ] || {
3905- log ERROR "Got empty CPU freq info from: %s" "${path}"
3906- ret=1
3907- continue
3908- }
3909-
3910- [ ${print} -eq 1 ] && {
3911- eval val=\$${var}
3912- printf "%6s: %4s Hz\n" "${info}" "${val}"
3913- }
3914- done
3915-
3916- return ${ret}
3917-}
3918-
3919-#
3920-# Helper to print freq. value as requested by user via '--cpu-set-max' option.
3921-# arg1: user requested freq value
3922-#
3923-compute_cpu_freq_set() {
3924- local val
3925-
3926- case "$1" in
3927- +)
3928- val=${CPU_FREQ_cpuinfo_max}
3929- ;;
3930- -)
3931- val=${CPU_FREQ_cpuinfo_min}
3932- ;;
3933- *%)
3934- val=$((${1%?} * CPU_FREQ_cpuinfo_max / 100))
3935- ;;
3936- *[!0-9]*)
3937- log ERROR "Cannot set CPU freq to invalid value: %s" "$1"
3938- return 1
3939- ;;
3940- "")
3941- log ERROR "Cannot set CPU freq to unspecified value"
3942- return 1
3943- ;;
3944- *)
3945- log ERROR "Cannot set CPU freq to custom value; use +, -, or % instead"
3946- return 1
3947- ;;
3948- esac
3949-
3950- printf "%s" "${val}"
3951-}
3952-
3953-#
3954-# Adjust CPU max scaling frequency.
3955-#
3956-set_cpu_freq_max() {
3957- local target_freq res=0
3958- case "${CPU_SET_MAX_FREQ}" in
3959- +)
3960- target_freq=100
3961- ;;
3962- -)
3963- target_freq=1
3964- ;;
3965- *%)
3966- target_freq=${CPU_SET_MAX_FREQ%?}
3967- ;;
3968- *)
3969- log ERROR "Invalid CPU freq"
3970- return 1
3971- ;;
3972- esac
3973-
3974- local pstate_info=$(printf "${CPU_PSTATE_SYSFS_PATTERN}" max_perf_pct)
3975- [ -e "${pstate_info}" ] && {
3976- log INFO "Setting intel_pstate max perf to %s" "${target_freq}%"
3977- if ! printf "%s" "${target_freq}" > "${pstate_info}";
3978- then
3979- log ERROR "Failed to set intel_pstate max perf"
3980- res=1
3981- fi
3982- }
3983-
3984- local cpu_index
3985- for cpu_index in $(get_online_cpus); do
3986- read_cpu_freq_info ${cpu_index} n ${CAP_CPU_FREQ_INFO} || { res=$?; continue; }
3987-
3988- target_freq=$(compute_cpu_freq_set "${CPU_SET_MAX_FREQ}")
3989- tf_res=$?
3990- [ -z "${target_freq}" ] && { res=$tf_res; continue; }
3991-
3992- log INFO "Setting CPU%s max scaling freq to %s Hz" ${cpu_index} "${target_freq}"
3993- [ -n "${DRY_RUN}" ] && continue
3994-
3995- if ! printf "%s" ${target_freq} > $(print_cpu_freq_sysfs_path scaling_max ${cpu_index});
3996- then
3997- res=1
3998- log ERROR "Failed to set CPU%s max scaling frequency" ${cpu_index}
3999- fi
4000- done
4001-
4002- return ${res}
4003-}
4004-
4005-#
4006-# Show help message.
4007-#
4008-print_usage() {
4009- cat <<EOF
4010-Usage: ${0##*/} [OPTION]...
4011-
4012-A script to manage Intel GPU frequencies. Can be used for debugging performance
4013-problems or trying to obtain a stable frequency while benchmarking.
4014-
4015-Note Intel GPUs only accept specific frequencies, usually multiples of 50 MHz.
4016-
4017-Options:
4018- -g, --get [act|enf|cap|all]
4019- Get frequency information: active (default), enforced,
4020- hardware capabilities or all of them.
4021-
4022- -s, --set [{min|max}=]{FREQUENCY[%]|+|-}
4023- Set min or max frequency to the given value (MHz).
4024- Append '%' to interpret FREQUENCY as % of hw max.
4025- Use '+' or '-' to set frequency to hardware max or min.
4026- Omit min/max prefix to set both frequencies.
4027-
4028- -r, --reset Reset frequencies to hardware defaults.
4029-
4030- -m, --monitor [act|enf|cap|all]
4031- Monitor the indicated frequencies via 'watch' utility.
4032- See '-g, --get' option for more details.
4033-
4034- -d|--detect-thrott [start|stop|status]
4035- Start (default operation) the throttling detector
4036- as a background process. Use 'stop' or 'status' to
4037- terminate the detector process or verify its status.
4038-
4039- --cpu-set-max [FREQUENCY%|+|-}
4040- Set CPU max scaling frequency as % of hw max.
4041- Use '+' or '-' to set frequency to hardware max or min.
4042-
4043- -r, --reset Reset frequencies to hardware defaults.
4044-
4045- --dry-run See what the script will do without applying any
4046- frequency changes.
4047-
4048- -h, --help Display this help text and exit.
4049-EOF
4050-}
4051-
4052-#
4053-# Parse user input for '-g, --get' option.
4054-# Returns 0 if a value has been provided, otherwise 1.
4055-#
4056-parse_option_get() {
4057- local ret=0
4058-
4059- case "$1" in
4060- act) GET_ACT_FREQ=1;;
4061- enf) GET_ENF_FREQ=1;;
4062- cap) GET_CAP_FREQ=1;;
4063- all) GET_ACT_FREQ=1; GET_ENF_FREQ=1; GET_CAP_FREQ=1;;
4064- -*|"")
4065- # No value provided, using default.
4066- GET_ACT_FREQ=1
4067- ret=1
4068- ;;
4069- *)
4070- print_usage
4071- exit 1
4072- ;;
4073- esac
4074-
4075- return ${ret}
4076-}
4077-
4078-#
4079-# Validate user input for '-s, --set' option.
4080-# arg1: input value to be validated
4081-# arg2: optional flag indicating input is restricted to %
4082-#
4083-validate_option_set() {
4084- case "$1" in
4085- +|-|[0-9]%|[0-9][0-9]%)
4086- return 0
4087- ;;
4088- *[!0-9]*|"")
4089- print_usage
4090- exit 1
4091- ;;
4092- esac
4093-
4094- [ -z "$2" ] || { print_usage; exit 1; }
4095-}
4096-
4097-#
4098-# Parse script arguments.
4099-#
4100-[ $# -eq 0 ] && { print_usage; exit 1; }
4101-
4102-while [ $# -gt 0 ]; do
4103- case "$1" in
4104- -g|--get)
4105- parse_option_get "$2" && shift
4106- ;;
4107-
4108- -s|--set)
4109- shift
4110- case "$1" in
4111- min=*)
4112- SET_MIN_FREQ=${1#min=}
4113- validate_option_set "${SET_MIN_FREQ}"
4114- ;;
4115- max=*)
4116- SET_MAX_FREQ=${1#max=}
4117- validate_option_set "${SET_MAX_FREQ}"
4118- ;;
4119- *)
4120- SET_MIN_FREQ=$1
4121- validate_option_set "${SET_MIN_FREQ}"
4122- SET_MAX_FREQ=${SET_MIN_FREQ}
4123- ;;
4124- esac
4125- ;;
4126-
4127- -r|--reset)
4128- RESET_FREQ=1
4129- SET_MIN_FREQ="-"
4130- SET_MAX_FREQ="+"
4131- ;;
4132-
4133- -m|--monitor)
4134- MONITOR_FREQ=act
4135- parse_option_get "$2" && MONITOR_FREQ=$2 && shift
4136- ;;
4137-
4138- -d|--detect-thrott)
4139- DETECT_THROTT=start
4140- case "$2" in
4141- start|stop|status)
4142- DETECT_THROTT=$2
4143- shift
4144- ;;
4145- esac
4146- ;;
4147-
4148- --cpu-set-max)
4149- shift
4150- CPU_SET_MAX_FREQ=$1
4151- validate_option_set "${CPU_SET_MAX_FREQ}" restricted
4152- ;;
4153-
4154- --dry-run)
4155- DRY_RUN=1
4156- ;;
4157-
4158- -h|--help)
4159- print_usage
4160- exit 0
4161- ;;
4162-
4163- *)
4164- print_usage
4165- exit 1
4166- ;;
4167- esac
4168-
4169- shift
4170-done
4171-
4172-#
4173-# Main
4174-#
4175-RET=0
4176-
4177-identify_intel_gpu || {
4178- log INFO "No Intel GPU detected"
4179- exit 0
4180-}
4181-
4182-[ -n "${SET_MIN_FREQ}${SET_MAX_FREQ}" ] && { set_freq || RET=$?; }
4183-print_freq_info
4184-
4185-[ -n "${DETECT_THROTT}" ] && detect_throttling ${DETECT_THROTT}
4186-
4187-[ -n "${CPU_SET_MAX_FREQ}" ] && { set_cpu_freq_max || RET=$?; }
4188-
4189-[ -n "${MONITOR_FREQ}" ] && {
4190- log INFO "Entering frequency monitoring mode"
4191- sleep 2
4192- exec watch -d -n 1 "$0" -g "${MONITOR_FREQ}"
4193-}
4194-
4195-exit ${RET}
4196diff --git a/.gitlab-ci/common/kdl.sh b/.gitlab-ci/common/kdl.sh
4197deleted file mode 100755
4198index 0459d8e..0000000
4199--- a/.gitlab-ci/common/kdl.sh
4200+++ /dev/null
4201@@ -1,18 +0,0 @@
4202-#!/usr/bin/env bash
4203-# shellcheck disable=SC1091 # the path is created in build-kdl and
4204-# here is check if exist
4205-# shellcheck disable=SC2086 # we want the arguments to be expanded
4206-
4207-if ! [ -f /ci-kdl/bin/activate ]; then
4208- echo -e "ci-kdl not installed; not monitoring temperature"
4209- exit 0
4210-fi
4211-
4212-KDL_ARGS="
4213- --output-file=${RESULTS_DIR}/kdl.json
4214- --log-level=WARNING
4215- --num-samples=-1
4216-"
4217-
4218-source /ci-kdl/bin/activate
4219-exec /ci-kdl/bin/ci-kdl ${KDL_ARGS}
4220diff --git a/.gitlab-ci/common/weston.ini b/.gitlab-ci/common/weston.ini
4221deleted file mode 100644
4222index b353577..0000000
4223--- a/.gitlab-ci/common/weston.ini
4224+++ /dev/null
4225@@ -1,7 +0,0 @@
4226-[core]
4227-backend=headless-backend.so
4228-xwayland=true
4229-idle-time=0
4230-
4231-[xwayland]
4232-path=/usr/local/bin/Xwayland
4233diff --git a/.gitlab-ci/common/weston.sh b/.gitlab-ci/common/weston.sh
4234deleted file mode 100755
4235index de36afd..0000000
4236--- a/.gitlab-ci/common/weston.sh
4237+++ /dev/null
4238@@ -1,12 +0,0 @@
4239-#!/usr/bin/env bash
4240-
4241-CI_COMMON_DIR=$(dirname -- "${BASH_SOURCE[0]}")
4242-
4243-mkdir -p /tmp/.X11-unix
4244-export DISPLAY=:0
4245-
4246-WAYLAND_DISPLAY=wayland-0
4247-weston --config="$CI_COMMON_DIR/weston.ini" --socket="$WAYLAND_DISPLAY" --log "$RESULTS_DIR/weston.log" --logger-scopes=log,xwm-wm-x11 "$@" &
4248-export WAYLAND_DISPLAY
4249-
4250-while [ ! -S /tmp/.X11-unix/X0 ]; do sleep 1; done
4251diff --git a/.gitlab-ci/conditional-build-image-tags.yml b/.gitlab-ci/conditional-build-image-tags.yml
4252deleted file mode 100644
4253index cc32d01..0000000
4254--- a/.gitlab-ci/conditional-build-image-tags.yml
4255+++ /dev/null
4256@@ -1,7 +0,0 @@
4257-variables:
4258- CONDITIONAL_BUILD_ANDROID_CTS_TAG: 2dfd3e288249e4776ef6866d34d344d4
4259- CONDITIONAL_BUILD_ANGLE_TAG: e40de41a79653aa19fac70dc6289d8e9
4260- CONDITIONAL_BUILD_CROSVM_TAG: 4c61f9707203afca91db3efeb57175db
4261- CONDITIONAL_BUILD_FLUSTER_TAG: e13f8521875ebd70e207ec0f6f3d3e5b
4262- CONDITIONAL_BUILD_PIGLIT_TAG: 7c554632e450496da9382764f449abae
4263- CONDITIONAL_BUILD_VKD3D_PROTON_TAG: 3c680463034cc7273d9e98393861c61c
4264diff --git a/.gitlab-ci/container/alpine/gitlab-ci.yml b/.gitlab-ci/container/alpine/gitlab-ci.yml
4265deleted file mode 100644
4266index b8475aa..0000000
4267--- a/.gitlab-ci/container/alpine/gitlab-ci.yml
4268+++ /dev/null
4269@@ -1,56 +0,0 @@
4270-# Build the CI Alpine docker images.
4271-#
4272-# MESA_IMAGE_TAG is the tag of the docker image used by later stage jobs. If the
4273-# image doesn't exist yet, the container stage job generates it.
4274-#
4275-# In order to generate a new image, one should generally change the tag.
4276-# While removing the image from the registry would also work, that's not
4277-# recommended except for ephemeral images during development: Replacing
4278-# an image after a significant amount of time might pull in newer
4279-# versions of gcc/clang or other packages, which might break the build
4280-# with older commits using the same tag.
4281-#
4282-# After merging a change resulting in generating a new image to the
4283-# main repository, it's recommended to remove the image from the source
4284-# repository's container registry, so that the image from the main
4285-# repository's registry will be used there as well.
4286-
4287-# Alpine based x86_64 build image
4288-.alpine/x86_64_build-base:
4289- extends:
4290- - .fdo.container-build@alpine
4291- - .container
4292- variables:
4293- FDO_DISTRIBUTION_VERSION: "3.21"
4294- FDO_BASE_IMAGE: alpine:$FDO_DISTRIBUTION_VERSION # since cbuild ignores it
4295-
4296-# Alpine based x86_64 build image
4297-alpine/x86_64_build:
4298- extends:
4299- - .alpine/x86_64_build-base
4300- variables:
4301- MESA_IMAGE_TAG: &alpine-x86_64_build ${ALPINE_X86_64_BUILD_TAG}
4302- LLVM_VERSION: &alpine-llvm_version 19
4303- rules:
4304- - !reference [.container, rules]
4305- # Note: the next three lines must remain in that order, so that the rules
4306- # in `linkcheck-docs` catch nightly pipelines before the rules in `deploy-docs`
4307- # exclude them.
4308- - !reference [linkcheck-docs, rules]
4309- - !reference [deploy-docs, rules]
4310- - !reference [test-docs, rules]
4311-
4312-.use-alpine/x86_64_build:
4313- tags:
4314- - $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
4315- extends:
4316- - .set-image
4317- variables:
4318- MESA_IMAGE_PATH: "alpine/x86_64_build"
4319- MESA_IMAGE_TAG: *alpine-x86_64_build
4320- LLVM_VERSION: *alpine-llvm_version
4321- needs:
4322- - job: sanity
4323- optional: true
4324- - job: alpine/x86_64_build
4325- optional: true
4326diff --git a/.gitlab-ci/container/alpine/x86_64_build.sh b/.gitlab-ci/container/alpine/x86_64_build.sh
4327deleted file mode 100644
4328index 0e6d955..0000000
4329--- a/.gitlab-ci/container/alpine/x86_64_build.sh
4330+++ /dev/null
4331@@ -1,89 +0,0 @@
4332-#!/usr/bin/env bash
4333-# shellcheck disable=SC1091
4334-
4335-# When changing this file, you need to bump the following
4336-# .gitlab-ci/image-tags.yml tags:
4337-# ALPINE_X86_64_BUILD_TAG
4338-
4339-set -e
4340-
4341-. .gitlab-ci/setup-test-env.sh
4342-
4343-set -o xtrace
4344-
4345-EPHEMERAL=(
4346-)
4347-
4348-
4349-DEPS=(
4350- bash
4351- bison
4352- ccache
4353- "clang${LLVM_VERSION}-dev"
4354- clang-dev
4355- cmake
4356- coreutils
4357- curl
4358- elfutils-dev
4359- expat-dev
4360- flex
4361- g++
4362- gcc
4363- gettext
4364- git
4365- glslang
4366- graphviz
4367- libclc-dev
4368- libdrm-dev
4369- libpciaccess-dev
4370- libva-dev
4371- linux-headers
4372- "llvm${LLVM_VERSION}-dev"
4373- "llvm${LLVM_VERSION}-static"
4374- mold
4375- musl-dev
4376- ninja-build
4377- py3-clang
4378- py3-cparser
4379- py3-mako
4380- py3-packaging
4381- py3-pip
4382- py3-ply
4383- py3-yaml
4384- python3-dev
4385- spirv-llvm-translator-dev
4386- spirv-tools-dev
4387- util-macros
4388- vulkan-headers
4389- zlib-dev
4390-)
4391-
4392-apk --no-cache add "${DEPS[@]}" "${EPHEMERAL[@]}"
4393-
4394-# shellcheck disable=2016 # we're not trying to evaluate $PATH now
4395-echo 'export PATH="/usr/lib/ninja-build/bin/:$PATH"' > /etc/profile.d/ninja-path.sh
4396-source /etc/profile.d/ninja-path.sh
4397-
4398-pip3 install --break-system-packages sphinx===8.2.3 hawkmoth===0.19.0
4399-
4400-. .gitlab-ci/container/container_pre_build.sh
4401-
4402-. .gitlab-ci/container/install-meson.sh
4403-
4404-. .gitlab-ci/container/build-rust.sh build
4405-
4406-EXTRA_MESON_ARGS='--prefix=/usr' \
4407-. .gitlab-ci/container/build-wayland.sh
4408-
4409-############### Uninstall the build software
4410-
4411-# too many vendor binarise, just keep the ones we need
4412-find /usr/share/clc \
4413- \( -type f -o -type l \) \
4414- ! -name 'spirv-mesa3d-.spv' \
4415- ! -name 'spirv64-mesa3d-.spv' \
4416- -delete
4417-
4418-apk del "${EPHEMERAL[@]}"
4419-
4420-. .gitlab-ci/container/container_post_build.sh
4421diff --git a/.gitlab-ci/container/baremetal_build.sh b/.gitlab-ci/container/baremetal_build.sh
4422deleted file mode 100644
4423index a855e1e..0000000
4424--- a/.gitlab-ci/container/baremetal_build.sh
4425+++ /dev/null
4426@@ -1,27 +0,0 @@
4427-#!/usr/bin/env bash
4428-# shellcheck disable=SC2154 # arch is assigned in previous scripts
4429-
4430-set -e
4431-set -o xtrace
4432-
4433-# Fetch the arm-built rootfs image and unpack it in our x86_64 container (saves
4434-# network transfer, disk usage, and runtime on test jobs)
4435-
4436-# shellcheck disable=SC2034 # S3_BASE_PATH is used in find_s3_project_artifact
4437-S3_BASE_PATH="${S3_HOST}/${S3_KERNEL_BUCKET}"
4438-ARTIFACTS_PATH="${LAVA_DISTRIBUTION_TAG}/lava-rootfs.tar.zst"
4439-ARTIFACTS_URL="$(find_s3_project_artifact "${ARTIFACTS_PATH}")"
4440-
4441-curl-with-retry -o rootfs.tar.zst "${ARTIFACTS_URL}"
4442-mkdir -p /rootfs-"$arch"
4443-tar -C /rootfs-"$arch" '--exclude=./dev/*' --zstd -xf rootfs.tar.zst
4444-rm rootfs.tar.zst
4445-
4446-if [[ $arch == "arm64" ]]; then
4447- mkdir -p /baremetal-files
4448- pushd /baremetal-files
4449-
4450- curl-with-retry -O "${KERNEL_IMAGE_BASE}"/arm64/Image
4451- curl-with-retry -O "${KERNEL_IMAGE_BASE}"/arm64/Image.gz
4452- popd
4453-fi
4454diff --git a/.gitlab-ci/container/build-android-cts.sh b/.gitlab-ci/container/build-android-cts.sh
4455deleted file mode 100644
4456index c9eb710..0000000
4457--- a/.gitlab-ci/container/build-android-cts.sh
4458+++ /dev/null
4459@@ -1,67 +0,0 @@
4460-#!/usr/bin/env bash
4461-#
4462-# When changing this file, you need to bump the following
4463-# .gitlab-ci/image-tags.yml tags:
4464-# DEBIAN_TEST_ANDROID_TAG
4465-
4466-# This script runs in a container to:
4467-# 1. Download the Android CTS (Compatibility Test Suite)
4468-# 2. Filter out unneeded test modules
4469-# 3. Compress and upload the stripped version to S3
4470-# Note: The 'build-' prefix in the filename is only to make it compatible
4471-# with the bin/ci/update_tag.py script.
4472-
4473-set -euo pipefail
4474-
4475-section_start android-cts "Downloading Android CTS"
4476-
4477-# xtrace is getting lost with the section switching
4478-set -x
4479-
4480-# Do a very early check to make sure the tag is correct without the need of
4481-# setting up the environment variables locally
4482-ci_tag_build_time_check "ANDROID_CTS_TAG"
4483-
4484-# List of all CTS modules we might want to run in CI
4485-# This should be the union of all modules required by our CI jobs
4486-# Specific modules to run are selected via the ${GPU_VERSION}-android-cts-include.txt files
4487-ANDROID_CTS_MODULES=(
4488- "CtsDeqpTestCases"
4489- "CtsGraphicsTestCases"
4490- "CtsNativeHardwareTestCases"
4491- "CtsSkQPTestCases"
4492-)
4493-
4494-ANDROID_CTS_VERSION="${ANDROID_VERSION}_r3"
4495-ANDROID_CTS_DEVICE_ARCH="x86"
4496-
4497-# Download the stripped CTS from S3, because the CTS download from Google can take 20 minutes
4498-CTS_FILENAME="android-cts-${ANDROID_CTS_VERSION}-linux_x86-${ANDROID_CTS_DEVICE_ARCH}"
4499-ARTIFACT_PATH="${DATA_STORAGE_PATH}/android-cts/${ANDROID_CTS_TAG}.tar.zst"
4500-
4501-if FOUND_ARTIFACT_URL="$(find_s3_project_artifact "${ARTIFACT_PATH}")"; then
4502- echo "Found Android CTS at: ${FOUND_ARTIFACT_URL}"
4503- curl-with-retry "${FOUND_ARTIFACT_URL}" | tar --zstd -x -C /
4504-else
4505- echo "No cached CTS found, downloading from Google and uploading to S3..."
4506- curl-with-retry --remote-name "https://dl.google.com/dl/android/cts/${CTS_FILENAME}.zip"
4507-
4508- # Disable zipbomb detection, because the CTS zip file is too big
4509- # At least locally, it is detected as a zipbomb
4510- UNZIP_DISABLE_ZIPBOMB_DETECTION=true \
4511- unzip -q -d / "${CTS_FILENAME}.zip"
4512- rm "${CTS_FILENAME}.zip"
4513-
4514- # Keep only the interesting tests to save space
4515- # shellcheck disable=SC2086 # we want word splitting
4516- ANDROID_CTS_MODULES_KEEP_EXPRESSION=$(printf "%s|" "${ANDROID_CTS_MODULES[@]}" | sed -e 's/|$//g')
4517- find /android-cts/testcases/ -mindepth 1 -type d | grep -v -E "$ANDROID_CTS_MODULES_KEEP_EXPRESSION" | xargs rm -rf
4518-
4519- # Using zstd compressed tarball instead of zip, the compression ratio is almost the same, but
4520- # the extraction is faster, also LAVA overlays don't support zip compression.
4521- tar --zstd -cf "${CTS_FILENAME}.tar.zst" /android-cts
4522- ci-fairy s3cp --token-file "${S3_JWT_FILE}" "${CTS_FILENAME}.tar.zst" \
4523- "https://${S3_BASE_PATH}/${CI_PROJECT_PATH}/${ARTIFACT_PATH}"
4524-fi
4525-
4526-section_end android-cts
4527diff --git a/.gitlab-ci/container/build-android-x86_64-llvm.sh b/.gitlab-ci/container/build-android-x86_64-llvm.sh
4528deleted file mode 100755
4529index f79cb1b..0000000
4530--- a/.gitlab-ci/container/build-android-x86_64-llvm.sh
4531+++ /dev/null
4532@@ -1,123 +0,0 @@
4533-#!/usr/bin/env bash
4534-
4535-# When changing this file, you need to bump the following
4536-# .gitlab-ci/image-tags.yml and .gitlab-ci/container/gitlab-ci.yml tags:
4537-# DEBIAN_BUILD_TAG
4538-# ANDROID_LLVM_ARTIFACT_NAME
4539-
4540-set -exu
4541-
4542-# If CI vars are not set, assign an empty value, this prevents -u to fail
4543-: "${CI:=}"
4544-: "${CI_PROJECT_PATH:=}"
4545-
4546-# Early check for required env variables, relies on `set -u`
4547-: "$ANDROID_NDK_VERSION"
4548-: "$ANDROID_SDK_VERSION"
4549-: "$ANDROID_LLVM_VERSION"
4550-: "$ANDROID_LLVM_ARTIFACT_NAME"
4551-: "$S3_JWT_FILE"
4552-: "$S3_HOST"
4553-: "$S3_ANDROID_BUCKET"
4554-
4555-# Check for CI if the auth file used later on is non-empty
4556-if [ -n "$CI" ] && [ ! -s "${S3_JWT_FILE}" ]; then
4557- echo "Error: ${S3_JWT_FILE} is empty." 1>&2
4558- exit 1
4559-fi
4560-
4561-# shellcheck disable=SC2034 # S3_BASE_PATH is used in find_s3_project_artifact
4562-S3_BASE_PATH="${S3_HOST}/${S3_ANDROID_BUCKET}"
4563-ARTIFACTS_PATH="${ANDROID_LLVM_ARTIFACT_NAME}.tar.zst"
4564-
4565-if ARTIFACTS_URL="$(find_s3_project_artifact "${ARTIFACTS_PATH}")"; then
4566- echo "Artifact ${ANDROID_LLVM_ARTIFACT_NAME}.tar.zst already exists, skip re-building."
4567-
4568- # Download prebuilt LLVM libraries for Android when they have not changed,
4569- # to save some time
4570- curl-with-retry -o "/${ANDROID_LLVM_ARTIFACT_NAME}.tar.zst" "${ARTIFACTS_URL}"
4571- tar -C / --zstd -xf "/${ANDROID_LLVM_ARTIFACT_NAME}.tar.zst"
4572- rm "/${ANDROID_LLVM_ARTIFACT_NAME}.tar.zst"
4573-
4574- exit
4575-fi
4576-
4577-# Ephemeral packages (installed for this script and removed again at the end)
4578-EPHEMERAL=(
4579- unzip
4580-)
4581-
4582-apt-get update
4583-apt-get install -y --no-install-recommends --no-remove "${EPHEMERAL[@]}"
4584-
4585-ANDROID_NDK="android-ndk-${ANDROID_NDK_VERSION}"
4586-ANDROID_NDK_ROOT="/${ANDROID_NDK}"
4587-if [ ! -d "$ANDROID_NDK_ROOT" ];
4588-then
4589- curl-with-retry -o "${ANDROID_NDK}.zip" \
4590- "https://dl.google.com/android/repository/${ANDROID_NDK}-linux.zip"
4591- unzip -d / "${ANDROID_NDK}.zip" "$ANDROID_NDK/source.properties" "$ANDROID_NDK/build/cmake/*" "$ANDROID_NDK/toolchains/llvm/*"
4592- rm "${ANDROID_NDK}.zip"
4593-fi
4594-
4595-if [ ! -d "/llvm-project" ];
4596-then
4597- mkdir "/llvm-project"
4598- pushd "/llvm-project"
4599- git init
4600- git remote add origin https://github.com/llvm/llvm-project.git
4601- git fetch --depth 1 origin "$ANDROID_LLVM_VERSION"
4602- git checkout FETCH_HEAD
4603- popd
4604-fi
4605-
4606-pushd "/llvm-project"
4607-
4608-# Checkout again the intended version, just in case of a pre-existing full clone
4609-git checkout "$ANDROID_LLVM_VERSION" || true
4610-
4611-LLVM_INSTALL_PREFIX="/${ANDROID_LLVM_ARTIFACT_NAME}"
4612-
4613-rm -rf build/
4614-cmake -GNinja -S llvm -B build/ \
4615- -DCMAKE_TOOLCHAIN_FILE="${ANDROID_NDK_ROOT}/build/cmake/android.toolchain.cmake" \
4616- -DANDROID_ABI=x86_64 \
4617- -DANDROID_PLATFORM="android-${ANDROID_SDK_VERSION}" \
4618- -DANDROID_NDK="${ANDROID_NDK_ROOT}" \
4619- -DCMAKE_ANDROID_ARCH_ABI=x86_64 \
4620- -DCMAKE_ANDROID_NDK="${ANDROID_NDK_ROOT}" \
4621- -DCMAKE_BUILD_TYPE=MinSizeRel \
4622- -DCMAKE_SYSTEM_NAME=Android \
4623- -DCMAKE_SYSTEM_VERSION="${ANDROID_SDK_VERSION}" \
4624- -DCMAKE_INSTALL_PREFIX="${LLVM_INSTALL_PREFIX}" \
4625- -DCMAKE_CXX_FLAGS="-march=x86-64 --target=x86_64-linux-android${ANDROID_SDK_VERSION} -fno-rtti" \
4626- -DLLVM_HOST_TRIPLE="x86_64-linux-android${ANDROID_SDK_VERSION}" \
4627- -DLLVM_TARGETS_TO_BUILD=X86 \
4628- -DLLVM_BUILD_LLVM_DYLIB=OFF \
4629- -DLLVM_BUILD_TESTS=OFF \
4630- -DLLVM_BUILD_EXAMPLES=OFF \
4631- -DLLVM_BUILD_DOCS=OFF \
4632- -DLLVM_BUILD_TOOLS=OFF \
4633- -DLLVM_ENABLE_RTTI=OFF \
4634- -DLLVM_BUILD_INSTRUMENTED_COVERAGE=OFF \
4635- -DLLVM_NATIVE_TOOL_DIR="${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/linux-x86_64/bin" \
4636- -DLLVM_ENABLE_PIC=False \
4637- -DLLVM_OPTIMIZED_TABLEGEN=ON
4638-
4639-ninja "-j${FDO_CI_CONCURRENT:-4}" -C build/ install
4640-
4641-popd
4642-
4643-rm -rf /llvm-project
4644-
4645-tar --zstd -cf "${ANDROID_LLVM_ARTIFACT_NAME}.tar.zst" "$LLVM_INSTALL_PREFIX"
4646-
4647-# If run in CI upload the tar.zst archive to S3 to avoid rebuilding it if the
4648-# version does not change, and delete it.
4649-# The file is not deleted for non-CI because it can be useful in local runs.
4650-if [ -n "$CI" ]; then
4651- ci-fairy s3cp --token-file "${S3_JWT_FILE}" "${ANDROID_LLVM_ARTIFACT_NAME}.tar.zst" "https://${S3_HOST}/${S3_ANDROID_BUCKET}/${CI_PROJECT_PATH}/${ANDROID_LLVM_ARTIFACT_NAME}.tar.zst"
4652- rm "${ANDROID_LLVM_ARTIFACT_NAME}.tar.zst"
4653-fi
4654-
4655-apt-get purge -y "${EPHEMERAL[@]}"
4656diff --git a/.gitlab-ci/container/build-angle.sh b/.gitlab-ci/container/build-angle.sh
4657deleted file mode 100755
4658index 7da3ffb..0000000
4659--- a/.gitlab-ci/container/build-angle.sh
4660+++ /dev/null
4661@@ -1,189 +0,0 @@
4662-#!/usr/bin/env bash
4663-
4664-# When changing this file, you need to bump the following
4665-# .gitlab-ci/image-tags.yml tags:
4666-# DEBIAN_TEST_ANDROID_TAG
4667-# DEBIAN_TEST_GL_TAG
4668-
4669-set -uex
4670-
4671-section_start angle "Building ANGLE"
4672-
4673-# Do a very early check to make sure the tag is correct without the need of
4674-# setting up the environment variables locally
4675-ci_tag_build_time_check "ANGLE_TAG"
4676-
4677-ANGLE_REV="5e591d03650dd427001e355f4884b857cadab113"
4678-DEPOT_REV="5982a1aeb33dc36382ed8c62eddf52a6135e7dd3"
4679-
4680-# Set ANGLE_ARCH based on DEBIAN_ARCH if it hasn't been explicitly defined
4681-if [[ -z "${ANGLE_ARCH:-}" ]]; then
4682- case "$DEBIAN_ARCH" in
4683- amd64) ANGLE_ARCH=x64;;
4684- arm64) ANGLE_ARCH=arm64;;
4685- esac
4686-fi
4687-
4688-# DEPOT tools
4689-mkdir /depot-tools
4690-pushd /depot-tools
4691-git init
4692-git remote add origin https://chromium.googlesource.com/chromium/tools/depot_tools.git
4693-git fetch --depth 1 origin "$DEPOT_REV"
4694-git checkout FETCH_HEAD
4695-export PATH=/depot-tools:$PATH
4696-export DEPOT_TOOLS_UPDATE=0
4697-popd
4698-
4699-mkdir /angle-build
4700-mkdir /angle
4701-pushd /angle-build
4702-git init
4703-git remote add origin https://chromium.googlesource.com/angle/angle.git
4704-git fetch --depth 1 origin "$ANGLE_REV"
4705-git checkout FETCH_HEAD
4706-
4707-echo "$ANGLE_REV" > /angle/version
4708-
4709-GCLIENT_CUSTOM_VARS=()
4710-GCLIENT_CUSTOM_VARS+=('--custom-var=angle_enable_cl=False')
4711-GCLIENT_CUSTOM_VARS+=('--custom-var=angle_enable_cl_testing=False')
4712-GCLIENT_CUSTOM_VARS+=('--custom-var=angle_enable_vulkan_validation_layers=False')
4713-GCLIENT_CUSTOM_VARS+=('--custom-var=angle_enable_wgpu=False')
4714-GCLIENT_CUSTOM_VARS+=('--custom-var=build_angle_deqp_tests=False')
4715-GCLIENT_CUSTOM_VARS+=('--custom-var=build_angle_perftests=False')
4716-if [[ "$ANGLE_TARGET" == "android" ]]; then
4717- GCLIENT_CUSTOM_VARS+=('--custom-var=checkout_android=True')
4718-fi
4719-
4720-# source preparation
4721-gclient config --name REPLACE-WITH-A-DOT --unmanaged \
4722- "${GCLIENT_CUSTOM_VARS[@]}" \
4723- https://chromium.googlesource.com/angle/angle.git
4724-sed -e 's/REPLACE-WITH-A-DOT/./;' -i .gclient
4725-sed -e 's|"custom_deps" : {|"custom_deps" : {\
4726- "third_party/clspv/src": None,\
4727- "third_party/dawn": None,\
4728- "third_party/glmark2/src": None,\
4729- "third_party/libjpeg_turbo": None,\
4730- "third_party/llvm/src": None,\
4731- "third_party/OpenCL-CTS/src": None,\
4732- "third_party/SwiftShader": None,\
4733- "third_party/VK-GL-CTS/src": None,\
4734- "third_party/vulkan-validation-layers/src": None,|' -i .gclient
4735-gclient sync --no-history -j"${FDO_CI_CONCURRENT:-4}"
4736-
4737-mkdir -p out/Release
4738-cat > out/Release/args.gn <<EOF
4739-angle_assert_always_on=false
4740-angle_build_all=false
4741-angle_build_tests=false
4742-angle_enable_cl=false
4743-angle_enable_cl_testing=false
4744-angle_enable_gl=false
4745-angle_enable_gl_desktop_backend=false
4746-angle_enable_null=false
4747-angle_enable_swiftshader=false
4748-angle_enable_trace=false
4749-angle_enable_wgpu=false
4750-angle_enable_vulkan=true
4751-angle_enable_vulkan_api_dump_layer=false
4752-angle_enable_vulkan_validation_layers=false
4753-angle_has_frame_capture=false
4754-angle_has_histograms=false
4755-angle_has_rapidjson=false
4756-angle_use_custom_libvulkan=false
4757-build_angle_deqp_tests=false
4758-dcheck_always_on=true
4759-enable_expensive_dchecks=false
4760-is_component_build=false
4761-is_debug=false
4762-target_cpu="${ANGLE_ARCH}"
4763-target_os="${ANGLE_TARGET}"
4764-treat_warnings_as_errors=false
4765-EOF
4766-
4767-case "$ANGLE_TARGET" in
4768- linux) cat >> out/Release/args.gn <<EOF
4769-angle_egl_extension="so.1"
4770-angle_glesv2_extension="so.2"
4771-clang_unsafe_buffers_paths=""
4772-clang_use_chrome_plugins=false
4773-use_custom_libcxx=false
4774-custom_toolchain="//build/toolchain/linux/unbundle:default"
4775-host_toolchain="//build/toolchain/linux/unbundle:default"
4776-EOF
4777- ;;
4778- android) cat >> out/Release/args.gn <<EOF
4779-android_ndk_version="${ANDROID_NDK_VERSION}"
4780-android_ndk_api_level=${ANDROID_SDK_VERSION}
4781-use_custom_libcxx=true
4782-EOF
4783- ;;
4784- *) echo "Unexpected ANGLE_TARGET value: $ANGLE_TARGET"; exit 1;;
4785-esac
4786-
4787-if [[ "$DEBIAN_ARCH" = "arm64" ]]; then
4788- # We need to get an AArch64 sysroot - because ANGLE isn't great friends with
4789- # system dependencies - but use the default system toolchain, because the
4790- # 'arm64' toolchain you get from Google infrastructure is a cross-compiler
4791- # from x86-64
4792- build/linux/sysroot_scripts/install-sysroot.py --arch=arm64
4793-
4794- # The Bullseye sysroot is too old for Chromium's default PAC/BTI setup.
4795- # Chromium forces -z force-bti on arm64, but our sysroot objects lack BTI
4796- # notes, which breaks linking. Disable branch protection to keep the build
4797- # sane. See:
4798- # https://chromium.googlesource.com/chromium/src/build/+/7c4a6063/config/linux/BUILD.gn#87
4799- # https://chromium.googlesource.com/chromium/src/build/+/7c4a6063/config/arm.gni#77
4800- cat >> out/Release/args.gn <<EOF
4801-arm_control_flow_integrity="none"
4802-EOF
4803-fi
4804-
4805-# The Chromium build system hardcodes these flags, and they're not compatible
4806-# with our clang19 'unbundled' toolchain. See:
4807-# https://chromium.googlesource.com/chromium/src/build/+/39d42026/config/compiler/BUILD.gn#619
4808-# https://chromium.googlesource.com/chromium/src/build/+/42209031/config/sanitizers/sanitizers.gni#548
4809-sed -i '/-fno-lifetime-dse/d' build/config/compiler/BUILD.gn
4810-sed -i '/-fsanitize-ignore-for-ubsan-feature=/d' build/config/sanitizers/sanitizers.gni
4811-
4812-(
4813- # The 'unbundled' toolchain configuration requires clang, and it also needs to
4814- # be configured via environment variables.
4815- export CC="clang-${LLVM_VERSION}"
4816- export HOST_CC="$CC"
4817- export CFLAGS="-Wno-unknown-warning-option"
4818- export HOST_CFLAGS="$CFLAGS"
4819- export CXX="clang++-${LLVM_VERSION}"
4820- export HOST_CXX="$CXX"
4821- export CXXFLAGS="-Wno-unknown-warning-option"
4822- export HOST_CXXFLAGS="$CXXFLAGS"
4823- export AR="ar"
4824- export HOST_AR="$AR"
4825- export NM="nm"
4826- export HOST_NM="$NM"
4827- export LDFLAGS="-fuse-ld=lld-${LLVM_VERSION} -lpthread -ldl"
4828- export HOST_LDFLAGS="$LDFLAGS"
4829-
4830- gn gen out/Release
4831- # depot_tools overrides ninja with a version that doesn't work. We want
4832- # ninja with FDO_CI_CONCURRENT anyway.
4833- /usr/local/bin/ninja -C out/Release/ libEGL libGLESv1_CM libGLESv2
4834-)
4835-
4836-rm -f out/Release/libvulkan.so* out/Release/*.so*.TOC
4837-cp out/Release/lib*.so* /angle/
4838-
4839-if [[ "$ANGLE_TARGET" == "linux" ]]; then
4840- ln -s libEGL.so.1 /angle/libEGL.so
4841- ln -s libGLESv2.so.2 /angle/libGLESv2.so
4842-fi
4843-
4844-rm -rf out
4845-
4846-popd
4847-rm -rf /depot-tools
4848-rm -rf /angle-build
4849-
4850-section_end angle
4851diff --git a/.gitlab-ci/container/build-apitrace.sh b/.gitlab-ci/container/build-apitrace.sh
4852deleted file mode 100644
4853index 858cf92..0000000
4854--- a/.gitlab-ci/container/build-apitrace.sh
4855+++ /dev/null
4856@@ -1,27 +0,0 @@
4857-#!/usr/bin/env bash
4858-# shellcheck disable=SC2086 # we want word splitting
4859-
4860-# When changing this file, you need to bump the following
4861-# .gitlab-ci/image-tags.yml tags:
4862-# DEBIAN_TEST_BASE_TAG
4863-
4864-set -uex
4865-
4866-section_start apitrace "Building apitrace"
4867-
4868-APITRACE_VERSION="45a005875d348b055d5b88dca285c109dee90457"
4869-
4870-git clone https://github.com/apitrace/apitrace.git --single-branch --no-checkout /apitrace
4871-pushd /apitrace
4872-git checkout "$APITRACE_VERSION"
4873-git submodule update --init --depth 1 --recursive
4874-cmake -S . -B _build -G Ninja -DCMAKE_BUILD_TYPE=Release -DENABLE_GUI=False -DENABLE_WAFFLE=on ${EXTRA_CMAKE_ARGS:-}
4875-cmake --build _build --parallel --target apitrace eglretrace
4876-mkdir build
4877-cp _build/apitrace build
4878-cp _build/eglretrace build
4879-${STRIP_CMD:-strip} build/*
4880-find . -not -path './build' -not -path './build/*' -delete
4881-popd
4882-
4883-section_end apitrace
4884diff --git a/.gitlab-ci/container/build-bindgen.sh b/.gitlab-ci/container/build-bindgen.sh
4885deleted file mode 100644
4886index 9884557..0000000
4887--- a/.gitlab-ci/container/build-bindgen.sh
4888+++ /dev/null
4889@@ -1,28 +0,0 @@
4890-#!/usr/bin/env bash
4891-# shellcheck disable=SC2086 # we want word splitting
4892-
4893-# When changing this file, you need to bump the following
4894-# .gitlab-ci/image-tags.yml tags:
4895-# DEBIAN_BUILD_TAG
4896-# FEDORA_X86_64_BUILD_TAG
4897-
4898-section_start bindgen "Building bindgen"
4899-
4900-BINDGEN_VER=0.71.1
4901-CBINDGEN_VER=0.26.0
4902-
4903-# bindgen
4904-RUSTFLAGS='-L native=/usr/local/lib' cargo install \
4905- bindgen-cli --version ${BINDGEN_VER} \
4906- --locked \
4907- -j ${FDO_CI_CONCURRENT:-4} \
4908- --root /usr/local
4909-
4910-# cbindgen
4911-RUSTFLAGS='-L native=/usr/local/lib' cargo install \
4912- cbindgen --version ${CBINDGEN_VER} \
4913- --locked \
4914- -j ${FDO_CI_CONCURRENT:-4} \
4915- --root /usr/local
4916-
4917-section_end bindgen
4918diff --git a/.gitlab-ci/container/build-crosvm.sh b/.gitlab-ci/container/build-crosvm.sh
4919deleted file mode 100644
4920index d66bd3a..0000000
4921--- a/.gitlab-ci/container/build-crosvm.sh
4922+++ /dev/null
4923@@ -1,56 +0,0 @@
4924-#!/usr/bin/env bash
4925-# shellcheck disable=SC2086 # we want word splitting
4926-
4927-# When changing this file, you need to bump the following
4928-# .gitlab-ci/image-tags.yml tags:
4929-# DEBIAN_TEST_BASE_TAG
4930-
4931-# Do a very early check to make sure the tag is correct without the need of
4932-# setting up the environment variables locally
4933-ci_tag_build_time_check "CROSVM_TAG"
4934-
4935-set -uex
4936-
4937-section_start crosvm "Building crosvm"
4938-
4939-git config --global user.email "mesa@example.com"
4940-git config --global user.name "Mesa CI"
4941-
4942-CROSVM_VERSION=f58c8e685f3f21d733861a080a0857acafd0da56
4943-git clone --single-branch -b main --no-checkout https://chromium.googlesource.com/crosvm/crosvm /platform/crosvm
4944-pushd /platform/crosvm
4945-git checkout "$CROSVM_VERSION"
4946-git submodule update --init
4947-
4948-VIRGLRENDERER_VERSION=95610d57da49d76617bd6d8d21b9bfb1bf360f64
4949-rm -rf third_party/virglrenderer
4950-git clone --single-branch -b main --no-checkout https://gitlab.freedesktop.org/virgl/virglrenderer.git third_party/virglrenderer
4951-pushd third_party/virglrenderer
4952-git checkout "$VIRGLRENDERER_VERSION"
4953-meson setup build/ -D libdir=lib -D render-server-worker=process -D venus=true ${EXTRA_MESON_ARGS:-}
4954-meson install -C build
4955-popd
4956-
4957-rm rust-toolchain
4958-
4959-RUSTFLAGS='-L native=/usr/local/lib' cargo install \
4960- bindgen-cli \
4961- --locked \
4962- -j ${FDO_CI_CONCURRENT:-4} \
4963- --root /usr/local \
4964- --version 0.71.1 \
4965- ${EXTRA_CARGO_ARGS:-}
4966-
4967-CROSVM_USE_SYSTEM_MINIGBM=1 CROSVM_USE_SYSTEM_VIRGLRENDERER=1 RUSTFLAGS='-L native=/usr/local/lib' cargo install \
4968- -j ${FDO_CI_CONCURRENT:-4} \
4969- --locked \
4970- --features 'default-no-sandbox gpu x virgl_renderer' \
4971- --path . \
4972- --root /usr/local \
4973- ${EXTRA_CARGO_ARGS:-}
4974-
4975-popd
4976-
4977-rm -rf /platform/crosvm
4978-
4979-section_end crosvm
4980diff --git a/.gitlab-ci/container/build-deqp-runner.sh b/.gitlab-ci/container/build-deqp-runner.sh
4981deleted file mode 100644
4982index f02826b..0000000
4983--- a/.gitlab-ci/container/build-deqp-runner.sh
4984+++ /dev/null
4985@@ -1,98 +0,0 @@
4986-#!/usr/bin/env bash
4987-# shellcheck disable=SC2086 # we want word splitting
4988-
4989-# When changing this file, you need to bump the following
4990-# .gitlab-ci/image-tags.yml tags:
4991-# DEBIAN_TEST_BASE_TAG
4992-
4993-set -uex
4994-
4995-section_start deqp-runner "Building deqp-runner"
4996-
4997-DEQP_RUNNER_VERSION=0.23.2
4998-
4999-commits_to_backport=(
5000-)
5001-
5002-patch_files=(
5003-)
5004-
5005-DEQP_RUNNER_GIT_URL="${DEQP_RUNNER_GIT_URL:-https://gitlab.freedesktop.org/mesa/deqp-runner.git}"
5006-
5007-if [ -n "${DEQP_RUNNER_GIT_TAG:-}" ]; then
5008- DEQP_RUNNER_GIT_CHECKOUT="$DEQP_RUNNER_GIT_TAG"
5009-elif [ -n "${DEQP_RUNNER_GIT_REV:-}" ]; then
5010- DEQP_RUNNER_GIT_CHECKOUT="$DEQP_RUNNER_GIT_REV"
5011-else
5012- DEQP_RUNNER_GIT_CHECKOUT="v$DEQP_RUNNER_VERSION"
5013-fi
5014-
5015-BASE_PWD=$PWD
5016-
5017-mkdir -p /deqp-runner
5018-pushd /deqp-runner
5019-mkdir deqp-runner-git
5020-pushd deqp-runner-git
5021-git init
5022-git remote add origin "$DEQP_RUNNER_GIT_URL"
5023-git fetch --depth 1 origin "$DEQP_RUNNER_GIT_CHECKOUT"
5024-git checkout FETCH_HEAD
5025-
5026-for commit in "${commits_to_backport[@]}"
5027-do
5028- PATCH_URL="https://gitlab.freedesktop.org/mesa/deqp-runner/-/commit/$commit.patch"
5029- echo "Backport deqp-runner commit $commit from $PATCH_URL"
5030- curl -L --retry 4 -f --retry-all-errors --retry-delay 60 $PATCH_URL | git am
5031-done
5032-
5033-for patch in "${patch_files[@]}"
5034-do
5035- echo "Apply patch to deqp-runner from $patch"
5036- git am "$BASE_PWD/.gitlab-ci/container/patches/$patch"
5037-done
5038-
5039-if [ -z "${RUST_TARGET:-}" ]; then
5040- RUST_TARGET=""
5041-fi
5042-
5043-if [[ "$RUST_TARGET" != *-android ]]; then
5044- # When CC (/usr/lib/ccache/gcc) variable is set, the rust compiler uses
5045- # this variable when cross-compiling arm32 and build fails for zsys-sys.
5046- # So unset the CC variable when cross-compiling for arm32.
5047- SAVEDCC=${CC:-}
5048- if [ "$RUST_TARGET" = "armv7-unknown-linux-gnueabihf" ]; then
5049- unset CC
5050- fi
5051- cargo install --locked \
5052- -j ${FDO_CI_CONCURRENT:-4} \
5053- --root /usr/local \
5054- ${EXTRA_CARGO_ARGS:-} \
5055- --path .
5056- CC=$SAVEDCC
5057-else
5058- cargo install --locked \
5059- -j ${FDO_CI_CONCURRENT:-4} \
5060- --root /usr/local --version 2.10.0 \
5061- cargo-ndk
5062-
5063- rustup target add $RUST_TARGET
5064- RUSTFLAGS='-C target-feature=+crt-static' cargo ndk --target $RUST_TARGET build --release
5065-
5066- mv target/$RUST_TARGET/release/deqp-runner /deqp-runner
5067-
5068- cargo uninstall --locked \
5069- --root /usr/local \
5070- cargo-ndk
5071-fi
5072-
5073-popd
5074-rm -rf deqp-runner-git
5075-popd
5076-
5077-# remove unused test runners to shrink images for the Mesa CI build (not kernel,
5078-# which chooses its own deqp branch)
5079-if [ -z "${DEQP_RUNNER_GIT_TAG:-}${DEQP_RUNNER_GIT_REV:-}" ]; then
5080- rm -f /usr/local/bin/igt-runner
5081-fi
5082-
5083-section_end deqp-runner
5084diff --git a/.gitlab-ci/container/build-deqp.sh b/.gitlab-ci/container/build-deqp.sh
5085deleted file mode 100755
5086index 76e2867..0000000
5087--- a/.gitlab-ci/container/build-deqp.sh
5088+++ /dev/null
5089@@ -1,321 +0,0 @@
5090-#!/usr/bin/env bash
5091-# shellcheck disable=SC2086 # we want word splitting
5092-
5093-# When changing this file, you need to bump the following
5094-# .gitlab-ci/image-tags.yml tags:
5095-# DEBIAN_TEST_ANDROID_TAG
5096-# DEBIAN_TEST_GL_TAG
5097-# DEBIAN_TEST_VK_TAG
5098-
5099-set -ue -o pipefail
5100-
5101-# shellcheck disable=SC2153
5102-deqp_api=${DEQP_API,,}
5103-
5104-section_start deqp-$deqp_api "Building dEQP $DEQP_API"
5105-
5106-set -x
5107-
5108-# See `deqp_build_targets` below for which release is used to produce which
5109-# binary. Unless this comment has bitrotten:
5110-# - the commit from the main branch produces the deqp tools and `deqp-vk`,
5111-# - the VK release produces `deqp-vk`,
5112-# - the GL release produces `glcts`, and
5113-# - the GLES release produces `deqp-gles*` and `deqp-egl`
5114-
5115-DEQP_MAIN_COMMIT=634a3fc62d82c34de68c3b1add25e6b7f5777524
5116-DEQP_VK_VERSION=1.4.4.2
5117-DEQP_GL_VERSION=4.6.8.0
5118-DEQP_GLES_VERSION=3.2.14.0
5119-
5120-# Patches to VulkanCTS may come from commits in their repo (listed in
5121-# cts_commits_to_backport) or patch files stored in our repo (in the patch
5122-# directory `$OLDPWD/.gitlab-ci/container/patches/` listed in cts_patch_files).
5123-# Both list variables would have comments explaining the reasons behind the
5124-# patches.
5125-
5126-# shellcheck disable=SC2034
5127-main_cts_commits_to_backport=(
5128- # If you find yourself wanting to add something in here, consider whether
5129- # bumping DEQP_MAIN_COMMIT is not a better solution :)
5130-)
5131-
5132-# shellcheck disable=SC2034
5133-main_cts_patch_files=(
5134-)
5135-
5136-# shellcheck disable=SC2034
5137-vk_cts_commits_to_backport=(
5138- # Add an option to print to logcat in Android executable builds
5139- fc51668efdfd0dffa30b3eddee34aa26172969fb
5140-)
5141-
5142-# shellcheck disable=SC2034
5143-vk_cts_patch_files=(
5144-)
5145-
5146-# shellcheck disable=SC2034
5147-gl_cts_commits_to_backport=(
5148-)
5149-
5150-# shellcheck disable=SC2034
5151-gl_cts_patch_files=(
5152- build-deqp-gl_Build-Don-t-build-Vulkan-utilities-for-GL-builds.patch
5153-)
5154-
5155-# shellcheck disable=SC2034
5156-# GLES builds also EGL
5157-gles_cts_commits_to_backport=(
5158- # Fix EGL render tests for rgba16 and rgb16 unorm fixed point
5159- b5ed8718f19492781f8e9be3eb9d3346e961efa9
5160- # Fix glGetnUniform* error codes when bufSize < 0
5161- 34259553e0cc77061465ae0c4bcd4c4658a0fb4a
5162-)
5163-
5164-# shellcheck disable=SC2034
5165-gles_cts_patch_files=(
5166- build-deqp-gl_Build-Don-t-build-Vulkan-utilities-for-GL-builds.patch
5167-)
5168-
5169-
5170-### Careful editing anything below this line
5171-
5172-
5173-git config --global user.email "mesa@example.com"
5174-git config --global user.name "Mesa CI"
5175-
5176-# shellcheck disable=SC2153
5177-case "${DEQP_API}" in
5178- tools) DEQP_VERSION="$DEQP_MAIN_COMMIT";;
5179- *-main) DEQP_VERSION="$DEQP_MAIN_COMMIT";;
5180- VK) DEQP_VERSION="vulkan-cts-$DEQP_VK_VERSION";;
5181- GL) DEQP_VERSION="opengl-cts-$DEQP_GL_VERSION";;
5182- GLES) DEQP_VERSION="opengl-es-cts-$DEQP_GLES_VERSION";;
5183- *) echo "Unexpected DEQP_API value: $DEQP_API"; exit 1;;
5184-esac
5185-
5186-mkdir -p /VK-GL-CTS
5187-pushd /VK-GL-CTS
5188-[ -e .git ] || {
5189- git init
5190- git remote add origin https://github.com/KhronosGroup/VK-GL-CTS.git
5191-}
5192-git fetch --depth 1 origin "$DEQP_VERSION"
5193-git checkout FETCH_HEAD
5194-DEQP_COMMIT=$(git rev-parse FETCH_HEAD)
5195-
5196-if [ "$DEQP_VERSION" = "$DEQP_MAIN_COMMIT" ]; then
5197- for i in {5..1}; do
5198- if merge_base=$(curl-with-retry -s https://api.github.com/repos/KhronosGroup/VK-GL-CTS/compare/main...$DEQP_MAIN_COMMIT | jq -e -r .merge_base_commit.sha); then
5199- break
5200- fi
5201-
5202- if [ "$i" -eq 1 ]; then
5203- echo "Final attempt to fetch merge base from GitHub failed. VK-GL-CTS GitHub API might be down or rate-limited."
5204- exit 1
5205- fi
5206- sleep 10
5207- done
5208-
5209- if [[ "$merge_base" != "$DEQP_MAIN_COMMIT" ]]; then
5210- echo "VK-GL-CTS commit $DEQP_MAIN_COMMIT is not a commit from the main branch."
5211- exit 1
5212- fi
5213-fi
5214-
5215-mkdir -p /deqp-$deqp_api
5216-
5217-if [ "$DEQP_VERSION" = "$DEQP_MAIN_COMMIT" ]; then
5218- prefix="main"
5219-else
5220- prefix="$deqp_api"
5221-fi
5222-
5223-cts_commits_to_backport="${prefix}_cts_commits_to_backport[@]"
5224-for commit in "${!cts_commits_to_backport}"
5225-do
5226- PATCH_URL="https://github.com/KhronosGroup/VK-GL-CTS/commit/$commit.patch"
5227- echo "Apply patch to ${DEQP_API} CTS from $PATCH_URL"
5228- curl-with-retry $PATCH_URL | GIT_COMMITTER_DATE=$(LC_TIME=C date -d@0) git am -
5229-done
5230-
5231-cts_patch_files="${prefix}_cts_patch_files[@]"
5232-for patch in "${!cts_patch_files}"
5233-do
5234- echo "Apply patch to ${DEQP_API} CTS from $patch"
5235- GIT_COMMITTER_DATE=$(LC_TIME=C date -d@0) git am < $OLDPWD/.gitlab-ci/container/patches/$patch
5236-done
5237-
5238-{
5239- if [ "$DEQP_VERSION" = "$DEQP_MAIN_COMMIT" ]; then
5240- commit_desc=$(git show --no-patch --format='commit %h on %ci' --abbrev=10 "$DEQP_COMMIT")
5241- echo "dEQP $DEQP_API at $commit_desc"
5242- else
5243- echo "dEQP $DEQP_API version $DEQP_VERSION"
5244- fi
5245- if [ "$(git rev-parse HEAD)" != "$DEQP_COMMIT" ]; then
5246- echo "The following local patches are applied on top:"
5247- git log --reverse --oneline "$DEQP_COMMIT".. --format='- %s'
5248- fi
5249-} > /deqp-$deqp_api/deqp-$deqp_api-version
5250-
5251-# --insecure is due to SSL cert failures hitting sourceforge for zlib and
5252-# libpng (sigh). The archives get their checksums checked anyway, and git
5253-# always goes through ssh or https.
5254-python3 external/fetch_sources.py --insecure
5255-
5256-case "${DEQP_API}" in
5257- VK-main)
5258- # Video tests rely on external files
5259- python3 external/fetch_video_decode_samples.py
5260- python3 external/fetch_video_encode_samples.py
5261- ;;
5262-esac
5263-
5264-if [[ "$DEQP_API" = tools ]]; then
5265- # Save the testlog stylesheets:
5266- cp doc/testlog-stylesheet/testlog.{css,xsl} /deqp-$deqp_api
5267-fi
5268-
5269-popd
5270-
5271-deqp_build_targets=()
5272-case "${DEQP_API}" in
5273- VK|VK-main)
5274- deqp_build_targets+=(deqp-vk)
5275- ;;
5276- GL)
5277- deqp_build_targets+=(glcts)
5278- ;;
5279- GLES)
5280- deqp_build_targets+=(deqp-gles{2,3,31})
5281- deqp_build_targets+=(glcts) # needed for gles*-khr tests
5282- # deqp-egl also comes from this build, but it is handled separately below.
5283- ;;
5284- tools)
5285- deqp_build_targets+=(testlog-to-xml)
5286- deqp_build_targets+=(testlog-to-csv)
5287- deqp_build_targets+=(testlog-to-junit)
5288- ;;
5289-esac
5290-
5291-OLD_IFS="$IFS"
5292-IFS=";"
5293-CMAKE_SBT="${deqp_build_targets[*]}"
5294-IFS="$OLD_IFS"
5295-
5296-pushd /deqp-$deqp_api
5297-
5298-if [ "${DEQP_API}" = 'GLES' ]; then
5299- if [ "${DEQP_TARGET}" = 'android' ]; then
5300- cmake -S /VK-GL-CTS -B . -G Ninja \
5301- -DDEQP_TARGET=android \
5302- -DCMAKE_BUILD_TYPE=Release \
5303- -DSELECTED_BUILD_TARGETS="deqp-egl" \
5304- ${EXTRA_CMAKE_ARGS:-}
5305- ninja modules/egl/deqp-egl
5306- mv modules/egl/deqp-egl{,-android}
5307- else
5308- # When including EGL/X11 testing, do that build first and save off its
5309- # deqp-egl binary.
5310- cmake -S /VK-GL-CTS -B . -G Ninja \
5311- -DDEQP_TARGET=x11_egl_glx \
5312- -DCMAKE_BUILD_TYPE=Release \
5313- -DSELECTED_BUILD_TARGETS="deqp-egl" \
5314- ${EXTRA_CMAKE_ARGS:-}
5315- ninja modules/egl/deqp-egl
5316- mv modules/egl/deqp-egl{,-x11}
5317-
5318- cmake -S /VK-GL-CTS -B . -G Ninja \
5319- -DDEQP_TARGET=wayland \
5320- -DCMAKE_BUILD_TYPE=Release \
5321- -DSELECTED_BUILD_TARGETS="deqp-egl" \
5322- ${EXTRA_CMAKE_ARGS:-}
5323- ninja modules/egl/deqp-egl
5324- mv modules/egl/deqp-egl{,-wayland}
5325- fi
5326-fi
5327-
5328-cmake -S /VK-GL-CTS -B . -G Ninja \
5329- -DDEQP_TARGET=${DEQP_TARGET} \
5330- -DCMAKE_BUILD_TYPE=Release \
5331- -DSELECTED_BUILD_TARGETS="${CMAKE_SBT}" \
5332- ${EXTRA_CMAKE_ARGS:-}
5333-
5334-# Make sure `default` doesn't silently stop detecting one of the platforms we care about
5335-if [ "${DEQP_TARGET}" = 'default' ]; then
5336- grep -q DEQP_SUPPORT_WAYLAND=1 build.ninja
5337- grep -q DEQP_SUPPORT_X11=1 build.ninja
5338- grep -q DEQP_SUPPORT_XCB=1 build.ninja
5339-fi
5340-
5341-ninja "${deqp_build_targets[@]}"
5342-
5343-if [ "$DEQP_API" != tools ]; then
5344- # Copy out the mustpass lists we want.
5345- mkdir -p mustpass
5346-
5347- if [ "${DEQP_API}" = 'VK' ] || [ "${DEQP_API}" = 'VK-main' ]; then
5348- for mustpass in $(< /VK-GL-CTS/external/vulkancts/mustpass/main/vk-default.txt) ; do
5349- cat /VK-GL-CTS/external/vulkancts/mustpass/main/$mustpass \
5350- >> mustpass/vk-main.txt
5351- done
5352- fi
5353-
5354- if [ "${DEQP_API}" = 'GL' ]; then
5355- cp \
5356- /VK-GL-CTS/external/openglcts/data/gl_cts/data/mustpass/gl/khronos_mustpass/main/*-main.txt \
5357- mustpass/
5358- cp \
5359- /VK-GL-CTS/external/openglcts/data/gl_cts/data/mustpass/gl/khronos_mustpass_single/main/*-single.txt \
5360- mustpass/
5361- fi
5362-
5363- if [ "${DEQP_API}" = 'GLES' ]; then
5364- cp \
5365- /VK-GL-CTS/external/openglcts/data/gl_cts/data/mustpass/gles/aosp_mustpass/main/*.txt \
5366- mustpass/
5367- cp \
5368- /VK-GL-CTS/external/openglcts/data/gl_cts/data/mustpass/egl/aosp_mustpass/main/egl-main.txt \
5369- mustpass/
5370- cp \
5371- /VK-GL-CTS/external/openglcts/data/gl_cts/data/mustpass/gles/khronos_mustpass/main/*-main.txt \
5372- mustpass/
5373- fi
5374-
5375- # Compress the caselists, since Vulkan's in particular are gigantic; higher
5376- # compression levels provide no real measurable benefit.
5377- zstd -f -1 --rm mustpass/*.txt
5378-fi
5379-
5380-if [ "$DEQP_API" = tools ]; then
5381- # Save *some* executor utils, but otherwise strip things down
5382- # to reduct deqp build size:
5383- mv executor/testlog-to-* .
5384- rm -rf executor
5385-fi
5386-
5387-# Remove other mustpass files, since we saved off the ones we wanted to conventient locations above.
5388-rm -rf assets/**/mustpass/
5389-rm -rf external/**/mustpass/
5390-rm -rf external/vulkancts/modules/vulkan/vk-main*
5391-rm -rf external/vulkancts/modules/vulkan/vk-default
5392-
5393-rm -rf external/openglcts/modules/cts-runner
5394-rm -rf modules/internal
5395-rm -rf execserver
5396-rm -rf framework
5397-find . -depth \( -iname '*cmake*' -o -name '*ninja*' -o -name '*.o' -o -name '*.a' \) -exec rm -rf {} \;
5398-if [ "${DEQP_API}" = 'VK' ] || [ "${DEQP_API}" = 'VK-main' ]; then
5399- ${STRIP_CMD:-strip} external/vulkancts/modules/vulkan/deqp-vk
5400-fi
5401-if [ "${DEQP_API}" = 'GL' ] || [ "${DEQP_API}" = 'GLES' ]; then
5402- ${STRIP_CMD:-strip} external/openglcts/modules/glcts
5403-fi
5404-if [ "${DEQP_API}" = 'GLES' ]; then
5405- ${STRIP_CMD:-strip} modules/*/deqp-*
5406-fi
5407-du -sh ./*
5408-popd
5409-
5410-section_end deqp-$deqp_api
5411diff --git a/.gitlab-ci/container/build-directx-headers.sh b/.gitlab-ci/container/build-directx-headers.sh
5412deleted file mode 100644
5413index 18e99d0..0000000
5414--- a/.gitlab-ci/container/build-directx-headers.sh
5415+++ /dev/null
5416@@ -1,19 +0,0 @@
5417-#!/usr/bin/env bash
5418-# shellcheck disable=SC2086 # we want word splitting
5419-
5420-# When changing this file, you need to bump the following
5421-# .gitlab-ci/image-tags.yml tags:
5422-# DEBIAN_BUILD_TAG
5423-
5424-set -uex
5425-
5426-section_start directx-headers "Building directx-headers"
5427-
5428-git clone https://github.com/microsoft/DirectX-Headers -b v1.619.1 --depth 1
5429-pushd DirectX-Headers
5430-meson setup build --backend=ninja --buildtype=release -Dbuild-test=false ${EXTRA_MESON_ARGS:-}
5431-meson install -C build
5432-popd
5433-rm -rf DirectX-Headers
5434-
5435-section_end directx-headers
5436diff --git a/.gitlab-ci/container/build-fluster.sh b/.gitlab-ci/container/build-fluster.sh
5437deleted file mode 100644
5438index 79b1334..0000000
5439--- a/.gitlab-ci/container/build-fluster.sh
5440+++ /dev/null
5441@@ -1,52 +0,0 @@
5442-#!/usr/bin/env bash
5443-
5444-# shellcheck disable=SC1091 # The relative paths in this file only become valid at runtime.
5445-# shellcheck disable=SC2034 # Variables are used in scripts called from here
5446-# shellcheck disable=SC2086 # we want word splitting
5447-
5448-# When changing this file, you need to bump the following
5449-# .gitlab-ci/image-tags.yml tags:
5450-# DEBIAN_TEST_VIDEO_TAG
5451-
5452-# Install fluster in /fluster.
5453-
5454-set -uex
5455-
5456-section_start fluster "Installing Fluster"
5457-
5458-# Do a very early check to make sure the tag is correct without the need of
5459-# setting up the environment variables locally
5460-ci_tag_build_time_check "FLUSTER_TAG"
5461-
5462-FLUSTER_REVISION="3dad9c71f4d5eacbb692be6b328a645822b591d6"
5463-
5464-git clone https://github.com/fluendo/fluster.git --single-branch --no-checkout
5465-
5466-pushd fluster || exit
5467-git checkout "${FLUSTER_REVISION}"
5468-popd || exit
5469-
5470-ARTIFACT_PATH="${DATA_STORAGE_PATH}/fluster/${FLUSTER_TAG}/vectors.tar.zst"
5471-
5472-if FOUND_ARTIFACT_URL="$(find_s3_project_artifact "${ARTIFACT_PATH}")"; then
5473- echo "Found fluster vectors at: ${FOUND_ARTIFACT_URL}"
5474- mv fluster/ /
5475- curl-with-retry "${FOUND_ARTIFACT_URL}" | tar --zstd -x -C /
5476-else
5477- echo "No cached vectors found, rebuilding..."
5478- # Download the necessary vectors: H264, H265 and VP9
5479- # When updating FLUSTER_REVISION, make sure to update the vectors if necessary or
5480- # fluster-runner will report Missing results.
5481- fluster/fluster.py download -j ${FDO_CI_CONCURRENT:-4} \
5482- JVT-AVC_V1 JVT-FR-EXT JVT-MVC JVT-Professional_profiles JVT-SVC \
5483- JCT-VC-3D-HEVC JCT-VC-HEVC_V1 JCT-VC-MV-HEVC JCT-VC-RExt JCT-VC-SCC JCT-VC-SHVC \
5484- VP9-TEST-VECTORS-HIGH VP9-TEST-VECTORS
5485-
5486- # Build fluster vectors archive and upload it
5487- tar --zstd -cf "vectors.tar.zst" fluster/resources/
5488- ci-fairy s3cp --token-file "${S3_JWT_FILE}" "vectors.tar.zst" \
5489- "https://${S3_BASE_PATH}/${CI_PROJECT_PATH}/${ARTIFACT_PATH}"
5490- mv fluster/ /
5491-fi
5492-
5493-section_end fluster
5494diff --git a/.gitlab-ci/container/build-fossilize.sh b/.gitlab-ci/container/build-fossilize.sh
5495deleted file mode 100644
5496index 9b51ad6..0000000
5497--- a/.gitlab-ci/container/build-fossilize.sh
5498+++ /dev/null
5499@@ -1,22 +0,0 @@
5500-#!/bin/bash
5501-
5502-# When changing this file, you need to bump the following
5503-# .gitlab-ci/image-tags.yml tags:
5504-# DEBIAN_TEST_VK_TAG
5505-
5506-set -ex
5507-
5508-section_start fossilize "Building fossilize"
5509-
5510-git clone https://github.com/ValveSoftware/Fossilize.git
5511-cd Fossilize
5512-git checkout b43ee42bbd5631ea21fe9a2dee4190d5d875c327
5513-git submodule update --init
5514-mkdir build
5515-cd build
5516-cmake -S .. -B . -G Ninja -DCMAKE_BUILD_TYPE=Release
5517-ninja -C . install
5518-cd ../..
5519-rm -rf Fossilize
5520-
5521-section_end fossilize
5522diff --git a/.gitlab-ci/container/build-gfxreconstruct.sh b/.gitlab-ci/container/build-gfxreconstruct.sh
5523deleted file mode 100644
5524index 3dceb38..0000000
5525--- a/.gitlab-ci/container/build-gfxreconstruct.sh
5526+++ /dev/null
5527@@ -1,27 +0,0 @@
5528-#!/usr/bin/env bash
5529-
5530-# When changing this file, you need to bump the following
5531-# .gitlab-ci/image-tags.yml tags:
5532-# DEBIAN_TEST_VK_TAG
5533-
5534-set -ex
5535-
5536-section_start gfxreconstruct "Building gfxreconstruct"
5537-
5538-GFXRECONSTRUCT_VERSION=6670c53aa2013d1e839e57410f8b332dc58e38ce
5539-
5540-git clone https://github.com/LunarG/gfxreconstruct.git \
5541- --single-branch \
5542- -b master \
5543- --no-checkout \
5544- /gfxreconstruct
5545-pushd /gfxreconstruct
5546-git checkout "$GFXRECONSTRUCT_VERSION"
5547-git submodule update --init
5548-git submodule update
5549-cmake -S . -B _build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=/gfxreconstruct/build -DBUILD_WERROR=OFF
5550-cmake --build _build --parallel --target tools/{replay,info}/install/strip
5551-find . -not -path './build' -not -path './build/*' -delete
5552-popd
5553-
5554-section_end gfxreconstruct
5555diff --git a/.gitlab-ci/container/build-kdl.sh b/.gitlab-ci/container/build-kdl.sh
5556deleted file mode 100755
5557index 640790e..0000000
5558--- a/.gitlab-ci/container/build-kdl.sh
5559+++ /dev/null
5560@@ -1,32 +0,0 @@
5561-#!/usr/bin/env bash
5562-# shellcheck disable=SC1091 # the path is created by the script
5563-
5564-set -ex
5565-
5566-section_start kdl "Building kdl"
5567-
5568-KDL_REVISION="42218ba7297a28d64ddd1d4b5f200a60b3659d42"
5569-KDL_CHECKOUT_DIR="/tmp/ci-kdl.git"
5570-
5571-mkdir -p ${KDL_CHECKOUT_DIR}
5572-pushd ${KDL_CHECKOUT_DIR}
5573-git init
5574-git remote add origin https://gitlab.freedesktop.org/gfx-ci/ci-kdl.git
5575-git fetch --depth 1 origin ${KDL_REVISION}
5576-git checkout FETCH_HEAD
5577-popd
5578-
5579-# Run venv in a subshell, so we don't accidentally leak the venv state into
5580-# calling scripts
5581-(
5582- python3 -m venv /ci-kdl
5583- source /ci-kdl/bin/activate &&
5584- pushd ${KDL_CHECKOUT_DIR} &&
5585- pip install -r requirements.txt &&
5586- pip install . &&
5587- popd
5588-)
5589-
5590-rm -rf ${KDL_CHECKOUT_DIR}
5591-
5592-section_end kdl
5593diff --git a/.gitlab-ci/container/build-libclc.sh b/.gitlab-ci/container/build-libclc.sh
5594deleted file mode 100644
5595index f3c652a..0000000
5596--- a/.gitlab-ci/container/build-libclc.sh
5597+++ /dev/null
5598@@ -1,35 +0,0 @@
5599-#!/usr/bin/env bash
5600-
5601-set -uex
5602-
5603-section_start libclc "Building libclc"
5604-
5605-export LLVM_CONFIG="llvm-config-${LLVM_VERSION:?"llvm unset!"}"
5606-LLVM_TAG="llvmorg-15.0.7"
5607-
5608-$LLVM_CONFIG --version
5609-
5610-git config --global user.email "mesa@example.com"
5611-git config --global user.name "Mesa CI"
5612-git clone \
5613- https://github.com/llvm/llvm-project \
5614- --depth 1 \
5615- -b "${LLVM_TAG}" \
5616- /llvm-project
5617-
5618-mkdir /libclc
5619-pushd /libclc
5620-cmake -S /llvm-project/libclc -B . -G Ninja -DLLVM_CONFIG="$LLVM_CONFIG" -DLIBCLC_TARGETS_TO_BUILD="spirv-mesa3d-;spirv64-mesa3d-" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DLLVM_SPIRV=/usr/bin/llvm-spirv
5621-ninja
5622-ninja install
5623-popd
5624-
5625-# workaroud cmake vs debian packaging.
5626-mkdir -p /usr/lib/clc
5627-ln -s /usr/share/clc/spirv64-mesa3d-.spv /usr/lib/clc/
5628-ln -s /usr/share/clc/spirv-mesa3d-.spv /usr/lib/clc/
5629-
5630-du -sh ./*
5631-rm -rf /libclc /llvm-project
5632-
5633-section_end libclc
5634diff --git a/.gitlab-ci/container/build-libdrm.sh b/.gitlab-ci/container/build-libdrm.sh
5635deleted file mode 100644
5636index 479ea07..0000000
5637--- a/.gitlab-ci/container/build-libdrm.sh
5638+++ /dev/null
5639@@ -1,21 +0,0 @@
5640-#!/usr/bin/env bash
5641-# Script used for Android and Fedora builds (Debian builds get their libdrm version
5642-# from https://gitlab.freedesktop.org/gfx-ci/ci-deb-repo - see PKG_REPO_REV)
5643-# shellcheck disable=SC2086 # we want word splitting
5644-
5645-set -uex
5646-
5647-section_start libdrm "Building libdrm"
5648-
5649-export LIBDRM_VERSION=libdrm-2.4.122
5650-
5651-curl -L -O --retry 4 -f --retry-all-errors --retry-delay 60 \
5652- https://dri.freedesktop.org/libdrm/"$LIBDRM_VERSION".tar.xz
5653-tar -xvf "$LIBDRM_VERSION".tar.xz && rm "$LIBDRM_VERSION".tar.xz
5654-cd "$LIBDRM_VERSION"
5655-meson setup build -D vc4=disabled -D freedreno=disabled -D etnaviv=disabled ${EXTRA_MESON_ARGS:-}
5656-meson install -C build
5657-cd ..
5658-rm -rf "$LIBDRM_VERSION"
5659-
5660-section_end libdrm
5661diff --git a/.gitlab-ci/container/build-llvm-spirv.sh b/.gitlab-ci/container/build-llvm-spirv.sh
5662deleted file mode 100644
5663index 06565a8..0000000
5664--- a/.gitlab-ci/container/build-llvm-spirv.sh
5665+++ /dev/null
5666@@ -1,30 +0,0 @@
5667-#!/usr/bin/env bash
5668-
5669-set -ex
5670-
5671-section_start llvm-spirv "Building LLVM-SPIRV-Translator"
5672-
5673-if [ "${LLVM_VERSION:?llvm version not set}" -ge 18 ]; then
5674- VER="${LLVM_VERSION}.1.0"
5675-else
5676- VER="${LLVM_VERSION}.0.0"
5677-fi
5678-
5679-curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
5680- -O "https://github.com/KhronosGroup/SPIRV-LLVM-Translator/archive/refs/tags/v${VER}.tar.gz"
5681-tar -xvf "v${VER}.tar.gz" && rm "v${VER}.tar.gz"
5682-
5683-mkdir "SPIRV-LLVM-Translator-${VER}/build"
5684-pushd "SPIRV-LLVM-Translator-${VER}/build"
5685-cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
5686-ninja
5687-ninja install
5688-# For some reason llvm-spirv is not installed by default
5689-ninja llvm-spirv
5690-cp tools/llvm-spirv/llvm-spirv /usr/bin/
5691-popd
5692-
5693-du -sh "SPIRV-LLVM-Translator-${VER}"
5694-rm -rf "SPIRV-LLVM-Translator-${VER}"
5695-
5696-section_end llvm-spirv
5697diff --git a/.gitlab-ci/container/build-mold.sh b/.gitlab-ci/container/build-mold.sh
5698deleted file mode 100644
5699index f113342..0000000
5700--- a/.gitlab-ci/container/build-mold.sh
5701+++ /dev/null
5702@@ -1,31 +0,0 @@
5703-#!/usr/bin/env bash
5704-
5705-# When changing this file, you need to bump the following
5706-# .gitlab-ci/image-tags.yml tags:
5707-# ALPINE_X86_64_BUILD_TAG
5708-# DEBIAN_BUILD_TAG
5709-# DEBIAN_TEST_BASE_TAG
5710-# FEDORA_X86_64_BUILD_TAG
5711-
5712-set -ex
5713-
5714-section_start mold "Building mold"
5715-
5716-MOLD_VERSION="2.40.1"
5717-
5718-git clone -b v"$MOLD_VERSION" --single-branch --depth 1 https://github.com/rui314/mold.git
5719-pushd mold
5720-
5721-cmake -DCMAKE_BUILD_TYPE=Release -D BUILD_TESTING=OFF -D MOLD_LTO=ON
5722-cmake --build . --parallel "${FDO_CI_CONCURRENT:-4}"
5723-cmake --install . --strip
5724-
5725-# Always use mold from now on
5726-find /usr/bin \( -name '*-ld' -o -name 'ld' \) \
5727- -exec ln -sf /usr/local/bin/ld.mold {} \; \
5728- -exec ls -l {} +
5729-
5730-popd
5731-rm -rf mold
5732-
5733-section_end mold
5734diff --git a/.gitlab-ci/container/build-perfetto.sh b/.gitlab-ci/container/build-perfetto.sh
5735deleted file mode 100755
5736index 328851d..0000000
5737--- a/.gitlab-ci/container/build-perfetto.sh
5738+++ /dev/null
5739@@ -1,77 +0,0 @@
5740-#!/usr/bin/env bash
5741-
5742-set -uex
5743-
5744-section_start perfetto "Building perfetto"
5745-
5746-BASE_PWD=$PWD
5747-
5748-PERFETTO_REVISION=$(grep 'revision =' subprojects/perfetto.wrap | cut -d ' ' -f3)
5749-
5750-patch_files=(
5751- "build-perfetto-Fix-C-standard-library-build-errors-with-Debian-13.patch"
5752-)
5753-
5754-# Set PERFETTO_ARCH based on DEBIAN_ARCH
5755-if [[ -z "${PERFETTO_ARCH:-}" ]]; then
5756- case "$DEBIAN_ARCH" in
5757- amd64) PERFETTO_ARCH=x64;;
5758- arm64) PERFETTO_ARCH=arm64;;
5759- esac
5760-fi
5761-
5762-git clone --branch "$PERFETTO_REVISION" --depth 1 https://github.com/google/perfetto /perfetto
5763-
5764-pushd /perfetto
5765-
5766-for patch in "${patch_files[@]}"; do
5767- echo "Applying patch: $patch"
5768- git am "$BASE_PWD/.gitlab-ci/container/patches/$patch"
5769-done
5770-
5771-# Base GN args
5772-mkdir -p _build
5773-cat >_build/args.gn <<EOF
5774-is_debug=false
5775-target_cpu="${PERFETTO_ARCH}"
5776-target_os="${PERFETTO_TARGET}"
5777-EOF
5778-
5779-case "$PERFETTO_TARGET" in
5780-linux)
5781- # Override Perfetto’s default toolchain selection here, as the bundled
5782- # arm64 toolchain is an x86-64 -> arm64 cross-compiler.
5783- cat >>_build/args.gn <<EOF
5784-is_system_compiler = true
5785-is_hermetic_clang = false
5786-ar = "ar"
5787-cc = "clang-${LLVM_VERSION}"
5788-cxx = "clang++-${LLVM_VERSION}"
5789-extra_ldflags = "-fuse-ld=lld-${LLVM_VERSION} -lpthread -ldl"
5790-EOF
5791- ./tools/install-build-deps
5792- ;;
5793-android)
5794- # No additional args needed when cross-building for Android
5795- ./tools/install-build-deps --android
5796- ;;
5797-*)
5798- echo "Unexpected PERFETTO_TARGET value: $PERFETTO_TARGET"
5799- exit 1
5800- ;;
5801-esac
5802-
5803-./tools/gn gen _build/
5804-./tools/ninja -C _build/ tracebox
5805-
5806-mkdir -p build
5807-cp _build/tracebox build/
5808-
5809-"${STRIP_CMD:-strip}" build/tracebox || true
5810-
5811-# Cleanup everything except build/
5812-find . -mindepth 1 -maxdepth 1 ! -name build -exec rm -rf {} +
5813-
5814-popd
5815-
5816-section_end perfetto
5817diff --git a/.gitlab-ci/container/build-piglit.sh b/.gitlab-ci/container/build-piglit.sh
5818deleted file mode 100644
5819index 02335b9..0000000
5820--- a/.gitlab-ci/container/build-piglit.sh
5821+++ /dev/null
5822@@ -1,41 +0,0 @@
5823-#!/bin/bash
5824-# shellcheck disable=SC2086 # we want word splitting
5825-set -uex
5826-
5827-section_start piglit "Building piglit"
5828-
5829-# When changing this file, you need to bump the following
5830-# .gitlab-ci/image-tags.yml tags:
5831-# DEBIAN_TEST_GL_TAG
5832-# DEBIAN_TEST_VK_TAG
5833-
5834-# Do a very early check to make sure the tag is correct without the need of
5835-# setting up the environment variables locally
5836-ci_tag_build_time_check "PIGLIT_TAG"
5837-
5838-REV="11ce9eb56edb00e6a7702d13168cc827ce5e0cbd"
5839-
5840-git clone https://gitlab.freedesktop.org/mesa/piglit.git --single-branch --no-checkout /piglit
5841-pushd /piglit
5842-git checkout "$REV"
5843-patch -p1 <$OLDPWD/.gitlab-ci/piglit/disable-vs_in.diff
5844-cmake -S . -B . -G Ninja -DCMAKE_BUILD_TYPE=Release $PIGLIT_OPTS ${EXTRA_CMAKE_ARGS:-}
5845-ninja ${PIGLIT_BUILD_TARGETS:-}
5846-find . -depth \( -name .git -o -name '*ninja*' -o -iname '*cmake*' -o -name '*.[chao]' \) \
5847- ! -name 'include_test.h' -exec rm -rf {} \;
5848-rm -rf target_api
5849-if [ "${PIGLIT_BUILD_TARGETS:-}" = "piglit_replayer" ]; then
5850- find . -depth \
5851- ! -regex "^\.$" \
5852- ! -regex "^\.\/piglit.*" \
5853- ! -regex "^\.\/framework.*" \
5854- ! -regex "^\.\/bin$" \
5855- ! -regex "^\.\/bin\/replayer\.py" \
5856- ! -regex "^\.\/templates.*" \
5857- ! -regex "^\.\/tests$" \
5858- ! -regex "^\.\/tests\/replay\.py" \
5859- -exec rm -rf {} \; 2>/dev/null
5860-fi
5861-popd
5862-
5863-section_end piglit
5864diff --git a/.gitlab-ci/container/build-rust.sh b/.gitlab-ci/container/build-rust.sh
5865deleted file mode 100644
5866index b21e4fc..0000000
5867--- a/.gitlab-ci/container/build-rust.sh
5868+++ /dev/null
5869@@ -1,54 +0,0 @@
5870-#!/bin/bash
5871-
5872-# Note that this script is not actually "building" rust, but build- is the
5873-# convention for the shared helpers for putting stuff in our containers.
5874-
5875-set -ex
5876-
5877-section_start rust "Building Rust toolchain"
5878-
5879-# When changing this file, you need to bump the following
5880-# .gitlab-ci/image-tags.yml tags:
5881-# DEBIAN_BUILD_BASE_TAG
5882-# DEBIAN_TEST_BASE_TAG
5883-
5884-MINIMUM_SUPPORTED_RUST_VERSION=$(python3 -c 'import tomllib; print(tomllib.load(open("clippy.toml", "rb"))["msrv"])')
5885-
5886-# This version number can be bumped freely, to benefit from the latest
5887-# diagnostics in CI `build-only` jobs, and for building external CI
5888-# components.
5889-LATEST_RUST_VERSION=1.90.0
5890-
5891-# For rust in Mesa, we use rustup to install. This lets us pick an arbitrary
5892-# version of the compiler, rather than whatever the container's Debian comes
5893-# with.
5894-curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
5895- --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- \
5896- --default-toolchain $LATEST_RUST_VERSION \
5897- --profile minimal \
5898- --component clippy,rustfmt \
5899- -y
5900-
5901-# Make rustup tools available in the PATH environment variable
5902-# shellcheck disable=SC1091
5903-. "$HOME/.cargo/env"
5904-
5905-if [ "$1" = "build" ]
5906-then
5907- rustup toolchain install --profile minimal --component clippy,rustfmt "$MINIMUM_SUPPORTED_RUST_VERSION"
5908-fi
5909-
5910-find "$HOME"/.rustup/toolchains/*/lib -type f -name "*.so" -exec strip {} \;
5911-find "$HOME"/.rustup/toolchains -type f -executable -exec strip {} \;
5912-
5913-# Set up a config script for cross compiling -- cargo needs your system cc for
5914-# linking in cross builds, but doesn't know what you want to use for system cc.
5915-cat > "$HOME/.cargo/config" <<EOF
5916-[target.armv7-unknown-linux-gnueabihf]
5917-linker = "arm-linux-gnueabihf-gcc"
5918-
5919-[target.aarch64-unknown-linux-gnu]
5920-linker = "aarch64-linux-gnu-gcc"
5921-EOF
5922-
5923-section_end rust
5924diff --git a/.gitlab-ci/container/build-shader-db.sh b/.gitlab-ci/container/build-shader-db.sh
5925deleted file mode 100644
5926index 7b50c95..0000000
5927--- a/.gitlab-ci/container/build-shader-db.sh
5928+++ /dev/null
5929@@ -1,18 +0,0 @@
5930-#!/usr/bin/env bash
5931-
5932-# When changing this file, you need to bump the following
5933-# .gitlab-ci/image-tags.yml tags:
5934-# DEBIAN_BUILD_TAG
5935-
5936-set -ex
5937-
5938-section_start shader-db "Building shader-db"
5939-
5940-pushd /usr/local
5941-git clone https://gitlab.freedesktop.org/mesa/shader-db.git --depth 1
5942-rm -rf shader-db/.git
5943-cd shader-db
5944-make
5945-popd
5946-
5947-section_end shader-db
5948diff --git a/.gitlab-ci/container/build-skqp.sh b/.gitlab-ci/container/build-skqp.sh
5949deleted file mode 100755
5950index bff3b2f..0000000
5951--- a/.gitlab-ci/container/build-skqp.sh
5952+++ /dev/null
5953@@ -1,104 +0,0 @@
5954-#!/usr/bin/env bash
5955-# SPDX-License-Identifier: MIT
5956-#
5957-# Copyright © 2022 Collabora Limited
5958-# Author: Guilherme Gallo <guilherme.gallo@collabora.com>
5959-#
5960-# When changing this file, you need to bump the following
5961-# .gitlab-ci/image-tags.yml tags:
5962-# DEBIAN_TEST_GL_TAG
5963-
5964-set -uex
5965-
5966-section_start skqp "Building SkQP"
5967-
5968-SKQP_BRANCH=android-cts-12.1_r5
5969-
5970-SCRIPT_DIR="$(pwd)/.gitlab-ci/container"
5971-SKQP_PATCH_DIR="${SCRIPT_DIR}/patches"
5972-BASE_ARGS_GN_FILE="${SCRIPT_DIR}/build-skqp_base.gn"
5973-
5974-case "$DEBIAN_ARCH" in
5975- amd64)
5976- SKQP_ARCH=x64
5977- ;;
5978- armhf)
5979- SKQP_ARCH=arm
5980- ;;
5981- arm64)
5982- SKQP_ARCH=arm64
5983- ;;
5984-esac
5985-
5986-SKIA_DIR=${SKIA_DIR:-$(mktemp -d)}
5987-SKQP_OUT_DIR=${SKIA_DIR}/out/${SKQP_ARCH}
5988-SKQP_INSTALL_DIR=${SKQP_INSTALL_DIR:-/skqp}
5989-SKQP_ASSETS_DIR="${SKQP_INSTALL_DIR}/assets"
5990-SKQP_BINARIES=(skqp list_gpu_unit_tests list_gms)
5991-
5992-create_gn_args() {
5993- # gn can be configured to cross-compile skia and its tools
5994- # It is important to set the target_cpu to guarantee the intended target
5995- # machine
5996- cp "${BASE_ARGS_GN_FILE}" "${SKQP_OUT_DIR}"/args.gn
5997- echo "target_cpu = \"${SKQP_ARCH}\"" >> "${SKQP_OUT_DIR}"/args.gn
5998-}
5999-
6000-
6001-download_skia_source() {
6002- if [ -z ${SKIA_DIR+x} ]
6003- then
6004- return 1
6005- fi
6006-
6007- # Skia cloned from https://android.googlesource.com/platform/external/skqp
6008- # has all needed assets tracked on git-fs
6009- SKQP_REPO=https://android.googlesource.com/platform/external/skqp
6010-
6011- git clone --branch "${SKQP_BRANCH}" --depth 1 "${SKQP_REPO}" "${SKIA_DIR}"
6012-}
6013-
6014-download_skia_source
6015-
6016-pushd "${SKIA_DIR}"
6017-
6018-# Apply all skqp patches for Mesa CI
6019-cat "${SKQP_PATCH_DIR}"/build-skqp_*.patch |
6020- patch -p1
6021-
6022-# hack for skqp see the clang
6023-pushd /usr/bin/
6024-ln -s "../lib/llvm-${LLVM_VERSION}/bin/clang" clang
6025-ln -s "../lib/llvm-${LLVM_VERSION}/bin/clang++" clang++
6026-popd
6027-
6028-# Fetch some needed build tools needed to build skia/skqp.
6029-# Basically, it clones repositories with commits SHAs from ${SKIA_DIR}/DEPS
6030-# directory.
6031-python3 tools/git-sync-deps
6032-
6033-mkdir -p "${SKQP_OUT_DIR}"
6034-mkdir -p "${SKQP_INSTALL_DIR}"
6035-
6036-create_gn_args
6037-
6038-# Build and install skqp binaries
6039-bin/gn gen "${SKQP_OUT_DIR}"
6040-
6041-for BINARY in "${SKQP_BINARIES[@]}"
6042-do
6043- /usr/bin/ninja -C "${SKQP_OUT_DIR}" "${BINARY}"
6044- # Strip binary, since gn is not stripping it even when `is_debug == false`
6045- ${STRIP_CMD:-strip} "${SKQP_OUT_DIR}/${BINARY}"
6046- install -m 0755 "${SKQP_OUT_DIR}/${BINARY}" "${SKQP_INSTALL_DIR}"
6047-done
6048-
6049-# Move assets to the target directory, which will reside in rootfs.
6050-mv platform_tools/android/apps/skqp/src/main/assets/ "${SKQP_ASSETS_DIR}"
6051-
6052-popd
6053-rm -Rf "${SKIA_DIR}"
6054-
6055-set +ex
6056-
6057-section_end skqp
6058diff --git a/.gitlab-ci/container/build-skqp_base.gn b/.gitlab-ci/container/build-skqp_base.gn
6059deleted file mode 100644
6060index 1a64da3..0000000
6061--- a/.gitlab-ci/container/build-skqp_base.gn
6062+++ /dev/null
6063@@ -1,64 +0,0 @@
6064-cc = "clang"
6065-cxx = "clang++"
6066-
6067-extra_cflags = [
6068- "-Wno-error",
6069-
6070- "-DSK_ENABLE_DUMP_GPU",
6071- "-DSK_BUILD_FOR_SKQP"
6072- ]
6073-extra_cflags_cc = [
6074- "-Wno-error",
6075-
6076- # skqp build process produces a lot of compilation warnings, silencing
6077- # most of them to remove clutter and avoid the CI job log to exceed the
6078- # maximum size
6079-
6080- # GCC flags
6081- "-Wno-redundant-move",
6082- "-Wno-suggest-override",
6083- "-Wno-class-memaccess",
6084- "-Wno-deprecated-copy",
6085- "-Wno-uninitialized",
6086-
6087- # Clang flags
6088- "-Wno-macro-redefined",
6089- "-Wno-anon-enum-enum-conversion",
6090- "-Wno-suggest-destructor-override",
6091- "-Wno-return-std-move-in-c++11",
6092- "-Wno-extra-semi-stmt",
6093- "-Wno-reserved-identifier",
6094- "-Wno-bitwise-instead-of-logical",
6095- "-Wno-reserved-identifier",
6096- "-Wno-psabi",
6097- "-Wno-unused-but-set-variable",
6098- "-Wno-sizeof-array-div",
6099- "-Wno-string-concatenation",
6100- "-Wno-unsafe-buffer-usage",
6101- "-Wno-switch-default",
6102- "-Wno-cast-function-type-strict",
6103- "-Wno-format",
6104- "-Wno-enum-constexpr-conversion",
6105- ]
6106-
6107-cc_wrapper = "ccache"
6108-
6109-is_debug = false
6110-
6111-skia_enable_fontmgr_android = false
6112-skia_enable_fontmgr_empty = true
6113-skia_enable_pdf = false
6114-skia_enable_skottie = false
6115-
6116-skia_skqp_global_error_tolerance = 8
6117-skia_tools_require_resources = true
6118-
6119-skia_use_dng_sdk = false
6120-skia_use_expat = true
6121-skia_use_icu = false
6122-skia_use_libheif = false
6123-skia_use_lua = false
6124-skia_use_piex = false
6125-skia_use_vulkan = true
6126-
6127-target_os = "linux"
6128diff --git a/.gitlab-ci/container/build-va-tools.sh b/.gitlab-ci/container/build-va-tools.sh
6129deleted file mode 100644
6130index f9b6609..0000000
6131--- a/.gitlab-ci/container/build-va-tools.sh
6132+++ /dev/null
6133@@ -1,28 +0,0 @@
6134-#!/usr/bin/env bash
6135-# shellcheck disable=SC2086 # we want word splitting
6136-
6137-# When changing this file, you need to bump the following
6138-# .gitlab-ci/image-tags.yml tags:
6139-# DEBIAN_TEST_VIDEO_TAG
6140-
6141-set -uex
6142-
6143-section_start va-tools "Building va-tools"
6144-
6145-git config --global user.email "mesa@example.com"
6146-git config --global user.name "Mesa CI"
6147-
6148-git clone \
6149- https://github.com/intel/libva-utils.git \
6150- -b 2.22.0 \
6151- --depth 1 \
6152- /va-utils
6153-
6154-pushd /va-utils
6155-
6156-meson setup build -D tests=true -Dprefix=/va ${EXTRA_MESON_ARGS:-}
6157-meson install -C build
6158-popd
6159-rm -rf /va-utils
6160-
6161-section_end va-tools
6162diff --git a/.gitlab-ci/container/build-vkd3d-proton.sh b/.gitlab-ci/container/build-vkd3d-proton.sh
6163deleted file mode 100644
6164index c6575e1..0000000
6165--- a/.gitlab-ci/container/build-vkd3d-proton.sh
6166+++ /dev/null
6167@@ -1,65 +0,0 @@
6168-#!/bin/bash
6169-
6170-# When changing this file, you need to bump the following
6171-# .gitlab-ci/image-tags.yml tags:
6172-# DEBIAN_TEST_VK_TAG
6173-set -ex
6174-
6175-section_start vkd3d-proton "Building vkd3d-proton"
6176-
6177-# Do a very early check to make sure the tag is correct without the need of
6178-# setting up the environment variables locally
6179-ci_tag_build_time_check "VKD3D_PROTON_TAG"
6180-
6181-VKD3D_PROTON_COMMIT="a83811bf228ec4e7fc09727388521c725126d868"
6182-
6183-VKD3D_PROTON_DST_DIR="/vkd3d-proton-tests"
6184-VKD3D_PROTON_SRC_DIR="/vkd3d-proton-src"
6185-VKD3D_PROTON_WINE_DIR="/vkd3d-proton-wine64"
6186-VKD3D_PROTON_S3_ARTIFACT="vkd3d-proton.tar.zst"
6187-
6188-if [ ! -d "$VKD3D_PROTON_WINE_DIR" ]; then
6189- echo "Fatal: Directory '$VKD3D_PROTON_WINE_DIR' does not exist. Aborting."
6190- exit 1
6191-fi
6192-
6193-mkdir -p "$VKD3D_PROTON_SRC_DIR"
6194-pushd "$VKD3D_PROTON_SRC_DIR"
6195-git init
6196-git remote add origin https://github.com/HansKristian-Work/vkd3d-proton.git
6197-git fetch --depth 1 origin "$VKD3D_PROTON_COMMIT"
6198-git checkout FETCH_HEAD
6199-git submodule update --init --recursive
6200-
6201-meson setup build --buildtype release -D enable_tests=true \
6202- -D c_args=-Wno-error=incompatible-pointer-types
6203-# Build and install specifically the bits we want; gets rid of 24MB of
6204-# unwanted files, keeping only 7.6MB of the three useful files.
6205-for file in \
6206- libs/d3d12/libvkd3d-proton-d3d12.so \
6207- libs/d3d12core/libvkd3d-proton-d3d12core.so \
6208- tests/d3d12 \
6209-; do
6210- ninja -C build "$file"
6211- strip build/"$file"
6212- install -Dm755 -t "${VKD3D_PROTON_DST_DIR}/$(dirname "$file")" build/"$file"
6213-done
6214-
6215-install -m755 -t "${VKD3D_PROTON_DST_DIR}/tests" tests/test-runner.sh
6216-popd
6217-
6218-# Archive and upload vkd3d-proton for use as a LAVA overlay, if the archive doesn't exist yet
6219-ARTIFACT_PATH="${DATA_STORAGE_PATH}/vkd3d-proton/${VKD3D_PROTON_TAG}/${CI_JOB_NAME}/${VKD3D_PROTON_S3_ARTIFACT}"
6220-if FOUND_ARTIFACT_URL="$(find_s3_project_artifact "${ARTIFACT_PATH}")"; then
6221- echo "Found vkd3d-proton at: ${FOUND_ARTIFACT_URL}, skipping upload"
6222-else
6223- echo "Uploaded vkd3d-proton not found, reuploading..."
6224- tar --zstd -cf "$VKD3D_PROTON_S3_ARTIFACT" -C / "${VKD3D_PROTON_DST_DIR#/}" "${VKD3D_PROTON_WINE_DIR#/}"
6225- ci-fairy s3cp --token-file "${S3_JWT_FILE}" "$VKD3D_PROTON_S3_ARTIFACT" \
6226- "https://${S3_BASE_PATH}/${CI_PROJECT_PATH}/${ARTIFACT_PATH}"
6227- rm "$VKD3D_PROTON_S3_ARTIFACT"
6228-fi
6229-
6230-rm -rf "$VKD3D_PROTON_SRC_DIR"
6231-
6232-section_end vkd3d-proton
6233diff --git a/.gitlab-ci/container/build-vulkan-validation.sh b/.gitlab-ci/container/build-vulkan-validation.sh
6234deleted file mode 100644
6235index 86411dc..0000000
6236--- a/.gitlab-ci/container/build-vulkan-validation.sh
6237+++ /dev/null
6238@@ -1,29 +0,0 @@
6239-#!/usr/bin/env bash
6240-
6241-# When changing this file, you need to bump the following
6242-# .gitlab-ci/image-tags.yml tags:
6243-# DEBIAN_TEST_GL_TAG
6244-
6245-set -uex
6246-
6247-section_start vulkan-validation "Building Vulkan validation layers"
6248-
6249-VALIDATION_TAG="cb2acdf7f49053406770ae73cbb315229a9131eb"
6250-
6251-mkdir Vulkan-ValidationLayers
6252-pushd Vulkan-ValidationLayers
6253-git init
6254-git remote add origin https://github.com/KhronosGroup/Vulkan-ValidationLayers.git
6255-git fetch --depth 1 origin "$VALIDATION_TAG"
6256-git checkout FETCH_HEAD
6257-
6258-# we don't need to build SPIRV-Tools tools
6259-sed -i scripts/known_good.json -e 's/SPIRV_SKIP_EXECUTABLES=OFF/SPIRV_SKIP_EXECUTABLES=ON/'
6260-python3 scripts/update_deps.py --dir external --config release --generator Ninja --optional tests
6261-cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_TESTS=OFF -DBUILD_WERROR=OFF -C external/helper.cmake -S . -B build
6262-ninja -C build -j"${FDO_CI_CONCURRENT:-4}"
6263-cmake --install build --strip
6264-popd
6265-rm -rf Vulkan-ValidationLayers
6266-
6267-section_end vulkan-validation
6268diff --git a/.gitlab-ci/container/build-wayland.sh b/.gitlab-ci/container/build-wayland.sh
6269deleted file mode 100644
6270index b31d0f4..0000000
6271--- a/.gitlab-ci/container/build-wayland.sh
6272+++ /dev/null
6273@@ -1,39 +0,0 @@
6274-#!/usr/bin/env bash
6275-# shellcheck disable=SC2086 # we want word splitting
6276-
6277-set -uex
6278-
6279-section_start wayland "Building Wayland"
6280-
6281-# When changing this file, you need to bump the following
6282-# .gitlab-ci/image-tags.yml tags:
6283-# ALPINE_X86_64_BUILD_TAG
6284-# FEDORA_X86_64_BUILD_TAG
6285-
6286-export LIBWAYLAND_VERSION="1.24.0"
6287-export WAYLAND_PROTOCOLS_VERSION="1.41"
6288-
6289-git clone https://gitlab.freedesktop.org/wayland/wayland
6290-cd wayland
6291-git checkout "$LIBWAYLAND_VERSION"
6292-
6293-# Build the native library and scanner first in case we're a cross build.
6294-# Note the lack of EXTRA_MESON_ARGS here.
6295-meson setup -Dtests=false -Ddocumentation=false -Ddtd_validation=false -Dlibraries=true -Dscanner=true _build
6296-meson install -C _build
6297-
6298-# Now build cross libwayland using the native scanner
6299-meson setup -Dtests=false -Ddocumentation=false -Ddtd_validation=false -Dlibraries=true -Dscanner=false _cross ${EXTRA_MESON_ARGS:-}
6300-meson install -C _cross
6301-cd ..
6302-rm -rf wayland
6303-
6304-git clone https://gitlab.freedesktop.org/wayland/wayland-protocols
6305-cd wayland-protocols
6306-git checkout "$WAYLAND_PROTOCOLS_VERSION"
6307-meson setup -Dtests=false _build ${EXTRA_MESON_ARGS:-}
6308-meson install -C _build
6309-cd ..
6310-rm -rf wayland-protocols
6311-
6312-section_end wayland
6313diff --git a/.gitlab-ci/container/build-weston.sh b/.gitlab-ci/container/build-weston.sh
6314deleted file mode 100644
6315index 526795b..0000000
6316--- a/.gitlab-ci/container/build-weston.sh
6317+++ /dev/null
6318@@ -1,54 +0,0 @@
6319-#!/usr/bin/env bash
6320-# shellcheck disable=SC2086 # we want word splitting
6321-
6322-set -uex
6323-
6324-section_start weston "Building Weston"
6325-
6326-# When changing this file, you need to bump the following
6327-# .gitlab-ci/image-tags.yml tags:
6328-# DEBIAN_TEST_BASE_TAG
6329-
6330-export WESTON_VERSION="14.0.1"
6331-
6332-git clone https://gitlab.freedesktop.org/wayland/weston
6333-cd weston
6334-git checkout "$WESTON_VERSION"
6335-patch -p1 < "$OLDPWD/.gitlab-ci/container/patches/weston-no-xwm.patch"
6336-meson setup \
6337- -Dbackend-drm=false \
6338- -Dbackend-drm-screencast-vaapi=false \
6339- -Dbackend-headless=true \
6340- -Dbackend-pipewire=false \
6341- -Dbackend-rdp=false \
6342- -Dscreenshare=false \
6343- -Dbackend-vnc=false \
6344- -Dbackend-wayland=false \
6345- -Dbackend-x11=false \
6346- -Dbackend-default=headless \
6347- -Drenderer-gl=true \
6348- -Dxwayland=true \
6349- -Dsystemd=false \
6350- -Dremoting=false \
6351- -Dpipewire=false \
6352- -Dshell-desktop=true \
6353- -Dshell-fullscreen=false \
6354- -Dshell-ivi=false \
6355- -Dshell-kiosk=false \
6356- -Dcolor-management-lcms=false \
6357- -Dimage-jpeg=false \
6358- -Dimage-webp=false \
6359- -Dtools= \
6360- -Ddemo-clients=false \
6361- -Dsimple-clients= \
6362- -Dresize-pool=false \
6363- -Dwcap-decode=false \
6364- -Dtests=false \
6365- -Ddoc=false \
6366- -Dno-xwm-decorations=true \
6367- _build ${EXTRA_MESON_ARGS:-}
6368-meson install -C _build
6369-cd ..
6370-rm -rf weston
6371-
6372-section_end weston
6373diff --git a/.gitlab-ci/container/build-xwayland.sh b/.gitlab-ci/container/build-xwayland.sh
6374deleted file mode 100644
6375index d55f223..0000000
6376--- a/.gitlab-ci/container/build-xwayland.sh
6377+++ /dev/null
6378@@ -1,31 +0,0 @@
6379-#!/usr/bin/env bash
6380-# shellcheck disable=SC2086 # we want word splitting
6381-
6382-set -uex
6383-
6384-section_start xwayland "Building XWayland"
6385-
6386-# When changing this file, you need to bump the following
6387-# .gitlab-ci/image-tags.yml tags:
6388-# DEBIAN_TEST_BASE_TAG
6389-#
6390-export XORGPROTO_VERSION="xorgproto-2024.1"
6391-export XWAYLAND_VERSION="xwayland-24.1.8"
6392-
6393-git clone https://gitlab.freedesktop.org/xorg/proto/xorgproto
6394-cd xorgproto
6395-git checkout "$XORGPROTO_VERSION"
6396-meson setup _build ${EXTRA_MESON_ARGS:-}
6397-meson install -C _build
6398-cd ..
6399-rm -rf xorgproto
6400-
6401-git clone https://gitlab.freedesktop.org/xorg/xserver
6402-cd xserver
6403-git checkout "$XWAYLAND_VERSION"
6404-meson setup _build ${EXTRA_MESON_ARGS:-}
6405-meson install -C _build
6406-cd ..
6407-rm -rf xserver
6408-
6409-section_end xwayland
6410diff --git a/.gitlab-ci/container/container_job_trampoline.sh b/.gitlab-ci/container/container_job_trampoline.sh
6411deleted file mode 100755
6412index becbc06..0000000
6413--- a/.gitlab-ci/container/container_job_trampoline.sh
6414+++ /dev/null
6415@@ -1,24 +0,0 @@
6416-#!/usr/bin/env bash
6417-
6418-# When changing this file, all the linux tags in
6419-# .gitlab-ci/image-tags.yml need updating.
6420-
6421-set -eu
6422-
6423-# Early check for required env variables, relies on `set -u`
6424-: "$S3_JWT_FILE_SCRIPT"
6425-
6426-if [ -z "$1" ]; then
6427- echo "usage: $(basename "$0") <CONTAINER_CI_JOB_NAME>" 1>&2
6428- exit 1
6429-fi
6430-
6431-CONTAINER_CI_JOB_NAME="$1"
6432-
6433-# Tasks to perform before executing the script of a container job
6434-eval "$S3_JWT_FILE_SCRIPT"
6435-unset S3_JWT_FILE_SCRIPT
6436-
6437-trap 'rm -f ${S3_JWT_FILE}' EXIT INT TERM
6438-
6439-bash ".gitlab-ci/container/${CONTAINER_CI_JOB_NAME}.sh"
6440diff --git a/.gitlab-ci/container/container_post_build.sh b/.gitlab-ci/container/container_post_build.sh
6441deleted file mode 100755
6442index 090879b..0000000
6443--- a/.gitlab-ci/container/container_post_build.sh
6444+++ /dev/null
6445@@ -1,12 +0,0 @@
6446-#!/usr/bin/env bash
6447-
6448-if test -f /etc/debian_version; then
6449- apt-get autoremove -y --purge
6450-fi
6451-
6452-# Clean up any build cache
6453-rm -rf /root/.cache
6454-
6455-if test -x /usr/bin/ccache; then
6456- ccache --show-stats
6457-fi
6458diff --git a/.gitlab-ci/container/container_pre_build.sh b/.gitlab-ci/container/container_pre_build.sh
6459deleted file mode 100755
6460index 7c5ac6a..0000000
6461--- a/.gitlab-ci/container/container_pre_build.sh
6462+++ /dev/null
6463@@ -1,66 +0,0 @@
6464-#!/bin/sh
6465-# When changing this file, you need to bump the following
6466-# .gitlab-ci/image-tags.yml tags:
6467-# DEBIAN_BUILD_TAG
6468-
6469-if test -x /usr/bin/ccache; then
6470- if test -f /etc/debian_version; then
6471- CCACHE_PATH=/usr/lib/ccache
6472- elif test -f /etc/alpine-release; then
6473- CCACHE_PATH=/usr/lib/ccache/bin
6474- else
6475- CCACHE_PATH=/usr/lib64/ccache
6476- fi
6477-
6478- # Common setup among container builds before we get to building code.
6479-
6480- export CCACHE_COMPILERCHECK=content
6481- export CCACHE_COMPRESS=true
6482- export CCACHE_DIR="/cache/$CI_PROJECT_NAME/ccache"
6483- export PATH="$CCACHE_PATH:$PATH"
6484-
6485- # CMake ignores $PATH, so we have to force CC/GCC to the ccache versions.
6486- export CC="${CCACHE_PATH}/gcc"
6487- export CXX="${CCACHE_PATH}/g++"
6488-
6489- ccache --show-stats
6490-fi
6491-
6492-# Make a wrapper script for ninja to always include the -j flags
6493-{
6494- echo '#!/bin/sh -x'
6495- # shellcheck disable=SC2016
6496- echo '/usr/bin/ninja -j${FDO_CI_CONCURRENT:-4} "$@"'
6497-} > /usr/local/bin/ninja
6498-chmod +x /usr/local/bin/ninja
6499-
6500-# Set MAKEFLAGS so that all make invocations in container builds include the
6501-# flags (doesn't apply to non-container builds, but we don't run make there)
6502-export MAKEFLAGS="-j${FDO_CI_CONCURRENT:-4}"
6503-
6504-# Ensure that rust tools are in PATH if they exist
6505-CARGO_ENV_FILE="$HOME/.cargo/env"
6506-if [ -f "$CARGO_ENV_FILE" ]; then
6507- # shellcheck disable=SC1090
6508- source "$CARGO_ENV_FILE"
6509-fi
6510-
6511-ci_tag_early_checks() {
6512- # Runs the first part of the build script to perform the tag check only
6513- uncollapsed_section_switch "ci_tag_early_checks" "Ensuring component versions match declared tags in CI builds"
6514- echo "[Structured Tagging] Checking components: ${CI_BUILD_COMPONENTS}"
6515- # shellcheck disable=SC2086
6516- for component in ${CI_BUILD_COMPONENTS}; do
6517- bin/ci/update_tag.py --check ${component} || exit 1
6518- done
6519- echo "[Structured Tagging] Components check done"
6520- section_end "ci_tag_early_checks"
6521-}
6522-
6523-# Check if each declared tag component is up to date before building
6524-if [ -n "${CI_BUILD_COMPONENTS:-}" ]; then
6525- # Remove any duplicates by splitting on whitespace, sorting, then joining back
6526- CI_BUILD_COMPONENTS="$(echo "${CI_BUILD_COMPONENTS}" | xargs -n1 | sort -u | xargs)"
6527-
6528- ci_tag_early_checks
6529-fi
6530diff --git a/.gitlab-ci/container/create-android-cross-file.sh b/.gitlab-ci/container/create-android-cross-file.sh
6531deleted file mode 100755
6532index ab685b9..0000000
6533--- a/.gitlab-ci/container/create-android-cross-file.sh
6534+++ /dev/null
6535@@ -1,43 +0,0 @@
6536-#!/usr/bin/env bash
6537-
6538-# When changing this file, you need to bump the following
6539-# .gitlab-ci/image-tags.yml tags:
6540-# DEBIAN_BUILD_TAG
6541-
6542-ndk=$1
6543-arch=$2
6544-cpu_family=$3
6545-cpu=$4
6546-cross_file="/cross_file-$arch.txt"
6547-sdk_version=$5
6548-
6549-# armv7 has the toolchain split between two names.
6550-arch2=${6:-$2}
6551-
6552-# Note that we disable C++ exceptions, because Mesa doesn't use exceptions,
6553-# and allowing it in code generation means we get unwind symbols that break
6554-# the libEGL and driver symbol tests.
6555-
6556-cat > "$cross_file" <<EOF
6557-[binaries]
6558-ar = '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar'
6559-c = ['ccache', '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/${arch2}${sdk_version}-clang', '-fno-exceptions', '-fno-unwind-tables', '-fno-asynchronous-unwind-tables']
6560-cpp = ['ccache', '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/${arch2}${sdk_version}-clang++', '-fno-exceptions', '-fno-unwind-tables', '-fno-asynchronous-unwind-tables', '--start-no-unused-arguments', '-static-libstdc++', '--end-no-unused-arguments']
6561-c_ld = 'lld'
6562-cpp_ld = 'lld'
6563-strip = '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip'
6564-rust = ['rustc', '--target', '${arch2}']
6565-pkg-config = ['/usr/bin/pkgconf']
6566-
6567-[host_machine]
6568-system = 'android'
6569-cpu_family = '$cpu_family'
6570-cpu = '$cpu'
6571-endian = 'little'
6572-
6573-[properties]
6574-needs_exe_wrapper = true
6575-bindgen_clang_arguments = ['-target', '${arch2}', '--sysroot', '$ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot']
6576-pkg_config_libdir = '/usr/local/lib/${arch2}/pkgconfig/:/${ndk}/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/${arch2}/pkgconfig/'
6577-
6578-EOF
6579diff --git a/.gitlab-ci/container/create-android-ndk-pc.sh b/.gitlab-ci/container/create-android-ndk-pc.sh
6580deleted file mode 100644
6581index 69a9289..0000000
6582--- a/.gitlab-ci/container/create-android-ndk-pc.sh
6583+++ /dev/null
6584@@ -1,40 +0,0 @@
6585-#!/bin/sh
6586-# shellcheck disable=SC2086 # we want word splitting
6587-
6588-# Makes a .pc file in the Android NDK for meson to find its libraries.
6589-
6590-set -ex
6591-
6592-ndk="$1"
6593-pc="$2"
6594-cflags="$3"
6595-libs="$4"
6596-version="$5"
6597-sdk_version="$6"
6598-
6599-sysroot=$ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot
6600-
6601-for arch in \
6602- x86_64-linux-android \
6603- i686-linux-android \
6604- aarch64-linux-android \
6605- arm-linux-androideabi; do
6606- pcdir=$sysroot/usr/lib/$arch/pkgconfig
6607- mkdir -p $pcdir
6608-
6609- cat >$pcdir/$pc <<EOF
6610-prefix=$sysroot
6611-exec_prefix=$sysroot
6612-libdir=$sysroot/usr/lib/$arch/$sdk_version
6613-sharedlibdir=$sysroot/usr/lib/$arch
6614-includedir=$sysroot/usr/include
6615-
6616-Name: zlib
6617-Description: zlib compression library
6618-Version: $version
6619-
6620-Requires:
6621-Libs: -L$sysroot/usr/lib/$arch/$sdk_version $libs
6622-Cflags: -I$sysroot/usr/include $cflags
6623-EOF
6624-done
6625diff --git a/.gitlab-ci/container/create-cross-file.sh b/.gitlab-ci/container/create-cross-file.sh
6626deleted file mode 100755
6627index 3c55920..0000000
6628--- a/.gitlab-ci/container/create-cross-file.sh
6629+++ /dev/null
6630@@ -1,56 +0,0 @@
6631-#!/bin/bash
6632-
6633-arch=$1
6634-cross_file="/cross_file-$arch.txt"
6635-meson env2mfile --cross --debarch "$arch" -o "$cross_file"
6636-
6637-# Explicitly set ccache path for cross compilers
6638-sed -i "s|/usr/bin/\([^-]*\)-linux-gnu\([^-]*\)-g|/usr/lib/ccache/\\1-linux-gnu\\2-g|g" "$cross_file"
6639-
6640-# Rely on qemu-user being configured in binfmt_misc on the host
6641-# shellcheck disable=SC1003 # how this sed doesn't seems to work for me locally
6642-sed -i -e '/\[properties\]/a\' -e "needs_exe_wrapper = False" "$cross_file"
6643-
6644-# Add a line for rustc, which meson env2mfile is missing.
6645-cc=$(sed -n "s|^c\s*=\s*\[?'\(.*\)'\]?|\1|p" < "$cross_file")
6646-
6647-if [[ "$arch" = "arm64" ]]; then
6648- rust_target=aarch64-unknown-linux-gnu
6649-elif [[ "$arch" = "armhf" ]]; then
6650- rust_target=armv7-unknown-linux-gnueabihf
6651-elif [[ "$arch" = "i386" ]]; then
6652- rust_target=i686-unknown-linux-gnu
6653-elif [[ "$arch" = "ppc64el" ]]; then
6654- rust_target=powerpc64le-unknown-linux-gnu
6655-elif [[ "$arch" = "riscv64" ]]; then
6656- rust_target=riscv64gc-unknown-linux-gnu
6657-elif [[ "$arch" = "s390x" ]]; then
6658- rust_target=s390x-unknown-linux-gnu
6659-else
6660- echo "Needs rustc target mapping"
6661-fi
6662-
6663-# shellcheck disable=SC1003 # how this sed doesn't seems to work for me locally
6664-sed -i -e '/\[binaries\]/a\' -e "rust = ['rustc', '--target=$rust_target', '-C', 'linker=$cc']" "$cross_file"
6665-
6666-# Set up cmake cross compile toolchain file for dEQP builds
6667-toolchain_file="/toolchain-$arch.cmake"
6668-if [[ "$arch" = "arm64" ]]; then
6669- GCC_ARCH="aarch64-linux-gnu"
6670- DE_CPU="DE_CPU_ARM_64"
6671-elif [[ "$arch" = "armhf" ]]; then
6672- GCC_ARCH="arm-linux-gnueabihf"
6673- DE_CPU="DE_CPU_ARM"
6674-fi
6675-
6676-if [[ -n "$GCC_ARCH" ]]; then
6677- {
6678- echo "set(CMAKE_SYSTEM_NAME Linux)";
6679- echo "set(CMAKE_SYSTEM_PROCESSOR arm)";
6680- echo "set(CMAKE_C_COMPILER /usr/lib/ccache/$GCC_ARCH-gcc)";
6681- echo "set(CMAKE_CXX_COMPILER /usr/lib/ccache/$GCC_ARCH-g++)";
6682- echo "set(CMAKE_CXX_FLAGS_INIT \"-Wno-psabi\")"; # makes ABI warnings quiet for ARMv7
6683- echo "set(ENV{PKG_CONFIG} \"/usr/bin/$GCC_ARCH-pkgconf\")";
6684- echo "set(DE_CPU $DE_CPU)";
6685- } > "$toolchain_file"
6686-fi
6687diff --git a/.gitlab-ci/container/cross_build.sh b/.gitlab-ci/container/cross_build.sh
6688deleted file mode 100644
6689index 0554574..0000000
6690--- a/.gitlab-ci/container/cross_build.sh
6691+++ /dev/null
6692@@ -1,98 +0,0 @@
6693-#!/usr/bin/env bash
6694-# shellcheck disable=SC2086 # we want word splitting
6695-
6696-set -e
6697-
6698-. .gitlab-ci/setup-test-env.sh
6699-
6700-set -o xtrace
6701-
6702-export DEBIAN_FRONTEND=noninteractive
6703-: "${LLVM_VERSION:?llvm version not set!}"
6704-
6705-# Ephemeral packages (installed for this script and removed again at the end)
6706-EPHEMERAL=(
6707-)
6708-
6709-DEPS=(
6710- "crossbuild-essential-$arch"
6711- "pkgconf:$arch"
6712- "libasan8:$arch"
6713- "libdrm-dev:$arch"
6714- "libelf-dev:$arch"
6715- "libexpat1-dev:$arch"
6716- "libffi-dev:$arch"
6717- "libpciaccess-dev:$arch"
6718- "libstdc++6:$arch"
6719- "libvulkan-dev:$arch"
6720- "libwayland-client0:$arch"
6721- "libwayland-cursor0:$arch"
6722- "libwayland-dev:$arch"
6723- "libwayland-egl1:$arch"
6724- "libwayland-egl-backend-dev:$arch"
6725- "libwayland-server0:$arch"
6726- "libx11-dev:$arch"
6727- "libx11-xcb-dev:$arch"
6728- "libxcb-dri2-0-dev:$arch"
6729- "libxcb-dri3-dev:$arch"
6730- "libxcb-glx0-dev:$arch"
6731- "libxcb-present-dev:$arch"
6732- "libxcb-randr0-dev:$arch"
6733- "libxcb-shm0-dev:$arch"
6734- "libxcb-xfixes0-dev:$arch"
6735- "libxdamage-dev:$arch"
6736- "libxext-dev:$arch"
6737- "libxrandr-dev:$arch"
6738- "libxshmfence-dev:$arch"
6739- "libxxf86vm-dev:$arch"
6740-)
6741-
6742-dpkg --add-architecture $arch
6743-
6744-echo "deb [trusted=yes] https://gitlab.freedesktop.org/gfx-ci/ci-deb-repo/-/raw/${PKG_REPO_REV}/ ${FDO_DISTRIBUTION_VERSION%-*} main" | tee /etc/apt/sources.list.d/gfx-ci_.list
6745-
6746-apt-get update
6747-
6748-apt-get install -y --no-remove "${DEPS[@]}" "${EPHEMERAL[@]}" \
6749- $EXTRA_LOCAL_PACKAGES
6750-
6751-if [[ $arch != "armhf" ]]; then
6752- # We don't need clang-format for the crossbuilds, but the installed amd64
6753- # package will conflict with libclang. Uninstall clang-format (and its
6754- # problematic dependency) to fix.
6755- apt-get remove -y "clang-format-${LLVM_VERSION}" "libclang-cpp${LLVM_VERSION}" \
6756- "llvm-${LLVM_VERSION}-runtime" "llvm-${LLVM_VERSION}-linker-tools"
6757-
6758- # llvm-*-tools:$arch conflicts with python3:amd64. Install dependencies only
6759- # with apt-get, then force-install llvm-*-{dev,tools}:$arch with dpkg to get
6760- # around this.
6761- apt-get install -y --no-remove --no-install-recommends \
6762- "libclang-cpp${LLVM_VERSION}:$arch" \
6763- "libgcc-s1:$arch" \
6764- "libtinfo-dev:$arch" \
6765- "libz3-dev:$arch" \
6766- "llvm-${LLVM_VERSION}:$arch" \
6767- zlib1g
6768-fi
6769-
6770-. .gitlab-ci/container/create-cross-file.sh $arch
6771-
6772-
6773-. .gitlab-ci/container/container_pre_build.sh
6774-
6775-
6776-# dependencies where we want a specific version
6777-MULTIARCH_PATH=$(dpkg-architecture -A $arch -qDEB_TARGET_MULTIARCH)
6778-export EXTRA_MESON_ARGS="--cross-file=/cross_file-${arch}.txt -D libdir=lib/${MULTIARCH_PATH}"
6779-. .gitlab-ci/container/build-directx-headers.sh
6780-
6781-apt-get purge -y "${EPHEMERAL[@]}"
6782-
6783-. .gitlab-ci/container/container_post_build.sh
6784-
6785-# This needs to be done after container_post_build.sh, or apt-get breaks in there
6786-if [[ $arch != "armhf" ]]; then
6787- apt-get download llvm-"${LLVM_VERSION}"-{dev,tools}:"$arch"
6788- dpkg -i --force-depends llvm-"${LLVM_VERSION}"-*_"${arch}".deb
6789- rm llvm-"${LLVM_VERSION}"-*_"${arch}".deb
6790-fi
6791diff --git a/.gitlab-ci/container/debian/android_build.sh b/.gitlab-ci/container/debian/android_build.sh
6792deleted file mode 100755
6793index 5b0bad0..0000000
6794--- a/.gitlab-ci/container/debian/android_build.sh
6795+++ /dev/null
6796@@ -1,127 +0,0 @@
6797-#!/usr/bin/env bash
6798-# shellcheck disable=SC2086 # we want word splitting
6799-
6800-# When changing this file, you need to bump the following
6801-# .gitlab-ci/image-tags.yml tags:
6802-# DEBIAN_BUILD_TAG
6803-
6804-set -e
6805-
6806-. .gitlab-ci/setup-test-env.sh
6807-
6808-set -x
6809-
6810-EPHEMERAL=(
6811- autoconf
6812- rdfind
6813- unzip
6814-)
6815-
6816-apt-get install -y --no-remove "${EPHEMERAL[@]}"
6817-
6818-. .gitlab-ci/container/container_pre_build.sh
6819-
6820-# Fetch the NDK and extract just the toolchain we want.
6821-ndk="android-ndk-${ANDROID_NDK_VERSION}"
6822-curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
6823- -o $ndk.zip https://dl.google.com/android/repository/$ndk-linux.zip
6824-unzip -d / $ndk.zip "$ndk/source.properties" "$ndk/build/cmake/*" "$ndk/toolchains/llvm/*"
6825-rm $ndk.zip
6826-# Since it was packed as a zip file, symlinks/hardlinks got turned into
6827-# duplicate files. Turn them into hardlinks to save on container space.
6828-rdfind -makehardlinks true -makeresultsfile false /${ndk}/
6829-# Drop some large tools we won't use in this build.
6830-find /${ndk}/ -type f \( -iname '*clang-check*' -o -iname '*clang-tidy*' -o -iname '*lldb*' \) -exec rm -f {} \;
6831-
6832-sh .gitlab-ci/container/create-android-ndk-pc.sh /$ndk zlib.pc "" "-lz" "1.2.3" $ANDROID_SDK_VERSION
6833-
6834-# Install android Rust targets
6835-rustup target add \
6836- x86_64-linux-android \
6837- i686-linux-android \
6838- aarch64-linux-android \
6839- armv7-linux-androideabi
6840-
6841-sh .gitlab-ci/container/create-android-cross-file.sh /$ndk x86_64-linux-android x86_64 x86_64 $ANDROID_SDK_VERSION
6842-sh .gitlab-ci/container/create-android-cross-file.sh /$ndk i686-linux-android x86 x86 $ANDROID_SDK_VERSION
6843-sh .gitlab-ci/container/create-android-cross-file.sh /$ndk aarch64-linux-android aarch64 armv8 $ANDROID_SDK_VERSION
6844-sh .gitlab-ci/container/create-android-cross-file.sh /$ndk arm-linux-androideabi arm armv7hl $ANDROID_SDK_VERSION armv7a-linux-androideabi
6845-
6846-# Build libdrm for the host (Debian) environment, so it's available for
6847-# binaries we'll run as part of the build process
6848-. .gitlab-ci/container/build-libdrm.sh
6849-
6850-# Build libdrm for the NDK environment, so it's available when building for
6851-# the Android target
6852-for arch in \
6853- x86_64-linux-android \
6854- i686-linux-android \
6855- aarch64-linux-android \
6856- arm-linux-androideabi ; do
6857- EXTRA_MESON_ARGS="--cross-file=/cross_file-$arch.txt --libdir=lib/$arch -Dnouveau=disabled -Dintel=disabled" \
6858- . .gitlab-ci/container/build-libdrm.sh
6859-done
6860-
6861-rm -rf $LIBDRM_VERSION
6862-
6863-export LIBELF_VERSION=libelf-0.8.13
6864-curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
6865- -O https://fossies.org/linux/misc/old/$LIBELF_VERSION.tar.gz
6866-
6867-# Not 100% sure who runs the mirror above so be extra careful
6868-if ! echo "4136d7b4c04df68b686570afa26988ac ${LIBELF_VERSION}.tar.gz" | md5sum -c -; then
6869- echo "Checksum failed"
6870- exit 1
6871-fi
6872-
6873-tar -xf ${LIBELF_VERSION}.tar.gz
6874-cd $LIBELF_VERSION
6875-
6876-# Work around a bug in the original configure not enabling __LIBELF64.
6877-autoreconf
6878-
6879-for arch in \
6880- x86_64-linux-android \
6881- i686-linux-android \
6882- aarch64-linux-android \
6883- arm-linux-androideabi ; do
6884-
6885- ccarch=${arch}
6886- if [ "${arch}" == 'arm-linux-androideabi' ]
6887- then
6888- ccarch=armv7a-linux-androideabi
6889- fi
6890-
6891- export CC=/${ndk}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar
6892- export CC=/${ndk}/toolchains/llvm/prebuilt/linux-x86_64/bin/${ccarch}${ANDROID_SDK_VERSION}-clang
6893- export CXX=/${ndk}/toolchains/llvm/prebuilt/linux-x86_64/bin/${ccarch}${ANDROID_SDK_VERSION}-clang++
6894- export LD=/${ndk}/toolchains/llvm/prebuilt/linux-x86_64/bin/${arch}-ld
6895- export RANLIB=/${ndk}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib
6896-
6897- # The configure script doesn't know about android, but doesn't really use the host anyway it
6898- # seems
6899- ./configure --host=x86_64-linux-gnu --disable-nls --disable-shared \
6900- --libdir=/usr/local/lib/${arch}
6901- make install
6902- make distclean
6903-
6904- unset CC
6905- unset CC
6906- unset CXX
6907- unset LD
6908- unset RANLIB
6909-done
6910-
6911-cd ..
6912-rm -rf $LIBELF_VERSION
6913-
6914-
6915-# Build LLVM libraries for Android only if necessary, uploading a copy to S3
6916-# to avoid rebuilding it in a future run if the version does not change.
6917-bash .gitlab-ci/container/build-android-x86_64-llvm.sh
6918-
6919-. .gitlab-ci/container/build-bindgen.sh
6920-
6921-apt-get purge -y "${EPHEMERAL[@]}"
6922-
6923-. .gitlab-ci/container/container_post_build.sh
6924diff --git a/.gitlab-ci/container/debian/arm32_test-base.sh b/.gitlab-ci/container/debian/arm32_test-base.sh
6925deleted file mode 100644
6926index 5ddc91c..0000000
6927--- a/.gitlab-ci/container/debian/arm32_test-base.sh
6928+++ /dev/null
6929@@ -1,4 +0,0 @@
6930-#!/usr/bin/env bash
6931-
6932-DEBIAN_ARCH=armhf \
6933-. .gitlab-ci/container/debian/test-base.sh
6934diff --git a/.gitlab-ci/container/debian/arm32_test-gl.sh b/.gitlab-ci/container/debian/arm32_test-gl.sh
6935deleted file mode 100644
6936index a4242fb..0000000
6937--- a/.gitlab-ci/container/debian/arm32_test-gl.sh
6938+++ /dev/null
6939@@ -1,4 +0,0 @@
6940-#!/usr/bin/env bash
6941-
6942-DEBIAN_ARCH="armhf" \
6943-. .gitlab-ci/container/debian/test-gl.sh
6944diff --git a/.gitlab-ci/container/debian/arm32_test-vk.sh b/.gitlab-ci/container/debian/arm32_test-vk.sh
6945deleted file mode 100644
6946index 4360c49..0000000
6947--- a/.gitlab-ci/container/debian/arm32_test-vk.sh
6948+++ /dev/null
6949@@ -1,4 +0,0 @@
6950-#!/usr/bin/env bash
6951-
6952-DEBIAN_ARCH="armhf" \
6953-. .gitlab-ci/container/debian/test-vk.sh
6954diff --git a/.gitlab-ci/container/debian/arm64_build.sh b/.gitlab-ci/container/debian/arm64_build.sh
6955deleted file mode 100644
6956index 4f28284..0000000
6957--- a/.gitlab-ci/container/debian/arm64_build.sh
6958+++ /dev/null
6959@@ -1,124 +0,0 @@
6960-#!/usr/bin/env bash
6961-# shellcheck disable=SC2086 # we want word splitting
6962-
6963-# When changing this file, you need to bump the following
6964-# .gitlab-ci/image-tags.yml tags:
6965-# DEBIAN_BUILD_TAG
6966-
6967-set -e
6968-
6969-. .gitlab-ci/setup-test-env.sh
6970-
6971-set -o xtrace
6972-
6973-: "${LLVM_VERSION:?llvm version not set}"
6974-
6975-apt-get -y install ca-certificates curl gnupg2
6976-sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list.d/*
6977-echo "deb [trusted=yes] https://gitlab.freedesktop.org/gfx-ci/ci-deb-repo/-/raw/${PKG_REPO_REV}/ ${FDO_DISTRIBUTION_VERSION%-*} main" | tee /etc/apt/sources.list.d/gfx-ci_.list
6978-
6979-. .gitlab-ci/container/debian/maybe-add-llvm-repo.sh
6980-
6981-# Ephemeral packages (installed for this script and removed again at the end)
6982-EPHEMERAL=(
6983- libssl-dev
6984-)
6985-
6986-DEPS=(
6987- apt-utils
6988- android-libext4-utils
6989- autoconf
6990- automake
6991- bc
6992- bison
6993- ccache
6994- cmake
6995- curl
6996- "clang-${LLVM_VERSION}"
6997- dpkg-dev
6998- fastboot
6999- file
7000- flatbuffers-compiler
7001- flex
7002- g++
7003- git
7004- glslang-tools
7005- kmod
7006- "libclang-${LLVM_VERSION}-dev"
7007- "libclang-cpp${LLVM_VERSION}-dev"
7008- "libclang-common-${LLVM_VERSION}-dev"
7009- libasan8
7010- libdrm-dev
7011- libelf-dev
7012- libexpat1-dev
7013- libflatbuffers-dev
7014- "libllvm${LLVM_VERSION}"
7015- libvulkan-dev
7016- libx11-dev
7017- libx11-xcb-dev
7018- libxcb-dri2-0-dev
7019- libxcb-dri3-dev
7020- libxcb-glx0-dev
7021- libxcb-present-dev
7022- libxcb-randr0-dev
7023- libxcb-shm0-dev
7024- libxcb-xfixes0-dev
7025- libxdamage-dev
7026- libxext-dev
7027- libxrandr-dev
7028- libxshmfence-dev
7029- libxtensor-dev
7030- libxxf86vm-dev
7031- libwayland-bin
7032- libwayland-dev
7033- libwayland-egl-backend-dev
7034- "llvm-${LLVM_VERSION}-dev"
7035- ninja-build
7036- openssh-server
7037- pkgconf
7038- python3-mako
7039- python3-pil
7040- python3-pip
7041- python3-pycparser
7042- python3-requests
7043- python3-setuptools
7044- python3-venv
7045- shellcheck
7046- u-boot-tools
7047- wayland-protocols
7048- xz-utils
7049- yamllint
7050- zlib1g-dev
7051- zstd
7052-)
7053-
7054-apt-get update
7055-
7056-apt-get -y install "${DEPS[@]}" "${EPHEMERAL[@]}"
7057-
7058-# Needed for ci-fairy s3cp
7059-pip3 install --break-system-packages "ci-fairy[s3] @ git+https://gitlab.freedesktop.org/freedesktop/ci-templates@$MESA_TEMPLATES_COMMIT"
7060-
7061-pip3 install --break-system-packages -r bin/ci/test/requirements.txt
7062-
7063-. .gitlab-ci/container/install-meson.sh
7064-
7065-arch=armhf
7066-
7067-. .gitlab-ci/container/cross_build.sh
7068-
7069-. .gitlab-ci/container/container_pre_build.sh
7070-
7071-. .gitlab-ci/container/build-mold.sh
7072-
7073-. .gitlab-ci/container/build-llvm-spirv.sh
7074-
7075-. .gitlab-ci/container/build-libclc.sh
7076-
7077-. .gitlab-ci/container/build-rust.sh build
7078-
7079-. .gitlab-ci/container/build-bindgen.sh
7080-
7081-apt-get purge -y "${EPHEMERAL[@]}"
7082-
7083-. .gitlab-ci/container/container_post_build.sh
7084diff --git a/.gitlab-ci/container/debian/arm64_test-android-tools.sh b/.gitlab-ci/container/debian/arm64_test-android-tools.sh
7085deleted file mode 100755
7086index 5c7916e..0000000
7087--- a/.gitlab-ci/container/debian/arm64_test-android-tools.sh
7088+++ /dev/null
7089@@ -1,7 +0,0 @@
7090-#!/usr/bin/env bash
7091-
7092-ANDROID_ARCH=arm64 \
7093-BUILD_CONTAINER=true \
7094-TEST_CONTAINER=false \
7095-DEBIAN_ARCH=amd64 \
7096-. .gitlab-ci/container/debian/test-android.sh
7097diff --git a/.gitlab-ci/container/debian/arm64_test-android.sh b/.gitlab-ci/container/debian/arm64_test-android.sh
7098deleted file mode 100755
7099index da18b7c..0000000
7100--- a/.gitlab-ci/container/debian/arm64_test-android.sh
7101+++ /dev/null
7102@@ -1,7 +0,0 @@
7103-#!/usr/bin/env bash
7104-
7105-ANDROID_ARCH=arm64 \
7106-BUILD_CONTAINER=false \
7107-TEST_CONTAINER=true \
7108-DEBIAN_ARCH=arm64 \
7109-. .gitlab-ci/container/debian/test-android.sh
7110diff --git a/.gitlab-ci/container/debian/arm64_test-base.sh b/.gitlab-ci/container/debian/arm64_test-base.sh
7111deleted file mode 100644
7112index 6cdafba..0000000
7113--- a/.gitlab-ci/container/debian/arm64_test-base.sh
7114+++ /dev/null
7115@@ -1,4 +0,0 @@
7116-#!/usr/bin/env bash
7117-
7118-DEBIAN_ARCH=arm64 \
7119-. .gitlab-ci/container/debian/test-base.sh
7120diff --git a/.gitlab-ci/container/debian/arm64_test-gl.sh b/.gitlab-ci/container/debian/arm64_test-gl.sh
7121deleted file mode 100644
7122index e9fa3d3..0000000
7123--- a/.gitlab-ci/container/debian/arm64_test-gl.sh
7124+++ /dev/null
7125@@ -1,4 +0,0 @@
7126-#!/usr/bin/env bash
7127-
7128-DEBIAN_ARCH="arm64" \
7129-. .gitlab-ci/container/debian/test-gl.sh
7130diff --git a/.gitlab-ci/container/debian/arm64_test-vk.sh b/.gitlab-ci/container/debian/arm64_test-vk.sh
7131deleted file mode 100644
7132index a994d85..0000000
7133--- a/.gitlab-ci/container/debian/arm64_test-vk.sh
7134+++ /dev/null
7135@@ -1,4 +0,0 @@
7136-#!/usr/bin/env bash
7137-
7138-DEBIAN_ARCH="arm64" \
7139-. .gitlab-ci/container/debian/test-vk.sh
7140diff --git a/.gitlab-ci/container/debian/baremetal_arm32_test-gl.sh b/.gitlab-ci/container/debian/baremetal_arm32_test-gl.sh
7141deleted file mode 100644
7142index c0c7638..0000000
7143--- a/.gitlab-ci/container/debian/baremetal_arm32_test-gl.sh
7144+++ /dev/null
7145@@ -1,5 +0,0 @@
7146-#!/usr/bin/env bash
7147-
7148-set -e
7149-
7150-arch=armhf . .gitlab-ci/container/debian/baremetal_arm_test.sh
7151diff --git a/.gitlab-ci/container/debian/baremetal_arm64_test-gl.sh b/.gitlab-ci/container/debian/baremetal_arm64_test-gl.sh
7152deleted file mode 100644
7153index 7ae8139..0000000
7154--- a/.gitlab-ci/container/debian/baremetal_arm64_test-gl.sh
7155+++ /dev/null
7156@@ -1,5 +0,0 @@
7157-#!/usr/bin/env bash
7158-
7159-set -e
7160-
7161-arch=arm64 . .gitlab-ci/container/debian/baremetal_arm_test.sh
7162diff --git a/.gitlab-ci/container/debian/baremetal_arm64_test-vk.sh b/.gitlab-ci/container/debian/baremetal_arm64_test-vk.sh
7163deleted file mode 100644
7164index 7ae8139..0000000
7165--- a/.gitlab-ci/container/debian/baremetal_arm64_test-vk.sh
7166+++ /dev/null
7167@@ -1,5 +0,0 @@
7168-#!/usr/bin/env bash
7169-
7170-set -e
7171-
7172-arch=arm64 . .gitlab-ci/container/debian/baremetal_arm_test.sh
7173diff --git a/.gitlab-ci/container/debian/baremetal_arm_test.sh b/.gitlab-ci/container/debian/baremetal_arm_test.sh
7174deleted file mode 100644
7175index df45cfd..0000000
7176--- a/.gitlab-ci/container/debian/baremetal_arm_test.sh
7177+++ /dev/null
7178@@ -1,41 +0,0 @@
7179-#!/usr/bin/env bash
7180-# shellcheck disable=SC2154 # arch is assigned in previous scripts
7181-# When changing this file, you need to bump the following
7182-# .gitlab-ci/image-tags.yml tags:
7183-# DEBIAN_TEST_BASE_TAG
7184-
7185-set -e
7186-
7187-. .gitlab-ci/setup-test-env.sh
7188-
7189-set -o xtrace
7190-
7191-############### Install packages for baremetal testing
7192-DEPS=(
7193- cpio
7194- curl
7195- netcat-openbsd
7196- openssh-server
7197- procps
7198- python3-filelock
7199- python3-fire
7200- python3-minimal
7201- python3-serial
7202- rsync
7203- snmp
7204- zstd
7205-)
7206-
7207-apt-get install -y ca-certificates
7208-sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list.d/*
7209-echo "deb [trusted=yes] https://gitlab.freedesktop.org/gfx-ci/ci-deb-repo/-/raw/${PKG_REPO_REV}/ ${FDO_DISTRIBUTION_VERSION%-*} main" | tee /etc/apt/sources.list.d/gfx-ci_.list
7210-apt-get update
7211-
7212-apt-get install -y --no-remove "${DEPS[@]}"
7213-
7214-# setup SNMPv2 SMI MIB
7215-curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
7216- https://raw.githubusercontent.com/net-snmp/net-snmp/master/mibs/SNMPv2-SMI.txt \
7217- -o /usr/share/snmp/mibs/SNMPv2-SMI.txt
7218-
7219-. .gitlab-ci/container/baremetal_build.sh
7220diff --git a/.gitlab-ci/container/debian/gitlab-ci.yml b/.gitlab-ci/container/debian/gitlab-ci.yml
7221deleted file mode 100644
7222index c31d849..0000000
7223--- a/.gitlab-ci/container/debian/gitlab-ci.yml
7224+++ /dev/null
7225@@ -1,646 +0,0 @@
7226-# Build the CI Debian docker images.
7227-#
7228-# MESA_IMAGE_TAG is the tag of the docker image used by later stage jobs. If the
7229-# image doesn't exist yet, the container stage job generates it.
7230-#
7231-# In order to generate a new image, one should generally change the tag.
7232-# While removing the image from the registry would also work, that's not
7233-# recommended except for ephemeral images during development: Replacing
7234-# an image after a significant amount of time might pull in newer
7235-# versions of gcc/clang or other packages, which might break the build
7236-# with older commits using the same tag.
7237-#
7238-# After merging a change resulting in generating a new image to the
7239-# main repository, it's recommended to remove the image from the source
7240-# repository's container registry, so that the image from the main
7241-# repository's registry will be used there as well.
7242-
7243-.debian-container-version:
7244- variables:
7245- FDO_DISTRIBUTION_VERSION: trixie-slim
7246-
7247-.debian-container:
7248- extends:
7249- - .fdo.container-build@debian
7250- - .container
7251- - .debian-container-version
7252-
7253-# Debian based x86_64 build image base
7254-debian/x86_64_build-base:
7255- extends:
7256- - .debian-container
7257- variables:
7258- MESA_IMAGE_TAG: &debian-x86_64_build-base "${DEBIAN_BUILD_BASE_TAG}--${PKG_REPO_REV}"
7259- LLVM_VERSION: &debian-x86_64-llvm 19
7260-
7261-.use-debian/x86_64_build-base:
7262- tags:
7263- - $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
7264- extends:
7265- - .fdo.container-build@debian
7266- - .debian-container-version
7267- - .use-base-image
7268- variables:
7269- MESA_BASE_IMAGE: "debian/x86_64_build-base"
7270- MESA_BASE_TAG: *debian-x86_64_build-base
7271- LLVM_VERSION: *debian-x86_64-llvm
7272- needs:
7273- - job: sanity
7274- optional: true
7275- - job: debian/x86_64_build-base
7276- optional: true
7277-
7278-# Debian based x86_64 main build image
7279-debian/x86_64_build:
7280- extends:
7281- - .use-debian/x86_64_build-base
7282- variables:
7283- MESA_IMAGE_TAG: &debian-x86_64_build ${DEBIAN_BUILD_TAG}
7284- LLVM_VERSION: *debian-x86_64-llvm
7285-
7286-.use-debian/x86_64_build:
7287- tags:
7288- - $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
7289- extends:
7290- - .set-image-base-tag
7291- variables:
7292- MESA_BASE_TAG: *debian-x86_64_build-base
7293- MESA_IMAGE_PATH: "debian/x86_64_build"
7294- MESA_IMAGE_TAG: *debian-x86_64_build
7295- LLVM_VERSION: *debian-x86_64-llvm
7296- needs:
7297- - job: sanity
7298- optional: true
7299- - job: debian/x86_64_build
7300- optional: true
7301-
7302-# Debian based x86_32 cross-build image
7303-debian/x86_32_build:
7304- extends:
7305- - .use-debian/x86_64_build-base
7306- variables:
7307- MESA_IMAGE_TAG: &debian-x86_32_build ${DEBIAN_BUILD_TAG}
7308-
7309-.use-debian/x86_32_build:
7310- tags:
7311- - $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
7312- extends:
7313- - .set-image-base-tag
7314- variables:
7315- MESA_BASE_TAG: *debian-x86_64_build-base
7316- MESA_IMAGE_PATH: "debian/x86_32_build"
7317- MESA_IMAGE_TAG: *debian-x86_32_build
7318- LLVM_VERSION: *debian-x86_64-llvm
7319- needs:
7320- - job: sanity
7321- optional: true
7322- - job: debian/x86_32_build
7323- optional: true
7324-
7325-# Debian based ppc64el cross-build image
7326-debian/ppc64el_build:
7327- extends:
7328- - .use-debian/x86_64_build-base
7329- variables:
7330- MESA_IMAGE_TAG: &debian-ppc64el_build ${DEBIAN_BUILD_TAG}
7331- LLVM_VERSION: &debian-ppc64el-llvm 19
7332-
7333-.use-debian/ppc64el_build:
7334- tags:
7335- - $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
7336- extends:
7337- - .set-image-base-tag
7338- variables:
7339- MESA_BASE_TAG: *debian-x86_64_build-base
7340- MESA_IMAGE_PATH: "debian/ppc64el_build"
7341- MESA_IMAGE_TAG: *debian-ppc64el_build
7342- LLVM_VERSION: *debian-ppc64el-llvm
7343- needs:
7344- - job: sanity
7345- optional: true
7346- - job: debian/ppc64el_build
7347- optional: true
7348-
7349-# Debian based RISC-V 64 cross-build image
7350-debian/riscv64_build:
7351- extends:
7352- - .use-debian/x86_64_build-base
7353- variables:
7354- MESA_IMAGE_TAG: &debian-riscv64_build ${DEBIAN_BUILD_TAG}
7355- LLVM_VERSION: &debian-riscv64-llvm 19
7356-
7357-.use-debian/riscv64_build:
7358- tags:
7359- - $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
7360- extends:
7361- - .set-image-base-tag
7362- variables:
7363- MESA_BASE_TAG: *debian-x86_64_build-base
7364- MESA_IMAGE_PATH: "debian/riscv64_build"
7365- MESA_IMAGE_TAG: *debian-riscv64_build
7366- LLVM_VERSION: *debian-riscv64-llvm
7367- needs:
7368- - job: sanity
7369- optional: true
7370- - job: debian/riscv64_build
7371- optional: true
7372-
7373-# Debian based s390x cross-build image
7374-debian/s390x_build:
7375- extends:
7376- - .use-debian/x86_64_build-base
7377- variables:
7378- MESA_IMAGE_TAG: &debian-s390x_build ${DEBIAN_BUILD_TAG}
7379- LLVM_VERSION: &debian-s390x-llvm 19
7380-
7381-.use-debian/s390x_build:
7382- tags:
7383- - $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
7384- extends:
7385- - .set-image-base-tag
7386- variables:
7387- MESA_BASE_TAG: *debian-x86_64_build-base
7388- MESA_IMAGE_PATH: "debian/s390x_build"
7389- MESA_IMAGE_TAG: *debian-s390x_build
7390- LLVM_VERSION: *debian-s390x-llvm
7391- needs:
7392- - job: sanity
7393- optional: true
7394- - job: debian/s390x_build
7395- optional: true
7396-
7397-# Common Android variables
7398-.android-variables:
7399- variables:
7400- ANDROID_VERSION: 16
7401- # Bump both DEBIAN_BUILD_TAG and DEBIAN_TEST_ANDROID_TAG when updating
7402- # NDK and SDK versions.
7403- ANDROID_NDK_VERSION: "r29"
7404- ANDROID_SDK_VERSION: 35 # Android 16 would be 36, but NDK only supports up to 35
7405- ANDROID_LLVM_VERSION: llvmorg-19.1.7
7406- ANDROID_LLVM_ARTIFACT_NAME: android-x86_64-llvm-20250822
7407- # This can be confusing: LLVM_VERSION refers to the host LLVM toolchain
7408- # used (LLVM 19 in our Debian system), but ANDROID_LLVM_VERSION refers to
7409- # the cross-compiling LLVM toolchain used to build for the Android system.
7410- LLVM_VERSION: &debian-android-llvm 19
7411- CUTTLEFISH_PROJECT_PATH: gfx-ci/android/aosp-manifest
7412- CUTTLEFISH_BUILD_VERSION_TAGS: mesa-venus
7413- CUTTLEFISH_BUILD_NUMBER: 20260402.001
7414-
7415-# Android NDK cross-build image
7416-debian/android_build:
7417- extends:
7418- - .android-variables
7419- - .use-debian/x86_64_build-base
7420- variables:
7421- MESA_IMAGE_TAG: &debian-android_build ${DEBIAN_BUILD_TAG}
7422-
7423-.use-debian/android_build:
7424- extends:
7425- - .android-variables
7426- - .set-image-base-tag
7427- tags:
7428- - $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
7429- variables:
7430- MESA_BASE_TAG: *debian-x86_64_build-base
7431- MESA_IMAGE_PATH: "debian/android_build"
7432- MESA_IMAGE_TAG: *debian-android_build
7433- needs:
7434- - job: sanity
7435- optional: true
7436- - job: debian/android_build
7437- optional: true
7438-
7439-# Debian based ARM build image
7440-debian/arm64_build:
7441- extends:
7442- - .fdo.container-build@debian
7443- - .container
7444- - .debian-container-version
7445- tags:
7446- - $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
7447- variables:
7448- MESA_IMAGE_TAG: &debian-arm64_build "${DEBIAN_BUILD_TAG}--${DEBIAN_BUILD_BASE_TAG}--${PKG_REPO_REV}"
7449- LLVM_VERSION: &debian-arm64-llvm 19
7450-
7451-.use-debian/arm64_build:
7452- extends:
7453- - .set-image
7454- tags:
7455- - $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
7456- variables:
7457- MESA_IMAGE_PATH: "debian/arm64_build"
7458- MESA_IMAGE_TAG: *debian-arm64_build
7459- MESA_ARTIFACTS_TAG: *debian-arm64_build
7460- LLVM_VERSION: *debian-arm64-llvm
7461- needs:
7462- - job: sanity
7463- optional: true
7464- - job: debian/arm64_build
7465- optional: true
7466-
7467-
7468-# Debian based x86_64 test image base
7469-debian/x86_64_test-base:
7470- extends:
7471- - .debian-container
7472- - .container-builds-base
7473- variables:
7474- MESA_IMAGE_TAG: &debian-x86_64_test-base "${DEBIAN_TEST_BASE_TAG}--${PKG_REPO_REV}"
7475- LLVM_VERSION: *debian-x86_64-llvm
7476-
7477-.use-debian/x86_64_test-base:
7478- tags:
7479- - $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
7480- extends:
7481- - .fdo.container-build@debian
7482- - .debian-container-version
7483- - .use-base-image
7484- variables:
7485- MESA_BASE_IMAGE: "debian/x86_64_test-base"
7486- MESA_BASE_TAG: *debian-x86_64_test-base
7487- LLVM_VERSION: *debian-x86_64-llvm
7488- needs:
7489- - job: sanity
7490- optional: true
7491- - job: debian/x86_64_test-base
7492- optional: true
7493-
7494-# Debian based ARMv7/armhf test image base
7495-debian/arm32_test-base:
7496- tags:
7497- - $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
7498- extends:
7499- - .debian-container
7500- - .container-builds-base
7501- variables:
7502- MESA_IMAGE_TAG: &debian-arm32_test-base "${DEBIAN_TEST_BASE_TAG}--${PKG_REPO_REV}"
7503- LLVM_VERSION: *debian-arm64-llvm
7504- FDO_DISTRIBUTION_PLATFORM: "linux/arm/v7"
7505-
7506-.use-debian/arm32_test-base:
7507- tags:
7508- - $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
7509- extends:
7510- - .fdo.container-build@debian
7511- - .debian-container-version
7512- - .use-base-image
7513- variables:
7514- MESA_BASE_IMAGE: "debian/arm32_test-base"
7515- MESA_BASE_TAG: *debian-arm32_test-base
7516- LLVM_VERSION: *debian-arm64-llvm
7517- FDO_DISTRIBUTION_PLATFORM: "linux/arm/v7"
7518- needs:
7519- - job: sanity
7520- optional: true
7521- - job: debian/arm32_test-base
7522- optional: true
7523-
7524-# Debian based aarch64 test image base
7525-debian/arm64_test-base:
7526- tags:
7527- - $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
7528- extends:
7529- - .debian-container
7530- - .container-builds-base
7531- variables:
7532- MESA_IMAGE_TAG: &debian-arm64_test-base "${DEBIAN_TEST_BASE_TAG}--${PKG_REPO_REV}"
7533- LLVM_VERSION: *debian-arm64-llvm
7534-
7535-.use-debian/arm64_test-base:
7536- tags:
7537- - $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
7538- extends:
7539- - .fdo.container-build@debian
7540- - .debian-container-version
7541- - .use-base-image
7542- variables:
7543- MESA_BASE_IMAGE: "debian/arm64_test-base"
7544- MESA_BASE_TAG: *debian-arm64_test-base
7545- LLVM_VERSION: *debian-arm64-llvm
7546- needs:
7547- - job: sanity
7548- optional: true
7549- - job: debian/arm64_test-base
7550- optional: true
7551-
7552-# Debian based x86_64 test image for GL
7553-debian/x86_64_test-gl:
7554- extends:
7555- - .use-debian/x86_64_test-base
7556- - .container-builds-gl
7557- - .export-container
7558- variables:
7559- MESA_IMAGE_TAG: &debian-x86_64_test-gl ${DEBIAN_TEST_GL_TAG}
7560-
7561-.use-debian/x86_64_test-gl:
7562- tags:
7563- - $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
7564- extends:
7565- - .set-image-base-tag
7566- variables:
7567- MESA_BASE_TAG: *debian-x86_64_test-base
7568- MESA_IMAGE_PATH: "debian/x86_64_test-gl"
7569- MESA_IMAGE_TAG: *debian-x86_64_test-gl
7570- needs:
7571- - job: sanity
7572- optional: true
7573- - job: debian/x86_64_test-gl
7574- optional: true
7575-
7576-# Debian based x86_64 test image for VK
7577-debian/x86_64_test-vk:
7578- extends:
7579- - .use-debian/x86_64_test-base
7580- - .container-builds-vk
7581- - .export-container
7582- variables:
7583- MESA_IMAGE_TAG: &debian-x86_64_test-vk ${DEBIAN_TEST_VK_TAG}
7584-
7585-.use-debian/x86_64_test-vk:
7586- tags:
7587- - $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
7588- extends:
7589- - .set-image-base-tag
7590- variables:
7591- MESA_BASE_TAG: *debian-x86_64_test-base
7592- MESA_IMAGE_PATH: "debian/x86_64_test-vk"
7593- MESA_IMAGE_TAG: *debian-x86_64_test-vk
7594- needs:
7595- - job: sanity
7596- optional: true
7597- - job: debian/x86_64_test-vk
7598- optional: true
7599-
7600-# Debian based x86_64 test image for Android
7601-debian/x86_64_test-android:
7602- extends:
7603- - .android-variables
7604- - .use-debian/x86_64_test-base
7605- - .container-builds-android
7606- - .export-container
7607- variables:
7608- MESA_IMAGE_TAG: &debian-x86_64_test-android ${DEBIAN_TEST_ANDROID_TAG}
7609-
7610-.use-debian/x86_64_test-android:
7611- tags:
7612- - $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64_KVM
7613- extends:
7614- - .android-variables
7615- - .set-image-base-tag
7616- variables:
7617- MESA_BASE_TAG: *debian-x86_64_test-base
7618- MESA_IMAGE_PATH: "debian/x86_64_test-android"
7619- MESA_IMAGE_TAG: *debian-x86_64_test-android
7620- needs:
7621- - job: sanity
7622- optional: true
7623- - job: debian/x86_64_test-android
7624- optional: true
7625-
7626-# Debian based x86_64 test image for video
7627-debian/x86_64_test-video:
7628- extends:
7629- - .use-debian/x86_64_test-base
7630- - .container-builds-video
7631- - .export-container
7632- variables:
7633- MESA_IMAGE_TAG: &debian-x86_64_test-video ${DEBIAN_TEST_VIDEO_TAG}
7634-
7635-.use-debian/x86_64_test-video:
7636- tags:
7637- - $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
7638- extends:
7639- - .set-image-base-tag
7640- variables:
7641- MESA_BASE_TAG: *debian-x86_64_test-base
7642- MESA_IMAGE_PATH: "debian/x86_64_test-video"
7643- MESA_IMAGE_TAG: *debian-x86_64_test-video
7644- needs:
7645- - job: sanity
7646- optional: true
7647- - job: debian/x86_64_test-video
7648- optional: true
7649-
7650-# Debian based ARMv7/armhf test image for GL
7651-debian/arm32_test-gl:
7652- tags:
7653- - $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
7654- extends:
7655- - .use-debian/arm32_test-base
7656- - .container-builds-arm32
7657- - .export-container
7658- variables:
7659- MESA_IMAGE_TAG: &debian-arm32_test-gl ${DEBIAN_TEST_GL_TAG}
7660-
7661-.use-debian/arm32_test-gl:
7662- tags:
7663- - $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
7664- extends:
7665- - .set-image-base-tag
7666- variables:
7667- MESA_BASE_TAG: *debian-arm32_test-base
7668- MESA_IMAGE_PATH: "debian/arm32_test-gl"
7669- MESA_IMAGE_TAG: *debian-arm32_test-gl
7670- needs:
7671- - job: sanity
7672- optional: true
7673- - job: debian/arm32_test-gl
7674- optional: true
7675-
7676-# Debian based ARMv7/armhf test image for VK
7677-debian/arm32_test-vk:
7678- rules:
7679- - when: never # There are currently no arm32 VK jobs
7680- tags:
7681- - $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
7682- extends:
7683- - .use-debian/arm32_test-base
7684- - .container-builds-arm32
7685- variables:
7686- MESA_IMAGE_TAG: &debian-arm32_test-vk ${DEBIAN_TEST_VK_TAG}
7687-
7688-.use-debian/arm32_test-vk:
7689- tags:
7690- - $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
7691- extends:
7692- - .set-image-base-tag
7693- variables:
7694- MESA_BASE_TAG: *debian-arm32_test-base
7695- MESA_IMAGE_PATH: "debian/arm32_test-vk"
7696- MESA_IMAGE_TAG: *debian-arm32_test-vk
7697- needs:
7698- - job: sanity
7699- optional: true
7700- - job: debian/arm32_test-vk
7701- optional: true
7702-
7703-# Debian based aarch64 test image for GL
7704-debian/arm64_test-gl:
7705- tags:
7706- - $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
7707- extends:
7708- - .use-debian/arm64_test-base
7709- - .container-builds-gl
7710- - .export-container
7711- variables:
7712- MESA_IMAGE_TAG: &debian-arm64_test-gl ${DEBIAN_TEST_GL_TAG}
7713-
7714-.use-debian/arm64_test-gl:
7715- tags:
7716- - $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
7717- extends:
7718- - .set-image-base-tag
7719- variables:
7720- MESA_BASE_TAG: *debian-arm64_test-base
7721- MESA_IMAGE_PATH: "debian/arm64_test-gl"
7722- MESA_IMAGE_TAG: *debian-arm64_test-gl
7723- needs:
7724- - job: sanity
7725- optional: true
7726- - job: debian/arm64_test-gl
7727- optional: true
7728-
7729-# Debian based aarch64 test image for VK
7730-debian/arm64_test-vk:
7731- tags:
7732- - $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
7733- extends:
7734- - .use-debian/arm64_test-base
7735- - .container-builds-vk
7736- - .export-container
7737- variables:
7738- MESA_IMAGE_TAG: &debian-arm64_test-vk ${DEBIAN_TEST_VK_TAG}
7739-
7740-.use-debian/arm64_test-vk:
7741- tags:
7742- - $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
7743- extends:
7744- - .set-image-base-tag
7745- variables:
7746- MESA_BASE_TAG: *debian-arm64_test-base
7747- MESA_IMAGE_PATH: "debian/arm64_test-vk"
7748- MESA_IMAGE_TAG: *debian-arm64_test-vk
7749- needs:
7750- - job: sanity
7751- optional: true
7752- - job: debian/arm64_test-vk
7753- optional: true
7754-
7755-# Debian-based x86_64 builder for Android test tools.
7756-# ANGLE, dEQP, and deqp-runner are built here since Google does not provide
7757-# an arm64 NDK. Artifacts are then copied into the arm64 test image.
7758-debian/arm64_test-android-tools:
7759- extends:
7760- - .android-variables
7761- - .use-debian/x86_64_test-base # NOT a mistake!
7762- - .container-builds-android
7763- variables:
7764- MESA_IMAGE_TAG: &debian-arm64_test-android ${DEBIAN_TEST_ANDROID_TAG}
7765-
7766-# Debian based arm64 test image for Android
7767-debian/arm64_test-android:
7768- tags:
7769- - $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
7770- extends:
7771- - .android-variables
7772- - .use-debian/arm64_test-base
7773- - .container-builds-android
7774- - .export-container
7775- variables:
7776- MESA_IMAGE_TAG: *debian-arm64_test-android
7777- needs:
7778- - !reference [.use-debian/arm64_test-base, needs]
7779- - job: debian/arm64_test-android-tools
7780- optional: true
7781-
7782-.use-debian/arm64_test-android:
7783- tags:
7784- - $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
7785- extends:
7786- - .android-variables
7787- - .set-image-base-tag
7788- variables:
7789- MESA_BASE_TAG: *debian-arm64_test-base
7790- MESA_IMAGE_PATH: "debian/arm64_test-android"
7791- MESA_IMAGE_TAG: *debian-arm64_test-android
7792- needs:
7793- - job: sanity
7794- optional: true
7795- - job: debian/arm64_test-android
7796- optional: true
7797- - job: debian/arm64_test-android-tools
7798- optional: true
7799-
7800-# x86_64 image with ARM64 & ARM32 kernel & rootfs for baremetal testing
7801-.debian/baremetal_arm_test:
7802- extends:
7803- - .fdo.container-build@debian
7804- - .container
7805- - .debian-container-version
7806- variables:
7807- FDO_DISTRIBUTION_TAG: "${MESA_IMAGE_TAG}--${KERNEL_TAG}--${MESA_TEMPLATES_COMMIT}"
7808- MESA_ARTIFACTS_TAG: *debian-arm64_build
7809-
7810-debian/baremetal_arm32_test-gl:
7811- extends:
7812- - .debian/baremetal_arm_test
7813- needs:
7814- - job: debian/arm32_test-gl
7815- optional: true
7816- variables:
7817- MESA_IMAGE_TAG: &baremetal-arm32_test-gl "${DEBIAN_TEST_GL_TAG}--${DEBIAN_TEST_BASE_TAG}--${PKG_REPO_REV}"
7818- LAVA_DISTRIBUTION_TAG: "debian/arm32_test-gl:${DEBIAN_TEST_GL_TAG}--${DEBIAN_TEST_BASE_TAG}--${PKG_REPO_REV}--${MESA_TEMPLATES_COMMIT}"
7819-
7820-debian/baremetal_arm64_test-gl:
7821- extends:
7822- - .debian/baremetal_arm_test
7823- needs:
7824- - job: debian/arm64_test-gl
7825- optional: true
7826- variables:
7827- MESA_IMAGE_TAG: &baremetal-arm64_test-gl "${DEBIAN_TEST_GL_TAG}--${DEBIAN_TEST_BASE_TAG}--${PKG_REPO_REV}"
7828- LAVA_DISTRIBUTION_TAG: "debian/arm64_test-gl:${DEBIAN_TEST_GL_TAG}--${DEBIAN_TEST_BASE_TAG}--${PKG_REPO_REV}--${MESA_TEMPLATES_COMMIT}"
7829-
7830-debian/baremetal_arm64_test-vk:
7831- extends:
7832- - .debian/baremetal_arm_test
7833- needs:
7834- - job: debian/arm64_test-vk
7835- optional: true
7836- variables:
7837- MESA_IMAGE_TAG: &baremetal-arm64_test-vk "${DEBIAN_TEST_VK_TAG}--${DEBIAN_TEST_BASE_TAG}--${PKG_REPO_REV}"
7838- LAVA_DISTRIBUTION_TAG: "debian/arm64_test-vk:${DEBIAN_TEST_VK_TAG}--${DEBIAN_TEST_BASE_TAG}--${PKG_REPO_REV}--${MESA_TEMPLATES_COMMIT}"
7839-
7840-.use-debian/baremetal_arm32_test-gl:
7841- image: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${MESA_IMAGE_TAG}--${KERNEL_TAG}--${MESA_TEMPLATES_COMMIT}"
7842- variables:
7843- MESA_IMAGE_PATH: "debian/baremetal_arm32_test-gl"
7844- MESA_IMAGE_TAG: *baremetal-arm32_test-gl
7845- needs:
7846- - job: sanity
7847- optional: true
7848- - job: debian/baremetal_arm32_test-gl
7849- optional: true
7850-
7851-.use-debian/baremetal_arm64_test-gl:
7852- image: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${MESA_IMAGE_TAG}--${KERNEL_TAG}--${MESA_TEMPLATES_COMMIT}"
7853- variables:
7854- MESA_IMAGE_PATH: "debian/baremetal_arm64_test-gl"
7855- MESA_IMAGE_TAG: *baremetal-arm64_test-gl
7856- needs:
7857- - job: sanity
7858- optional: true
7859- - job: debian/baremetal_arm64_test-gl
7860- optional: true
7861-
7862-.use-debian/baremetal_arm64_test-vk:
7863- image: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${MESA_IMAGE_TAG}--${KERNEL_TAG}--${MESA_TEMPLATES_COMMIT}"
7864- variables:
7865- MESA_IMAGE_PATH: "debian/baremetal_arm64_test-vk"
7866- MESA_IMAGE_TAG: *baremetal-arm64_test-vk
7867- needs:
7868- - job: sanity
7869- optional: true
7870- - job: debian/baremetal_arm64_test-vk
7871- optional: true
7872diff --git a/.gitlab-ci/container/debian/llvm-snapshot.gpg.key b/.gitlab-ci/container/debian/llvm-snapshot.gpg.key
7873deleted file mode 100644
7874index aa6b105..0000000
7875--- a/.gitlab-ci/container/debian/llvm-snapshot.gpg.key
7876+++ /dev/null
7877@@ -1,52 +0,0 @@
7878------BEGIN PGP PUBLIC KEY BLOCK-----
7879-Version: GnuPG v1.4.12 (GNU/Linux)
7880-
7881-mQINBFE9lCwBEADi0WUAApM/mgHJRU8lVkkw0CHsZNpqaQDNaHefD6Rw3S4LxNmM
7882-EZaOTkhP200XZM8lVdbfUW9xSjA3oPldc1HG26NjbqqCmWpdo2fb+r7VmU2dq3NM
7883-R18ZlKixiLDE6OUfaXWKamZsXb6ITTYmgTO6orQWYrnW6ckYHSeaAkW0wkDAryl2
7884-B5v8aoFnQ1rFiVEMo4NGzw4UX+MelF7rxaaregmKVTPiqCOSPJ1McC1dHFN533FY
7885-Wh/RVLKWo6npu+owtwYFQW+zyQhKzSIMvNujFRzhIxzxR9Gn87MoLAyfgKEzrbbT
7886-DhqqNXTxS4UMUKCQaO93TzetX/EBrRpJj+vP640yio80h4Dr5pAd7+LnKwgpTDk1
7887-G88bBXJAcPZnTSKu9I2c6KY4iRNbvRz4i+ZdwwZtdW4nSdl2792L7Sl7Nc44uLL/
7888-ZqkKDXEBF6lsX5XpABwyK89S/SbHOytXv9o4puv+65Ac5/UShspQTMSKGZgvDauU
7889-cs8kE1U9dPOqVNCYq9Nfwinkf6RxV1k1+gwtclxQuY7UpKXP0hNAXjAiA5KS5Crq
7890-7aaJg9q2F4bub0mNU6n7UI6vXguF2n4SEtzPRk6RP+4TiT3bZUsmr+1ktogyOJCc
7891-Ha8G5VdL+NBIYQthOcieYCBnTeIH7D3Sp6FYQTYtVbKFzmMK+36ERreL/wARAQAB
7892-tD1TeWx2ZXN0cmUgTGVkcnUgLSBEZWJpYW4gTExWTSBwYWNrYWdlcyA8c3lsdmVz
7893-dHJlQGRlYmlhbi5vcmc+iQI4BBMBAgAiBQJRPZQsAhsDBgsJCAcDAgYVCAIJCgsE
7894-FgIDAQIeAQIXgAAKCRAVz00Yr090Ibx+EADArS/hvkDF8juWMXxh17CgR0WZlHCC
7895-9CTBWkg5a0bNN/3bb97cPQt/vIKWjQtkQpav6/5JTVCSx2riL4FHYhH0iuo4iAPR
7896-udC7Cvg8g7bSPrKO6tenQZNvQm+tUmBHgFiMBJi92AjZ/Qn1Shg7p9ITivFxpLyX
7897-wpmnF1OKyI2Kof2rm4BFwfSWuf8Fvh7kDMRLHv+MlnK/7j/BNpKdozXxLcwoFBmn
7898-l0WjpAH3OFF7Pvm1LJdf1DjWKH0Dc3sc6zxtmBR/KHHg6kK4BGQNnFKujcP7TVdv
7899-gMYv84kun14pnwjZcqOtN3UJtcx22880DOQzinoMs3Q4w4o05oIF+sSgHViFpc3W
7900-R0v+RllnH05vKZo+LDzc83DQVrdwliV12eHxrMQ8UYg88zCbF/cHHnlzZWAJgftg
7901-hB08v1BKPgYRUzwJ6VdVqXYcZWEaUJmQAPuAALyZESw94hSo28FAn0/gzEc5uOYx
7902-K+xG/lFwgAGYNb3uGM5m0P6LVTfdg6vDwwOeTNIExVk3KVFXeSQef2ZMkhwA7wya
7903-KJptkb62wBHFE+o9TUdtMCY6qONxMMdwioRE5BYNwAsS1PnRD2+jtlI0DzvKHt7B
7904-MWd8hnoUKhMeZ9TNmo+8CpsAtXZcBho0zPGz/R8NlJhAWpdAZ1CmcPo83EW86Yq7
7905-BxQUKnNHcwj2ebkCDQRRPZQsARAA4jxYmbTHwmMjqSizlMJYNuGOpIidEdx9zQ5g
7906-zOr431/VfWq4S+VhMDhs15j9lyml0y4ok215VRFwrAREDg6UPMr7ajLmBQGau0Fc
7907-bvZJ90l4NjXp5p0NEE/qOb9UEHT7EGkEhaZ1ekkWFTWCgsy7rRXfZLxB6sk7pzLC
7908-DshyW3zjIakWAnpQ5j5obiDy708pReAuGB94NSyb1HoW/xGsGgvvCw4r0w3xPStw
7909-F1PhmScE6NTBIfLliea3pl8vhKPlCh54Hk7I8QGjo1ETlRP4Qll1ZxHJ8u25f/ta
7910-RES2Aw8Hi7j0EVcZ6MT9JWTI83yUcnUlZPZS2HyeWcUj+8nUC8W4N8An+aNps9l/
7911-21inIl2TbGo3Yn1JQLnA1YCoGwC34g8QZTJhElEQBN0X29ayWW6OdFx8MDvllbBV
7912-ymmKq2lK1U55mQTfDli7S3vfGz9Gp/oQwZ8bQpOeUkc5hbZszYwP4RX+68xDPfn+
7913-M9udl+qW9wu+LyePbW6HX90LmkhNkkY2ZzUPRPDHZANU5btaPXc2H7edX4y4maQa
7914-xenqD0lGh9LGz/mps4HEZtCI5CY8o0uCMF3lT0XfXhuLksr7Pxv57yue8LLTItOJ
7915-d9Hmzp9G97SRYYeqU+8lyNXtU2PdrLLq7QHkzrsloG78lCpQcalHGACJzrlUWVP/
7916-fN3Ht3kAEQEAAYkCHwQYAQIACQUCUT2ULAIbDAAKCRAVz00Yr090IbhWEADbr50X
7917-OEXMIMGRLe+YMjeMX9NG4jxs0jZaWHc/WrGR+CCSUb9r6aPXeLo+45949uEfdSsB
7918-pbaEdNWxF5Vr1CSjuO5siIlgDjmT655voXo67xVpEN4HhMrxugDJfCa6z97P0+ML
7919-PdDxim57uNqkam9XIq9hKQaurxMAECDPmlEXI4QT3eu5qw5/knMzDMZj4Vi6hovL
7920-wvvAeLHO/jsyfIdNmhBGU2RWCEZ9uo/MeerPHtRPfg74g+9PPfP6nyHD2Wes6yGd
7921-oVQwtPNAQD6Cj7EaA2xdZYLJ7/jW6yiPu98FFWP74FN2dlyEA2uVziLsfBrgpS4l
7922-tVOlrO2YzkkqUGrybzbLpj6eeHx+Cd7wcjI8CalsqtL6cG8cUEjtWQUHyTbQWAgG
7923-5VPEgIAVhJ6RTZ26i/G+4J8neKyRs4vz+57UGwY6zI4AB1ZcWGEE3Bf+CDEDgmnP
7924-LSwbnHefK9IljT9XU98PelSryUO/5UPw7leE0akXKB4DtekToO226px1VnGp3Bov
7925-1GBGvpHvL2WizEwdk+nfk8LtrLzej+9FtIcq3uIrYnsac47Pf7p0otcFeTJTjSq3
7926-krCaoG4Hx0zGQG2ZFpHrSrZTVy6lxvIdfi0beMgY6h78p6M9eYZHQHc02DjFkQXN
7927-bXb5c6gCHESH5PXwPU4jQEE7Ib9J6sbk7ZT2Mw==
7928-=j+4q
7929------END PGP PUBLIC KEY BLOCK-----
7930diff --git a/.gitlab-ci/container/debian/maybe-add-llvm-repo.sh b/.gitlab-ci/container/debian/maybe-add-llvm-repo.sh
7931deleted file mode 100644
7932index fb101ec..0000000
7933--- a/.gitlab-ci/container/debian/maybe-add-llvm-repo.sh
7934+++ /dev/null
7935@@ -1,18 +0,0 @@
7936-#!/usr/bin/env bash
7937-
7938-# Check to see if we need a separate repo to install LLVM.
7939-
7940-case "${FDO_DISTRIBUTION_VERSION%-*},${LLVM_VERSION}" in
7941- trixie,19)
7942- NEED_LLVM_REPO="false"
7943- ;;
7944- *)
7945- NEED_LLVM_REPO="true"
7946- ;;
7947-esac
7948-
7949-if [ "$NEED_LLVM_REPO" = "true" ]; then
7950- curl --fail -s https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
7951- export LLVM_APT_REPO="deb [trusted=yes] https://apt.llvm.org/${FDO_DISTRIBUTION_VERSION%-*}/ llvm-toolchain-${FDO_DISTRIBUTION_VERSION%-*}-${LLVM_VERSION} main"
7952- echo "$LLVM_APT_REPO" | tee /etc/apt/sources.list.d/llvm.list
7953-fi
7954diff --git a/.gitlab-ci/container/debian/ppc64el_build.sh b/.gitlab-ci/container/debian/ppc64el_build.sh
7955deleted file mode 100644
7956index 23db25c..0000000
7957--- a/.gitlab-ci/container/debian/ppc64el_build.sh
7958+++ /dev/null
7959@@ -1,5 +0,0 @@
7960-#!/usr/bin/env bash
7961-
7962-arch=ppc64el
7963-
7964-. .gitlab-ci/container/cross_build.sh
7965diff --git a/.gitlab-ci/container/debian/riscv64_build.sh b/.gitlab-ci/container/debian/riscv64_build.sh
7966deleted file mode 100644
7967index fa8d23b..0000000
7968--- a/.gitlab-ci/container/debian/riscv64_build.sh
7969+++ /dev/null
7970@@ -1,20 +0,0 @@
7971-#!/usr/bin/env bash
7972-
7973-set -e
7974-
7975-. .gitlab-ci/setup-test-env.sh
7976-
7977-arch=riscv64
7978-
7979-# Ephemeral packages (installed for this script and removed again at the end)
7980-EPHEMERAL=(
7981- libssl-dev
7982-)
7983-
7984-apt-get -y install "${EPHEMERAL[@]}"
7985-
7986-. .gitlab-ci/container/build-mold.sh
7987-
7988-apt-get purge -y "${EPHEMERAL[@]}"
7989-
7990-. .gitlab-ci/container/cross_build.sh
7991diff --git a/.gitlab-ci/container/debian/s390x_build.sh b/.gitlab-ci/container/debian/s390x_build.sh
7992deleted file mode 100644
7993index 07cc9c7..0000000
7994--- a/.gitlab-ci/container/debian/s390x_build.sh
7995+++ /dev/null
7996@@ -1,20 +0,0 @@
7997-#!/usr/bin/env bash
7998-
7999-set -e
8000-
8001-. .gitlab-ci/setup-test-env.sh
8002-
8003-arch=s390x
8004-
8005-# Ephemeral packages (installed for this script and removed again at the end)
8006-EPHEMERAL=(
8007- libssl-dev
8008-)
8009-
8010-apt-get -y install "${EPHEMERAL[@]}"
8011-
8012-. .gitlab-ci/container/build-mold.sh
8013-
8014-apt-get purge -y "${EPHEMERAL[@]}"
8015-
8016-. .gitlab-ci/container/cross_build.sh
8017diff --git a/.gitlab-ci/container/debian/test-android.sh b/.gitlab-ci/container/debian/test-android.sh
8018deleted file mode 100755
8019index 8ecad16..0000000
8020--- a/.gitlab-ci/container/debian/test-android.sh
8021+++ /dev/null
8022@@ -1,250 +0,0 @@
8023-#!/usr/bin/env bash
8024-# The relative paths in this file only become valid at runtime.
8025-# shellcheck disable=SC1091
8026-#
8027-# When changing this file, you need to bump the following
8028-# .gitlab-ci/image-tags.yml tags:
8029-# DEBIAN_TEST_ANDROID_TAG
8030-
8031-set -e
8032-
8033-. .gitlab-ci/setup-test-env.sh
8034-
8035-set -o xtrace
8036-
8037-section_start debian_setup "Base Debian system setup"
8038-
8039-export DEBIAN_FRONTEND=noninteractive
8040-
8041-# Google provides Android NDK for x86_64 hosts only; there is no arm64-native NDK for Linux.
8042-# Thus, we must cross-compile arm64 test tools on x86_64 runners.
8043-
8044-# Container Variants Overview:
8045-# - x86_64_test-android: Comprehensive environment for x86_64 testing.
8046-# - arm64_test-android-tools: Used to cross-compile arm64 binaries (dEQP, ANGLE, etc)
8047-# on x86_64 runners because the Android NDK only provides x86_64 host binaries.
8048-# - arm64_test-android: Fetches components built by the 'tools' container to run
8049-# tests on arm64 devices where full builds are unsupported.
8050-#
8051-# | Component | x86_64_test-android | arm64_test-android-tools | arm64_test-android |
8052-# | :------------------: | :-----------------: | :----------------------: | :----------------: |
8053-# | Runner arch | x86_64 | x86_64 | arm64 |
8054-# | Android NDK | ✔ | ✔ | |
8055-# | ANGLE / dEQP | ✔ (Built) | ✔ (Built) | ✔ (Downloaded) |
8056-# | eglinfo / vulkaninfo | ✔ | | ✔ |
8057-# | Cuttlefish / CTS | ✔ (Included) | | (LAVA overlay) |
8058-# | Runtime Deps (AAPT) | ✔ | | ✔ |
8059-#
8060-# | Logic Variable | x86_64_test-android | arm64_test-android-tools | arm64_test-android |
8061-# | :------------------: | :-----------------: | :----------------------: | :----------------: |
8062-# | BUILD_CONTAINER | ✔ | ✔ | |
8063-# | TEST_CONTAINER | ✔ | | ✔ |
8064-
8065-if "${BUILD_CONTAINER}"; then
8066- # Ephemeral packages (installed for this script and removed again at the end)
8067- EPHEMERAL=(
8068- binutils-aarch64-linux-gnu
8069- build-essential:native
8070- ccache
8071- cmake
8072- config-package-dev
8073- debhelper-compat
8074- dpkg-dev
8075- ninja-build
8076- unzip
8077- )
8078-else
8079- # We only need the build tools in build containers
8080- EPHEMERAL=()
8081-fi
8082-
8083-if "${TEST_CONTAINER}"; then
8084- # We only need the Cuttlefish runtime dependencies in test containers
8085- DEPS=(
8086- aapt
8087- cuttlefish-base
8088- cuttlefish-user
8089- iproute2
8090- )
8091-else
8092- DEPS=()
8093-fi
8094-
8095-apt-get install -y --no-remove --no-install-recommends \
8096- "${DEPS[@]}" "${EPHEMERAL[@]}"
8097-
8098-############### Building ...
8099-
8100-. .gitlab-ci/container/container_pre_build.sh
8101-
8102-section_end debian_setup
8103-
8104-if [ "${ANDROID_ARCH}" = "x86_64" ]; then
8105- export RUST_TARGET=x86_64-linux-android
8106- export ANDROID_ABI=x86_64
8107- export ANGLE_ARCH=x64
8108-fi
8109-
8110-if [ "${ANDROID_ARCH}" = "arm64" ]; then
8111- export RUST_TARGET=aarch64-linux-android
8112- export ANDROID_ABI=arm64-v8a
8113- export ANGLE_ARCH=arm64
8114- export STRIP_CMD=aarch64-linux-gnu-strip
8115-fi
8116-
8117-############### Downloading Android tools
8118-
8119-section_start android-tools "Downloading Android tools"
8120-
8121-# Download pre-built Android utility binaries (eglinfo, vulkaninfo) for test environments
8122-if "${TEST_CONTAINER}"; then
8123- mkdir /android-tools
8124- pushd /android-tools
8125-
8126- curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
8127- -o eglinfo "https://${S3_HOST}/${S3_ANDROID_BUCKET}/mesa/mesa/${DATA_STORAGE_PATH}/eglinfo-android-${ANDROID_ARCH}"
8128- chmod +x eglinfo
8129-
8130- curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
8131- -o vulkaninfo "https://${S3_HOST}/${S3_ANDROID_BUCKET}/mesa/mesa/${DATA_STORAGE_PATH}/vulkaninfo-android-${ANDROID_ARCH}"
8132- chmod +x vulkaninfo
8133-
8134- popd
8135-fi
8136-
8137-# Fetch cross-compiled test tools (ANGLE, dEQP) for the arm64 runtime.
8138-# These were built in the 'tools' container due to NDK host limitations.
8139-if ! "${BUILD_CONTAINER}"; then
8140- curl-with-retry -O "https://${S3_BASE_PATH}/${CI_PROJECT_PATH}/${DEBIAN_TEST_ANDROID_TAG}/android-tools-arm64.tar.zst"
8141- tar --zstd -xf android-tools-arm64.tar.zst -C /
8142- rm android-tools-arm64.tar.zst
8143-fi
8144-
8145-section_end android-tools
8146-
8147-############### Downloading NDK for native builds for the guest ...
8148-
8149-# Skip NDK setup and builds for test-only runtimes
8150-if "${BUILD_CONTAINER}"; then
8151- section_start android-ndk "Downloading Android NDK"
8152-
8153- # Fetch the NDK and extract just the toolchain we want.
8154- ndk="android-ndk-${ANDROID_NDK_VERSION}"
8155- curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
8156- -o "$ndk.zip" "https://dl.google.com/android/repository/$ndk-linux.zip"
8157- unzip -q -d / "$ndk.zip"
8158- rm "$ndk.zip"
8159-
8160- section_end android-ndk
8161-
8162- ############### Build ANGLE
8163-
8164- ANGLE_TARGET=android \
8165- . .gitlab-ci/container/build-angle.sh
8166-
8167- ############### Build dEQP runner
8168-
8169- export ANDROID_NDK_HOME=/$ndk
8170- . .gitlab-ci/container/build-rust.sh test
8171- . .gitlab-ci/container/build-deqp-runner.sh
8172-
8173- # Properly uninstall rustup including cargo and init scripts on shells
8174- rustup self uninstall -y
8175-
8176- ############### Build dEQP
8177-
8178- DEQP_API=tools \
8179- DEQP_TARGET="android" \
8180- EXTRA_CMAKE_ARGS="-DDEQP_ANDROID_EXE=ON -DDEQP_TARGET_TOOLCHAIN=ndk-modern -DANDROID_NDK_PATH=/$ndk -DANDROID_ABI=${ANDROID_ABI} -DDE_ANDROID_API=$ANDROID_SDK_VERSION" \
8181- . .gitlab-ci/container/build-deqp.sh
8182-
8183- DEQP_API=GLES \
8184- DEQP_TARGET="android" \
8185- EXTRA_CMAKE_ARGS="-DDEQP_ANDROID_EXE=ON -DDEQP_ANDROID_EXE_LOGCAT=ON -DDEQP_TARGET_TOOLCHAIN=ndk-modern -DANDROID_NDK_PATH=/$ndk -DANDROID_ABI=${ANDROID_ABI} -DDE_ANDROID_API=$ANDROID_SDK_VERSION" \
8186- . .gitlab-ci/container/build-deqp.sh
8187-
8188- DEQP_API=VK \
8189- DEQP_TARGET="android" \
8190- EXTRA_CMAKE_ARGS="-DDEQP_ANDROID_EXE=ON -DDEQP_ANDROID_EXE_LOGCAT=ON -DDEQP_TARGET_TOOLCHAIN=ndk-modern -DANDROID_NDK_PATH=/$ndk -DANDROID_ABI=${ANDROID_ABI} -DDE_ANDROID_API=$ANDROID_SDK_VERSION" \
8191- . .gitlab-ci/container/build-deqp.sh
8192-
8193- rm -rf /VK-GL-CTS
8194-fi
8195-
8196-############### Downloading Cuttlefish resources ...
8197-
8198-# We only need to download the Cuttlefish image and host tools for the shared runners on x86_64, otherwise they are deployed as LAVA overlays
8199-if [ "${ANDROID_ARCH}" = "x86_64" ]; then
8200- section_start cuttlefish "Downloading and setting up Cuttlefish"
8201-
8202- mkdir /cuttlefish
8203- pushd /cuttlefish
8204-
8205- curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
8206- -O "https://${S3_HOST}/${S3_ANDROID_BUCKET}/${CUTTLEFISH_PROJECT_PATH}/aosp-${CUTTLEFISH_BUILD_VERSION_TAGS}.${CUTTLEFISH_BUILD_NUMBER}/aosp_cf_${ANDROID_ARCH}_only_phone-img-${CUTTLEFISH_BUILD_NUMBER}.tar.zst"
8207-
8208- tar --zstd -xvf "aosp_cf_${ANDROID_ARCH}_only_phone-img-${CUTTLEFISH_BUILD_NUMBER}.tar.zst"
8209- rm "aosp_cf_${ANDROID_ARCH}_only_phone-img-${CUTTLEFISH_BUILD_NUMBER}.tar.zst"
8210-
8211- curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
8212- -O "https://${S3_HOST}/${S3_ANDROID_BUCKET}/${CUTTLEFISH_PROJECT_PATH}/aosp-${CUTTLEFISH_BUILD_VERSION_TAGS}.${CUTTLEFISH_BUILD_NUMBER}/cvd-host_package-${ANDROID_ARCH}.tar.zst"
8213- tar --zst -xvf "cvd-host_package-${ANDROID_ARCH}.tar.zst"
8214- rm "cvd-host_package-${ANDROID_ARCH}.tar.zst"
8215-
8216- popd
8217-
8218- section_end cuttlefish
8219-fi
8220-
8221-if "${TEST_CONTAINER}"; then
8222- addgroup --system kvm
8223- usermod -a -G kvm,cvdnetwork root
8224-fi
8225-
8226-############### Downloading Android CTS
8227-
8228-# We currently only have x86_64 CTS jobs
8229-if [ "${ANDROID_ARCH}" = "x86_64" ]; then
8230-. .gitlab-ci/container/build-android-cts.sh
8231-fi
8232-
8233-############### Packaging arm64 tools for S3 upload
8234-
8235-# Upload cross-compiled arm64 binaries to S3 for consumption by the test runtime container
8236-if ! "${TEST_CONTAINER}"; then
8237- section_start android-tools-arm64 "Uploading Android tools"
8238-
8239- TOOL_DIRS=(
8240- /angle
8241- /deqp-gles
8242- /deqp-runner
8243- /deqp-tools
8244- /deqp-vk
8245- /mesa-ci-build-tag
8246- )
8247-
8248- tar --zstd -cf android-tools-arm64.tar.zst "${TOOL_DIRS[@]}"
8249-
8250- ci-fairy s3cp --token-file "${S3_JWT_FILE}" "android-tools-arm64.tar.zst" \
8251- "https://${S3_BASE_PATH}/${CI_PROJECT_PATH}/${DEBIAN_TEST_ANDROID_TAG}/android-tools-arm64.tar.zst"
8252-
8253- section_end android-tools-arm64
8254-fi
8255-
8256-############### Uninstall the build software
8257-
8258-section_switch debian_cleanup "Cleaning up base Debian system"
8259-
8260-if "${BUILD_CONTAINER}"; then
8261- rm -rf "/${ndk:?}"
8262-fi
8263-
8264-apt-get purge -y "${EPHEMERAL[@]}"
8265-
8266-. .gitlab-ci/container/container_post_build.sh
8267-
8268-section_end debian_cleanup
8269-
8270-############### Remove unused packages
8271-
8272-. .gitlab-ci/container/strip-rootfs.sh
8273diff --git a/.gitlab-ci/container/debian/test-base.sh b/.gitlab-ci/container/debian/test-base.sh
8274deleted file mode 100644
8275index c885d5b..0000000
8276--- a/.gitlab-ci/container/debian/test-base.sh
8277+++ /dev/null
8278@@ -1,254 +0,0 @@
8279-#!/usr/bin/env bash
8280-# shellcheck disable=SC2086 # we want word splitting
8281-
8282-# When changing this file, you need to bump the following
8283-# .gitlab-ci/image-tags.yml tags:
8284-# DEBIAN_TEST_BASE_TAG
8285-
8286-set -e
8287-
8288-. .gitlab-ci/setup-test-env.sh
8289-
8290-set -o xtrace
8291-
8292-section_start debian_setup "Base Debian system setup"
8293-
8294-export DEBIAN_FRONTEND=noninteractive
8295-
8296-apt-get install -y curl ca-certificates gnupg2
8297-
8298-sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list.d/*
8299-
8300-echo "deb [trusted=yes] https://gitlab.freedesktop.org/gfx-ci/ci-deb-repo/-/raw/${PKG_REPO_REV}/ ${FDO_DISTRIBUTION_VERSION%-*} main" | tee /etc/apt/sources.list.d/gfx-ci_.list
8301-
8302-: "${LLVM_VERSION:?llvm version not set!}"
8303-
8304-. .gitlab-ci/container/debian/maybe-add-llvm-repo.sh
8305-
8306-# Ephemeral packages (installed for this script and removed again at the end)
8307-EPHEMERAL=(
8308- autoconf
8309- automake
8310- bc
8311- bison
8312- bzip2
8313- ccache
8314- cmake
8315- "clang-${LLVM_VERSION}"
8316- dpkg-dev
8317- flex
8318- glslang-tools
8319- g++
8320- libasound2-dev
8321- libcairo2-dev
8322- libcap-dev
8323- "libclang-cpp${LLVM_VERSION}-dev"
8324- "libclang-rt-${LLVM_VERSION}-dev"
8325- libdrm-dev
8326- libegl-dev
8327- libelf-dev
8328- libepoxy-dev
8329- libexpat1-dev
8330- libgbm-dev
8331- libinput-dev
8332- libgles2-mesa-dev
8333- liblz4-dev
8334- libpciaccess-dev
8335- libpixman-1-dev
8336- libssl-dev
8337- libtirpc-dev
8338- libvulkan-dev
8339- libudev-dev
8340- libwaffle-dev
8341- libx11-xcb-dev
8342- libxcb-composite0-dev
8343- libxcb-dri2-0-dev
8344- libxcb-dri3-dev
8345- libxcb-present-dev
8346- libxfixes-dev
8347- libxcb-ewmh-dev
8348- libxcursor-dev
8349- libxcvt-dev
8350- libxext-dev
8351- libxfont-dev
8352- libxkbcommon-dev
8353- libxkbfile-dev
8354- libxrandr-dev
8355- libxrender-dev
8356- libxshmfence-dev
8357- libzstd-dev
8358- "llvm-${LLVM_VERSION}-dev"
8359- make
8360- meson
8361- mesa-common-dev
8362- patch
8363- pkgconf
8364- protobuf-compiler
8365- python3-dev
8366- python3-pip
8367- python3-setuptools
8368- python3-venv
8369- python3-wheel
8370- xz-utils
8371-)
8372-
8373-DEPS=(
8374- apt-utils
8375- clinfo
8376- curl
8377- dropbear
8378- git
8379- git-lfs
8380- inetutils-syslogd
8381- iptables
8382- jq
8383- kmod
8384- libasan8
8385- libcairo2
8386- libcap2
8387- libdrm2
8388- libegl1
8389- libepoxy0
8390- libexpat1
8391- libfdt1
8392- libinput10
8393- "libclang-common-${LLVM_VERSION}-dev"
8394- "libclang-cpp${LLVM_VERSION}"
8395- "libllvm${LLVM_VERSION}"
8396- liblz4-1
8397- libpixman-1-0
8398- libpng16-16t64
8399- libproc2-0
8400- libpython3.13
8401- libtirpc3t64
8402- libubsan1
8403- libvulkan1
8404- libwayland-bin
8405- libwayland-client0
8406- libwayland-cursor0
8407- libwayland-dev
8408- libwayland-egl1
8409- libwayland-server0
8410- libxcb-composite0
8411- libxcb-dri2-0
8412- libxcb-ewmh2
8413- libxcb-randr0
8414- libxcb-shm0
8415- libxcb-xfixes0
8416- libxcursor1
8417- libxcvt0
8418- libxfont2
8419- libxkbcommon0
8420- libxrandr2
8421- libxrender1
8422- ntpsec-ntpdig
8423- libxshmfence1
8424- ocl-icd-libopencl1
8425- pciutils
8426- python3-lxml
8427- python3-mako
8428- python3-numpy
8429- python3-packaging
8430- python3-pil
8431- python3-renderdoc
8432- python3-requests
8433- python3-simplejson
8434- python3-six
8435- python3-yaml
8436- socat
8437- spirv-tools
8438- sysvinit-core
8439- vulkan-tools
8440- waffle-utils
8441- wayland-protocols
8442- xinit
8443- xserver-common
8444- xserver-xorg-video-amdgpu
8445- xserver-xorg-video-ati
8446- xauth
8447- zlib1g
8448-)
8449-
8450-HW_DEPS=(
8451- netcat-openbsd
8452- mount
8453- python3-serial
8454- tzdata
8455- zstd
8456-)
8457-
8458-apt-get update
8459-apt-get dist-upgrade -y
8460-
8461-apt-get install --purge -y \
8462- sysvinit-core libelogind0
8463-
8464-apt-get install -y --no-remove "${DEPS[@]}" "${HW_DEPS[@]}"
8465-
8466-apt-get install -y --no-install-recommends "${EPHEMERAL[@]}"
8467-
8468-. .gitlab-ci/container/container_pre_build.sh
8469-
8470-# Needed for ci-fairy s3cp
8471-pip3 install --break-system-packages "ci-fairy[s3] @ git+https://gitlab.freedesktop.org/freedesktop/ci-templates@$MESA_TEMPLATES_COMMIT"
8472-
8473-# Needed for manipulation with traces yaml files.
8474-pip3 install --break-system-packages yq
8475-
8476-section_end debian_setup
8477-
8478-############### Build ci-kdl
8479-
8480-. .gitlab-ci/container/build-kdl.sh
8481-
8482-############### Build mold
8483-
8484-. .gitlab-ci/container/build-mold.sh
8485-
8486-############### Build LLVM-SPIRV translator
8487-
8488-. .gitlab-ci/container/build-llvm-spirv.sh
8489-
8490-############### Build libclc
8491-
8492-. .gitlab-ci/container/build-libclc.sh
8493-
8494-############### Build Weston
8495-
8496-. .gitlab-ci/container/build-weston.sh
8497-
8498-############### Build XWayland
8499-
8500-. .gitlab-ci/container/build-xwayland.sh
8501-
8502-############### Install Rust toolchain
8503-
8504-. .gitlab-ci/container/build-rust.sh test
8505-
8506-############### Build Crosvm
8507-
8508-# crosvm build fails on ARMv7 due to Xlib type-size issues
8509-if [ "$DEBIAN_ARCH" != "armhf" ]; then
8510- . .gitlab-ci/container/build-crosvm.sh
8511-fi
8512-
8513-############### Build dEQP runner
8514-
8515-. .gitlab-ci/container/build-deqp-runner.sh
8516-
8517-############### Build apitrace
8518-
8519-. .gitlab-ci/container/build-apitrace.sh
8520-
8521-############### Uninstall the build software
8522-
8523-section_switch debian_cleanup "Cleaning up base Debian system"
8524-
8525-apt-get purge -y "${EPHEMERAL[@]}"
8526-
8527-# Properly uninstall rustup including cargo and init scripts on shells
8528-rustup self uninstall -y
8529-
8530-. .gitlab-ci/container/container_post_build.sh
8531-
8532-section_end debian_cleanup
8533diff --git a/.gitlab-ci/container/debian/test-gl.sh b/.gitlab-ci/container/debian/test-gl.sh
8534deleted file mode 100644
8535index 7b4eb1e..0000000
8536--- a/.gitlab-ci/container/debian/test-gl.sh
8537+++ /dev/null
8538@@ -1,136 +0,0 @@
8539-#!/usr/bin/env bash
8540-# shellcheck disable=SC2086 # we want word splitting
8541-
8542-set -e
8543-
8544-. .gitlab-ci/setup-test-env.sh
8545-
8546-set -o xtrace
8547-
8548-section_start debian_setup "Base Debian system setup"
8549-
8550-export DEBIAN_FRONTEND=noninteractive
8551-: "${LLVM_VERSION:?llvm version not set!}"
8552-
8553-apt-get install -y libelogind0 # this interfere with systemd deps, install separately
8554-
8555-# Ephemeral packages (installed for this script and removed again at the end)
8556-EPHEMERAL=(
8557- bzip2
8558- ccache
8559- "clang-${LLVM_VERSION}"
8560- cmake
8561- dpkg-dev
8562- g++
8563- glslang-tools
8564- libasound2-dev
8565- libcap-dev
8566- "libclang-cpp${LLVM_VERSION}-dev"
8567- libdrm-dev
8568- libfontconfig-dev
8569- libgl-dev
8570- libgles2-mesa-dev
8571- libglu1-mesa-dev
8572- libglx-dev
8573- libpciaccess-dev
8574- libpng-dev
8575- libudev-dev
8576- libwaffle-dev
8577- libwayland-dev
8578- libx11-xcb-dev
8579- libxcb-dri2-0-dev
8580- libxkbcommon-dev
8581- libxrandr-dev
8582- libxrender-dev
8583- "llvm-${LLVM_VERSION}-dev"
8584- "lld-${LLVM_VERSION}"
8585- make
8586- meson
8587- ocl-icd-opencl-dev
8588- patch
8589- pkgconf
8590- python-is-python3
8591- xz-utils
8592-)
8593-
8594-DEPS=(
8595- libfontconfig1
8596- libglu1-mesa
8597- libvulkan-dev
8598-)
8599-
8600-apt-get update
8601-
8602-apt-get install -y --no-remove "${DEPS[@]}" "${EPHEMERAL[@]}" \
8603- $EXTRA_LOCAL_PACKAGES
8604-
8605-
8606-. .gitlab-ci/container/container_pre_build.sh
8607-
8608-section_end debian_setup
8609-
8610-############### Build ANGLE
8611-
8612-if [ "$DEBIAN_ARCH" != "armhf" ]; then
8613- ANGLE_TARGET=linux \
8614- . .gitlab-ci/container/build-angle.sh
8615-fi
8616-
8617-############### Build piglit
8618-
8619-PIGLIT_OPTS="-DPIGLIT_USE_WAFFLE=ON
8620- -DPIGLIT_USE_GBM=ON
8621- -DPIGLIT_USE_WAYLAND=ON
8622- -DPIGLIT_USE_X11=ON
8623- -DPIGLIT_BUILD_GLX_TESTS=ON
8624- -DPIGLIT_BUILD_EGL_TESTS=ON
8625- -DPIGLIT_BUILD_WGL_TESTS=OFF
8626- -DPIGLIT_BUILD_GL_TESTS=ON
8627- -DPIGLIT_BUILD_GLES1_TESTS=ON
8628- -DPIGLIT_BUILD_GLES2_TESTS=ON
8629- -DPIGLIT_BUILD_GLES3_TESTS=ON
8630- -DPIGLIT_BUILD_CL_TESTS=ON
8631- -DPIGLIT_BUILD_VK_TESTS=ON
8632- -DPIGLIT_BUILD_DMA_BUF_TESTS=ON" \
8633- . .gitlab-ci/container/build-piglit.sh
8634-
8635-############### Build dEQP GL
8636-
8637-DEQP_API=tools \
8638-DEQP_TARGET=surfaceless \
8639-. .gitlab-ci/container/build-deqp.sh
8640-
8641-DEQP_API=GL \
8642-DEQP_TARGET=surfaceless \
8643-. .gitlab-ci/container/build-deqp.sh
8644-
8645-DEQP_API=GLES \
8646-DEQP_TARGET=surfaceless \
8647-. .gitlab-ci/container/build-deqp.sh
8648-
8649-rm -rf /VK-GL-CTS
8650-
8651-############### Build validation layer for zink
8652-
8653-. .gitlab-ci/container/build-vulkan-validation.sh
8654-
8655-
8656-############### Build SKQP
8657-
8658-if [ "$DEBIAN_ARCH" != "armhf" ]; then
8659- . .gitlab-ci/container/build-skqp.sh
8660-fi
8661-
8662-############### Uninstall the build software
8663-
8664-section_switch debian_cleanup "Cleaning up base Debian system"
8665-
8666-apt-get purge -y "${EPHEMERAL[@]}"
8667-
8668-. .gitlab-ci/container/container_post_build.sh
8669-
8670-section_end debian_cleanup
8671-
8672-############### Remove unused packages
8673-
8674-. .gitlab-ci/container/strip-rootfs.sh
8675diff --git a/.gitlab-ci/container/debian/test-vk.sh b/.gitlab-ci/container/debian/test-vk.sh
8676deleted file mode 100644
8677index 4e3cbd6..0000000
8678--- a/.gitlab-ci/container/debian/test-vk.sh
8679+++ /dev/null
8680@@ -1,132 +0,0 @@
8681-#!/usr/bin/env bash
8682-# The relative paths in this file only become valid at runtime.
8683-# shellcheck disable=SC1091
8684-# shellcheck disable=SC2086 # we want word splitting
8685-
8686-set -e
8687-
8688-. .gitlab-ci/setup-test-env.sh
8689-
8690-set -o xtrace
8691-
8692-section_start debian_setup "Base Debian system setup"
8693-
8694-export DEBIAN_FRONTEND=noninteractive
8695-
8696-# Ephemeral packages (installed for this script and removed again at the end)
8697-EPHEMERAL=(
8698- ccache
8699- cmake
8700- dpkg-dev
8701- g++
8702- glslang-tools
8703- libexpat1-dev
8704- gnupg2
8705- libdrm-dev
8706- libgbm-dev
8707- libgles2-mesa-dev
8708- liblz4-dev
8709- libpciaccess-dev
8710- libudev-dev
8711- libvulkan-dev
8712- libwaffle-dev
8713- libx11-xcb-dev
8714- libxcb-dri2-0-dev
8715- libxcb-ewmh-dev
8716- libxcb-glx0-dev
8717- libxcb-keysyms1-dev
8718- libxkbcommon-dev
8719- libxrandr-dev
8720- libxrender-dev
8721- libzstd-dev
8722- meson
8723- p7zip
8724- patch
8725- pkgconf
8726- python3-dev
8727- python3-pip
8728- python3-setuptools
8729- python3-wheel
8730- xz-utils
8731-)
8732-
8733-DEPS=(
8734- libfontconfig1
8735- libglu1-mesa
8736-)
8737-
8738-if [ "$DEBIAN_ARCH" != "armhf" ]; then
8739- # Wine isn't available on 32-bit ARM
8740- EPHEMERAL+=(
8741- wine64-tools
8742- )
8743- DEPS+=(
8744- wine
8745- wine64
8746- )
8747-fi
8748-
8749-apt-get update
8750-
8751-apt-get install -y --no-remove --no-install-recommends \
8752- "${DEPS[@]}" "${EPHEMERAL[@]}" "${EXTRA_LOCAL_PACKAGES:-}"
8753-
8754-############### Building ...
8755-
8756-. .gitlab-ci/container/container_pre_build.sh
8757-
8758-section_end debian_setup
8759-
8760-############### Build dEQP VK
8761-
8762-DEQP_API=tools \
8763-DEQP_TARGET=default \
8764-. .gitlab-ci/container/build-deqp.sh
8765-
8766-if [ "$DEBIAN_ARCH" == "amd64" ]; then
8767- DEQP_API=VK-main \
8768- DEQP_TARGET=default \
8769- . .gitlab-ci/container/build-deqp.sh
8770-fi
8771-
8772-DEQP_API=VK \
8773-DEQP_TARGET=default \
8774-. .gitlab-ci/container/build-deqp.sh
8775-
8776-rm -rf /VK-GL-CTS
8777-
8778-############### Build Fossilize
8779-
8780-if [ "$DEBIAN_ARCH" != "armhf" ]; then
8781- . .gitlab-ci/container/build-fossilize.sh
8782-fi
8783-
8784-############### Build gfxreconstruct
8785-
8786-# gfxreconstruct thinks that ARMv7-on-AArch64 is cross-compilation
8787-if [ "$DEBIAN_ARCH" != "armhf" ]; then
8788- . .gitlab-ci/container/build-gfxreconstruct.sh
8789-fi
8790-
8791-############### Build VKD3D-Proton
8792-
8793-# Wine isn't available on 32-bit ARM
8794-if [ "$DEBIAN_ARCH" != "armhf" ]; then
8795- uncollapsed_section_switch proton "Installing Proton (Wine/D3DVK emulation)"
8796- . .gitlab-ci/container/setup-wine.sh "/vkd3d-proton-wine64"
8797- . .gitlab-ci/container/build-vkd3d-proton.sh
8798-fi
8799-
8800-############### Uninstall the build software
8801-
8802-section_switch debian_cleanup "Cleaning up base Debian system"
8803-
8804-apt-get purge -y "${EPHEMERAL[@]}"
8805-
8806-. .gitlab-ci/container/container_post_build.sh
8807-
8808-section_end debian_cleanup
8809-
8810-############### Remove unused packages
8811-
8812-. .gitlab-ci/container/strip-rootfs.sh
8813diff --git a/.gitlab-ci/container/debian/winehq.gpg.key b/.gitlab-ci/container/debian/winehq.gpg.key
8814deleted file mode 100644
8815index a8cba23..0000000
8816--- a/.gitlab-ci/container/debian/winehq.gpg.key
8817+++ /dev/null
8818@@ -1,53 +0,0 @@
8819------BEGIN PGP PUBLIC KEY BLOCK-----
8820-
8821-mQGNBFwOmrgBDAC9FZW3dFpew1hwDaqRfdQQ1ABcmOYu1NKZHwYjd+bGvcR2LRGe
8822-R5dfRqG1Uc/5r6CPCMvnWxFprymkqKEADn8eFn+aCnPx03HrhA+lNEbciPfTHylt
8823-NTTuRua7YpJIgEOjhXUbxXxnvF8fhUf5NJpJg6H6fPQARUW+5M//BlVgwn2jhzlW
8824-U+uwgeJthhiuTXkls9Yo3EoJzmkUih+ABZgvaiBpr7GZRw9GO1aucITct0YDNTVX
8825-KA6el78/udi5GZSCKT94yY9ArN4W6NiOFCLV7MU5d6qMjwGFhfg46NBv9nqpGinK
8826-3NDjqCevKouhtKl2J+nr3Ju3Spzuv6Iex7tsOqt+XdZCoY+8+dy3G5zbJwBYsMiS
8827-rTNF55PHtBH1S0QK5OoN2UR1ie/aURAyAFEMhTzvFB2B2v7C0IKIOmYMEG+DPMs9
8828-FQs/vZ1UnAQgWk02ZiPryoHfjFO80+XYMrdWN+RSo5q9ODClloaKXjqI/aWLGirm
8829-KXw2R8tz31go3NMAEQEAAbQnV2luZUhRIHBhY2thZ2VzIDx3aW5lLWRldmVsQHdp
8830-bmVocS5vcmc+iQHOBBMBCgA4AhsDBQsJCAcCBhUKCQgLAgQWAgMBAh4BAheAFiEE
8831-1D9kAUU2nFHXht3qdvGiD/mHZy8FAlwOmyUACgkQdvGiD/mHZy/zkwv7B+nKFlDY
8832-Bzz/7j0gqIODbs5FRZRtuf/IuPP3vZdWlNfAW/VyaLtVLJCM/mmaf/O6/gJ+D+E9
8833-BBoSmHdHzBBOQHIj5IbRedynNcHT5qXsdBeU2ZPR50sdE+jmukvw3Wa5JijoDgUu
8834-LGLGtU48Z3JsBXQ54OlnTZXQ2SMFhRUa10JANXSJQ+QY2Wo2Pi2+MEAHcrd71A2S
8835-0mT2DQSSBQ92c6WPfUpOSBawd8P0ipT7rVFNLJh8HVQGyEWxPl8ecDEHoVfG2rdV
8836-D0ADbNLx9031UUwpUicO6vW/2Ec7c3VNG1cpOtyNTw/lEgvsXOh3GQs/DvFvMy/h
8837-QzaeF3Qq6cAPlKuxieJe4lLYFBTmCAT4iB1J8oeFs4G7ScfZH4+4NBe3VGoeCD/M
8838-Wl+qxntAroblxiFuqtPJg+NKZYWBzkptJNhnrBxcBnRinGZLw2k/GR/qPMgsR2L4
8839-cP+OUuka+R2gp9oDVTZTyMowz+ROIxnEijF50pkj2VBFRB02rfiMp7q6iQIzBBAB
8840-CgAdFiEE2iNXmnTUrZr50/lFzvrI6q8XUZ0FAlwOm3AACgkQzvrI6q8XUZ3KKg/+
8841-MD8CgvLiHEX90fXQ23RZQRm2J21w3gxdIen/N8yJVIbK7NIgYhgWfGWsGQedtM7D
8842-hMwUlDSRb4rWy9vrXBaiZoF3+nK9AcLvPChkZz28U59Jft6/l0gVrykey/ERU7EV
8843-w1Ie1eRu0tRSXsKvMZyQH8897iHZ7uqoJgyk8U8CvSW+V80yqLB2M8Tk8ECZq34f
8844-HqUIGs4Wo0UZh0vV4+dEQHBh1BYpmmWl+UPf7nzNwFWXu/EpjVhkExRqTnkEJ+Ai
8845-OxbtrRn6ETKzpV4DjyifqQF639bMIem7DRRf+mkcrAXetvWkUkE76e3E9KLvETCZ
8846-l4SBfgqSZs2vNngmpX6Qnoh883aFo5ZgVN3v6uTS+LgTwMt/XlnDQ7+Zw+ehCZ2R
8847-CO21Y9Kbw6ZEWls/8srZdCQ2LxnyeyQeIzsLnqT/waGjQj35i4exzYeWpojVDb3r
8848-tvvOALYGVlSYqZXIALTx2/tHXKLHyrn1C0VgHRnl+hwv7U49f7RvfQXpx47YQN/C
8849-PWrpbG69wlKuJptr+olbyoKAWfl+UzoO8vLMo5njWQNAoAwh1H8aFUVNyhtbkRuq
8850-l0kpy1Cmcq8uo6taK9lvYp8jak7eV8lHSSiGUKTAovNTwfZG2JboGV4/qLDUKvpa
8851-lPp2xVpF9MzA8VlXTOzLpSyIVxZnPTpL+xR5P9WQjMS5AY0EXA6auAEMAMReKL89
8852-0z0SL+/i/geB/agfG/k6AXiG2a9kVWeIjAqFwHKl9W/DTNvOqCDgAt51oiHGRRjt
8853-1Xm3XZD4p+GM1uZWn9qIFL49Gt5x94TqdrsKTVCJr0Kazn2mKQc7aja0zac+WtZG
8854-OFn7KbniuAcwtC780cyikfmmExLI1/Vjg+NiMlMtZfpK6FIW+ulPiDQPdzIhVppx
8855-w9/KlR2Fvh4TbzDsUqkFQSSAFdQ65BWgvzLpZHdKO/ILpDkThLbipjtvbBv/pHKM
8856-O/NFTNoYkJ3cNW/kfcynwV+4AcKwdRz2A3Mez+g5TKFYPZROIbayOo01yTMLfz2p
8857-jcqki/t4PACtwFOhkAs+MYPPyZDUkTFcEJQCPDstkAgmJWI3K2qELtDOLQyps3WY
8858-Mfp+mntOdc8bKjFTMcCEk1zcm14K4Oms+w6dw2UnYsX1FAYYhPm8HUYwE4kP8M+D
8859-9HGLMjLqqF/kanlCFZs5Avx3mDSAx6zS8vtNdGh+64oDNk4x4A2j8GTUuQARAQAB
8860-iQG8BBgBCgAmFiEE1D9kAUU2nFHXht3qdvGiD/mHZy8FAlwOmrgCGwwFCQPCZwAA
8861-CgkQdvGiD/mHZy9FnAwAgfUkxsO53Pm2iaHhtF4+BUc8MNJj64Jvm1tghr6PBRtM
8862-hpbvvN8SSOFwYIsS+2BMsJ2ldox4zMYhuvBcgNUlix0G0Z7h1MjftDdsLFi1DNv2
8863-J9dJ9LdpWdiZbyg4Sy7WakIZ/VvH1Znd89Imo7kCScRdXTjIw2yCkotE5lK7A6Ns
8864-NbVuoYEN+dbGioF4csYehnjTdojwF/19mHFxrXkdDZ/V6ZYFIFxEsxL8FEuyI4+o
8865-LC3DFSA4+QAFdkjGFXqFPlaEJxWt5d7wk0y+tt68v+ulkJ900BvR+OOMqQURwrAi
8866-iP3I28aRrMjZYwyqHl8i/qyIv+WRakoDKV+wWteR5DmRAPHmX2vnlPlCmY8ysR6J
8867-2jUAfuDFVu4/qzJe6vw5tmPJMdfvy0W5oogX6sEdin5M5w2b3WrN8nXZcjbWymqP
8868-6jCdl6eoCCkKNOIbr/MMSkd2KqAqDVM5cnnlQ7q+AXzwNpj3RGJVoBxbS0nn9JWY
8869-QNQrWh9rAcMIGT+b1le0
8870-=4lsa
8871------END PGP PUBLIC KEY BLOCK-----
8872diff --git a/.gitlab-ci/container/debian/x86_32_build.sh b/.gitlab-ci/container/debian/x86_32_build.sh
8873deleted file mode 100644
8874index f6030f6..0000000
8875--- a/.gitlab-ci/container/debian/x86_32_build.sh
8876+++ /dev/null
8877@@ -1,5 +0,0 @@
8878-#!/usr/bin/env bash
8879-
8880-arch=i386
8881-
8882-. .gitlab-ci/container/cross_build.sh
8883diff --git a/.gitlab-ci/container/debian/x86_64_build-base.sh b/.gitlab-ci/container/debian/x86_64_build-base.sh
8884deleted file mode 100644
8885index 0780501..0000000
8886--- a/.gitlab-ci/container/debian/x86_64_build-base.sh
8887+++ /dev/null
8888@@ -1,112 +0,0 @@
8889-#!/usr/bin/env bash
8890-# shellcheck disable=SC2086 # we want word splitting
8891-
8892-# When changing this file, you need to bump the following
8893-# .gitlab-ci/image-tags.yml tags:
8894-# DEBIAN_BUILD_BASE_TAG
8895-
8896-set -e
8897-
8898-. .gitlab-ci/setup-test-env.sh
8899-
8900-set -o xtrace
8901-
8902-export DEBIAN_FRONTEND=noninteractive
8903-: "${LLVM_VERSION:?llvm version not set!}"
8904-
8905-apt-get install -y ca-certificates curl gnupg2
8906-sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list.d/*
8907-echo "deb [trusted=yes] https://gitlab.freedesktop.org/gfx-ci/ci-deb-repo/-/raw/${PKG_REPO_REV}/ ${FDO_DISTRIBUTION_VERSION%-*} main" | tee /etc/apt/sources.list.d/gfx-ci_.list
8908-
8909-. .gitlab-ci/container/debian/maybe-add-llvm-repo.sh
8910-
8911-# Ephemeral packages (installed for this script and removed again at
8912-# the end)
8913-EPHEMERAL=(
8914-)
8915-
8916-DEPS=(
8917- apt-utils
8918- bison
8919- ccache
8920- curl
8921- "clang-${LLVM_VERSION}"
8922- "clang-format-${LLVM_VERSION}"
8923- dpkg-cross
8924- dpkg-dev
8925- findutils
8926- flex
8927- flatbuffers-compiler
8928- g++
8929- cmake
8930- gcc
8931- git
8932- glslang-tools
8933- kmod
8934- "libclang-${LLVM_VERSION}-dev"
8935- "libclang-cpp${LLVM_VERSION}-dev"
8936- "libclang-common-${LLVM_VERSION}-dev"
8937- libelf-dev
8938- libepoxy-dev
8939- libexpat1-dev
8940- libflatbuffers-dev
8941- libgtk-3-dev
8942- "libllvm${LLVM_VERSION}"
8943- libpciaccess-dev
8944- libunwind-dev
8945- libva-dev
8946- libvulkan-dev
8947- libx11-dev
8948- libx11-xcb-dev
8949- libxext-dev
8950- libxml2-utils
8951- libxrandr-dev
8952- libxrender-dev
8953- libxshmfence-dev
8954- libxtensor-dev
8955- libxxf86vm-dev
8956- libwayland-egl-backend-dev
8957- "llvm-${LLVM_VERSION}-dev"
8958- make
8959- ninja-build
8960- openssh-server
8961- pkgconf
8962- python3-mako
8963- python3-pil
8964- python3-pip
8965- python3-ply
8966- python3-pycparser
8967- python3-requests
8968- python3-setuptools
8969- python3-yaml
8970- qemu-user
8971- valgrind
8972- x11proto-dri2-dev
8973- x11proto-gl-dev
8974- x11proto-randr-dev
8975- xz-utils
8976- zlib1g-dev
8977- zstd
8978-)
8979-
8980-apt-get update
8981-
8982-apt-get install -y --no-remove "${DEPS[@]}" "${EPHEMERAL[@]}" \
8983- $EXTRA_LOCAL_PACKAGES
8984-
8985-. .gitlab-ci/container/build-llvm-spirv.sh
8986-
8987-. .gitlab-ci/container/build-libclc.sh
8988-
8989-# Needed for ci-fairy s3cp
8990-pip3 install --break-system-packages "ci-fairy[s3] @ git+https://gitlab.freedesktop.org/freedesktop/ci-templates@$MESA_TEMPLATES_COMMIT"
8991-
8992-. .gitlab-ci/container/install-meson.sh
8993-
8994-. .gitlab-ci/container/build-rust.sh build
8995-
8996-############### Uninstall ephemeral packages
8997-
8998-apt-get purge -y "${EPHEMERAL[@]}"
8999-
9000-. .gitlab-ci/container/container_post_build.sh
9001diff --git a/.gitlab-ci/container/debian/x86_64_build.sh b/.gitlab-ci/container/debian/x86_64_build.sh
9002deleted file mode 100644
9003index aa71d4d..0000000
9004--- a/.gitlab-ci/container/debian/x86_64_build.sh
9005+++ /dev/null
9006@@ -1,93 +0,0 @@
9007-#!/usr/bin/env bash
9008-# shellcheck disable=SC2086 # we want word splitting
9009-
9010-# When changing this file, you need to bump the following
9011-# .gitlab-ci/image-tags.yml tags:
9012-# DEBIAN_BUILD_TAG
9013-
9014-set -e
9015-
9016-. .gitlab-ci/setup-test-env.sh
9017-
9018-set -o xtrace
9019-
9020-export DEBIAN_FRONTEND=noninteractive
9021-: "${LLVM_VERSION:?llvm version not set!}"
9022-
9023-# Ephemeral packages (installed for this script and removed again at the end)
9024-EPHEMERAL=(
9025- autoconf
9026- automake
9027- autotools-dev
9028- bzip2
9029- libtool
9030- libssl-dev
9031-)
9032-
9033-DEPS=(
9034- check
9035- "clang-${LLVM_VERSION}"
9036- libasan8
9037- libarchive-dev
9038- libdrm-dev
9039- "libclang-cpp${LLVM_VERSION}-dev"
9040- "libclang-rt-${LLVM_VERSION}-dev"
9041- libgbm-dev
9042- libglvnd-dev
9043- liblua5.3-dev
9044- libxcb-dri2-0-dev
9045- libxcb-dri3-dev
9046- libxcb-glx0-dev
9047- libxcb-present-dev
9048- libxcb-randr0-dev
9049- libxcb-shm0-dev
9050- libxcb-sync-dev
9051- libxcb-xfixes0-dev
9052- libxcb1-dev
9053- libxml2-dev
9054- libwayland-bin
9055- libwayland-dev
9056- libwayland-egl-backend-dev
9057- "llvm-${LLVM_VERSION}-dev"
9058- ocl-icd-opencl-dev
9059- python3-pip
9060- procps
9061- spirv-tools
9062- strace
9063- time
9064- wayland-protocols
9065- zstd
9066-)
9067-
9068-apt-get update
9069-
9070-apt-get install -y --no-remove \
9071- "${DEPS[@]}" "${EPHEMERAL[@]}"
9072-
9073-
9074-. .gitlab-ci/container/container_pre_build.sh
9075-
9076-# dependencies where we want a specific version
9077-export XORG_RELEASES=https://xorg.freedesktop.org/releases/individual
9078-
9079-export XORGMACROS_VERSION=util-macros-1.19.0
9080-
9081-. .gitlab-ci/container/build-mold.sh
9082-
9083-curl -L --retry 4 -f --retry-all-errors --retry-delay 60 -O \
9084- $XORG_RELEASES/util/$XORGMACROS_VERSION.tar.bz2
9085-tar -xvf $XORGMACROS_VERSION.tar.bz2 && rm $XORGMACROS_VERSION.tar.bz2
9086-cd $XORGMACROS_VERSION; ./configure; make install; cd ..
9087-rm -rf $XORGMACROS_VERSION
9088-
9089-. .gitlab-ci/container/build-shader-db.sh
9090-
9091-. .gitlab-ci/container/build-directx-headers.sh
9092-
9093-. .gitlab-ci/container/build-bindgen.sh
9094-
9095-############### Uninstall the build software
9096-
9097-apt-get purge -y "${EPHEMERAL[@]}"
9098-
9099-. .gitlab-ci/container/container_post_build.sh
9100diff --git a/.gitlab-ci/container/debian/x86_64_test-android.sh b/.gitlab-ci/container/debian/x86_64_test-android.sh
9101deleted file mode 100755
9102index 188b901..0000000
9103--- a/.gitlab-ci/container/debian/x86_64_test-android.sh
9104+++ /dev/null
9105@@ -1,7 +0,0 @@
9106-#!/usr/bin/env bash
9107-
9108-ANDROID_ARCH=x86_64 \
9109-BUILD_CONTAINER=true \
9110-TEST_CONTAINER=true \
9111-DEBIAN_ARCH=amd64 \
9112-. .gitlab-ci/container/debian/test-android.sh
9113diff --git a/.gitlab-ci/container/debian/x86_64_test-base.sh b/.gitlab-ci/container/debian/x86_64_test-base.sh
9114deleted file mode 100644
9115index 0fe7028..0000000
9116--- a/.gitlab-ci/container/debian/x86_64_test-base.sh
9117+++ /dev/null
9118@@ -1,4 +0,0 @@
9119-#!/usr/bin/env bash
9120-
9121-DEBIAN_ARCH=amd64 \
9122-. .gitlab-ci/container/debian/test-base.sh
9123diff --git a/.gitlab-ci/container/debian/x86_64_test-gl.sh b/.gitlab-ci/container/debian/x86_64_test-gl.sh
9124deleted file mode 100644
9125index 1a75b96..0000000
9126--- a/.gitlab-ci/container/debian/x86_64_test-gl.sh
9127+++ /dev/null
9128@@ -1,4 +0,0 @@
9129-#!/usr/bin/env bash
9130-
9131-DEBIAN_ARCH="amd64" \
9132-. .gitlab-ci/container/debian/test-gl.sh
9133diff --git a/.gitlab-ci/container/debian/x86_64_test-video.sh b/.gitlab-ci/container/debian/x86_64_test-video.sh
9134deleted file mode 100755
9135index 5877ec1..0000000
9136--- a/.gitlab-ci/container/debian/x86_64_test-video.sh
9137+++ /dev/null
9138@@ -1,71 +0,0 @@
9139-#!/usr/bin/env bash
9140-# The relative paths in this file only become valid at runtime.
9141-# shellcheck disable=SC1091
9142-#
9143-# When changing this file, you need to bump the following
9144-# .gitlab-ci/image-tags.yml tags:
9145-# DEBIAN_TEST_VIDEO_TAG
9146-
9147-set -e
9148-
9149-. .gitlab-ci/setup-test-env.sh
9150-
9151-set -o xtrace
9152-
9153-section_start debian_setup "Base Debian system setup"
9154-
9155-export DEBIAN_FRONTEND=noninteractive
9156-
9157-apt-get install -y gstreamer1.0-vaapi # This interferes with systemd deps, install separately
9158-
9159-# Ephemeral packages (installed for this script and removed again at the end)
9160-EPHEMERAL=(
9161- g++
9162- libdrm-dev
9163- libva-dev
9164- meson
9165- pkgconf
9166-)
9167-
9168-DEPS=(
9169- gstreamer1.0-plugins-bad
9170- gstreamer1.0-plugins-base
9171- gstreamer1.0-plugins-good
9172- gstreamer1.0-plugins-ugly
9173- gstreamer1.0-tools
9174- libgstreamer1.0-0
9175- libva-drm2
9176- libva-wayland2
9177- libva2
9178-)
9179-
9180-apt-get update
9181-
9182-apt-get install -y --no-remove --no-install-recommends \
9183- "${DEPS[@]}" "${EPHEMERAL[@]}" "${EXTRA_LOCAL_PACKAGES:-}"
9184-
9185-. .gitlab-ci/container/container_pre_build.sh
9186-
9187-section_end debian_setup
9188-
9189-############### Build libva tests
9190-
9191-. .gitlab-ci/container/build-va-tools.sh
9192-
9193-############### Install Fluster
9194-
9195-. .gitlab-ci/container/build-fluster.sh
9196-
9197-############### Uninstall the build software
9198-
9199-section_switch debian_cleanup "Cleaning up base Debian system"
9200-
9201-apt-get purge -y "${EPHEMERAL[@]}"
9202-
9203-. .gitlab-ci/container/container_post_build.sh
9204-
9205-section_end debian_cleanup
9206-
9207-############### Remove unused packages
9208-
9209-. .gitlab-ci/container/strip-rootfs.sh
9210diff --git a/.gitlab-ci/container/debian/x86_64_test-vk.sh b/.gitlab-ci/container/debian/x86_64_test-vk.sh
9211deleted file mode 100644
9212index 3ed166e..0000000
9213--- a/.gitlab-ci/container/debian/x86_64_test-vk.sh
9214+++ /dev/null
9215@@ -1,4 +0,0 @@
9216-#!/usr/bin/env bash
9217-
9218-DEBIAN_ARCH="amd64" \
9219-. .gitlab-ci/container/debian/test-vk.sh
9220diff --git a/.gitlab-ci/container/fdo_cntr_export.sh b/.gitlab-ci/container/fdo_cntr_export.sh
9221deleted file mode 100644
9222index b0b04ad..0000000
9223--- a/.gitlab-ci/container/fdo_cntr_export.sh
9224+++ /dev/null
9225@@ -1,81 +0,0 @@
9226-#!/usr/bin/env bash
9227-
9228-# This script exports the container image to a rootfs tarball and uploads it to
9229-# S3.
9230-#
9231-# Usage:
9232-#
9233-# ./fdo_cntr_export.sh <container-image-url>
9234-#
9235-# The container image URL is the URL of the container image to export. It can be
9236-# a local path or a remote URL.
9237-
9238-# Example:
9239-# ./fdo_cntr_export.sh registry.freedesktop.org/mesa/mesa/debian/x86_64_test-android:tag
9240-
9241-# When changing this file, you need to bump the following
9242-# .gitlab-ci/image-tags.yml tags:
9243-# DEBIAN_TEST_ANDROID_TAG
9244-# DEBIAN_TEST_GL_TAG
9245-# DEBIAN_TEST_VIDEO_TAG
9246-# DEBIAN_TEST_VK_TAG
9247-
9248-set -eux -o pipefail
9249-
9250-: "${CONTAINER:=$1}"
9251-IMAGE_URL="${CONTAINER}"
9252-readonly IMAGE_URL
9253-
9254-container=$(buildah from "$IMAGE_URL")
9255-readonly container
9256-readonly ROOTFSTAR=lava-rootfs.tar.zst
9257-touch "$ROOTFSTAR"
9258-
9259-buildah copy "$container" ".gitlab-ci/container/setup-rootfs.sh" /root/setup-rootfs.sh
9260-
9261-# Using --isolation chroot to ensure proper execution in CI/CD environments
9262-buildah run --isolation chroot "$container" -- /root/setup-rootfs.sh
9263-
9264-buildah_export() {
9265- # Mount the volume
9266- mountpoint=$(buildah mount "$1")
9267-
9268- if [ ! -d "$mountpoint" ]; then
9269- echo "Mount point not found: $mountpoint" >/dev/stderr
9270- exit 1
9271- fi
9272-
9273- # These components will be provided via LAVA overlays,
9274- # so remove them from the core rootfs
9275- rm -rf "${mountpoint}/android-cts"
9276- rm -rf "${mountpoint}/cuttlefish"
9277- rm -rf "${mountpoint}/fluster/resources"
9278- rm -rf "${mountpoint}/vkd3d-proton-tests"
9279- rm -rf "${mountpoint}/vkd3d-proton-wine64"
9280-
9281- # Compress to zstd
9282- ZSTD_CLEVEL=10 tar -C "$mountpoint" -I zstd -cf "$2" .
9283-}
9284-
9285-# When hacking on it locally, the script might not be executed as root.
9286-# In CI it's always root.
9287-if (($(id -u) != 0)); then
9288- # Run unshare for rootless envs
9289- buildah unshare -- bash -c "$(declare -f buildah_export); buildah_export '$container' '$ROOTFSTAR'"
9290-else
9291- # Run directly
9292- buildah_export "$container" "$ROOTFSTAR"
9293-fi
9294-
9295-# Unmount the container
9296-buildah umount "$container"
9297-
9298-# Remove the container
9299-buildah rm "$container"
9300-
9301-# Upload the rootfs tarball to S3.
9302-# The URL format matches the registry format, making it easier to match this URL later.
9303-curl --fail --retry-connrefused --retry 4 --retry-delay 30 \
9304- --header "Authorization: Bearer $(cat "${S3_JWT_FILE}")" \
9305- -X PUT --form file=@"$ROOTFSTAR" \
9306- "https://${S3_HOST}/${S3_KERNEL_BUCKET}/${CI_PROJECT_PATH}/${CI_JOB_NAME}:${FDO_DISTRIBUTION_TAG}"
9307diff --git a/.gitlab-ci/container/fedora/gitlab-ci.yml b/.gitlab-ci/container/fedora/gitlab-ci.yml
9308deleted file mode 100644
9309index f391139..0000000
9310--- a/.gitlab-ci/container/fedora/gitlab-ci.yml
9311+++ /dev/null
9312@@ -1,41 +0,0 @@
9313-# Build the CI Fedora docker images.
9314-#
9315-# MESA_IMAGE_TAG is the tag of the docker image used by later stage jobs. If the
9316-# image doesn't exist yet, the container stage job generates it.
9317-#
9318-# In order to generate a new image, one should generally change the tag.
9319-# While removing the image from the registry would also work, that's not
9320-# recommended except for ephemeral images during development: Replacing
9321-# an image after a significant amount of time might pull in newer
9322-# versions of gcc/clang or other packages, which might break the build
9323-# with older commits using the same tag.
9324-#
9325-# After merging a change resulting in generating a new image to the
9326-# main repository, it's recommended to remove the image from the source
9327-# repository's container registry, so that the image from the main
9328-# repository's registry will be used there as well.
9329-
9330-# Fedora based x86_64 build image
9331-fedora/x86_64_build:
9332- extends:
9333- - .fdo.container-build@fedora
9334- - .container
9335- variables:
9336- FDO_DISTRIBUTION_VERSION: 42
9337- MESA_IMAGE_TAG: &fedora-x86_64_build ${FEDORA_X86_64_BUILD_TAG}
9338- LLVM_VERSION: &fedora-x86_64-llvm 20
9339-
9340-.use-fedora/x86_64_build:
9341- tags:
9342- - $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
9343- extends:
9344- - .set-image
9345- variables:
9346- MESA_IMAGE_PATH: "fedora/x86_64_build"
9347- MESA_IMAGE_TAG: *fedora-x86_64_build
9348- LLVM_VERSION: *fedora-x86_64-llvm
9349- needs:
9350- - job: sanity
9351- optional: true
9352- - job: fedora/x86_64_build
9353- optional: true
9354diff --git a/.gitlab-ci/container/fedora/x86_64_build.sh b/.gitlab-ci/container/fedora/x86_64_build.sh
9355deleted file mode 100644
9356index 83c1d29..0000000
9357--- a/.gitlab-ci/container/fedora/x86_64_build.sh
9358+++ /dev/null
9359@@ -1,122 +0,0 @@
9360-#!/usr/bin/env bash
9361-# shellcheck disable=SC1091
9362-
9363-# When changing this file, you need to bump the following
9364-# .gitlab-ci/image-tags.yml tags:
9365-# FEDORA_X86_64_BUILD_TAG
9366-
9367-set -e
9368-
9369-. .gitlab-ci/setup-test-env.sh
9370-
9371-set -o xtrace
9372-
9373-
9374-EPHEMERAL=(
9375- autoconf
9376- automake
9377- bzip2
9378- cmake
9379- git
9380- libtool
9381- "pkgconfig(epoxy)"
9382- "pkgconfig(gbm)"
9383- "pkgconfig(openssl)"
9384- python3-pip
9385- unzip
9386- xz
9387-)
9388-
9389-DEPS=(
9390- bison
9391- ccache
9392- clang-devel
9393- flex
9394- flatbuffers-compiler
9395- gcc
9396- gcc-c++
9397- gettext
9398- glslang
9399- kernel-headers
9400- libstdc++-static
9401- llvm-devel
9402- ninja-build
9403- "pkgconfig(LLVMSPIRVLib)"
9404- "pkgconfig(SPIRV-Tools)"
9405- "pkgconfig(dri2proto)"
9406- "pkgconfig(expat)"
9407- "pkgconfig(flatbuffers)"
9408- "pkgconfig(glproto)"
9409- "pkgconfig(libclc)"
9410- "pkgconfig(libelf)"
9411- "pkgconfig(libglvnd)"
9412- "pkgconfig(libva)"
9413- "pkgconfig(pciaccess)"
9414- "pkgconfig(vulkan)"
9415- "pkgconfig(x11)"
9416- "pkgconfig(x11-xcb)"
9417- "pkgconfig(xcb)"
9418- "pkgconfig(xcb-dri2)"
9419- "pkgconfig(xcb-dri3)"
9420- "pkgconfig(xcb-glx)"
9421- "pkgconfig(xcb-present)"
9422- "pkgconfig(xcb-randr)"
9423- "pkgconfig(xcb-sync)"
9424- "pkgconfig(xcb-xfixes)"
9425- "pkgconfig(xdamage)"
9426- "pkgconfig(xext)"
9427- "pkgconfig(xfixes)"
9428- "pkgconfig(xrandr)"
9429- "pkgconfig(xshmfence)"
9430- "pkgconfig(xtensor)"
9431- "pkgconfig(xxf86vm)"
9432- "pkgconfig(zlib)"
9433- procps-ng
9434- python-unversioned-command
9435- python3-devel
9436- python3-mako
9437- python3-packaging
9438- python3-ply
9439- python3-pycparser
9440- python3-yaml
9441- spirv-tools-devel
9442- spirv-llvm-translator-devel
9443- vulkan-headers
9444- which
9445-)
9446-
9447-dnf install -y --setopt=install_weak_deps=False "${DEPS[@]}" "${EPHEMERAL[@]}"
9448-
9449-
9450-. .gitlab-ci/container/container_pre_build.sh
9451-
9452-
9453-# dependencies where we want a specific version
9454-export XORG_RELEASES=https://xorg.freedesktop.org/releases/individual
9455-
9456-export XORGMACROS_VERSION=util-macros-1.19.0
9457-
9458-curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
9459- -O $XORG_RELEASES/util/$XORGMACROS_VERSION.tar.bz2
9460-tar -xvf $XORGMACROS_VERSION.tar.bz2 && rm $XORGMACROS_VERSION.tar.bz2
9461-cd $XORGMACROS_VERSION; ./configure; make install; cd ..
9462-rm -rf $XORGMACROS_VERSION
9463-
9464-. .gitlab-ci/container/install-meson.sh
9465-
9466-. .gitlab-ci/container/build-rust.sh build
9467-
9468-. .gitlab-ci/container/build-bindgen.sh
9469-
9470-. .gitlab-ci/container/build-mold.sh
9471-
9472-. .gitlab-ci/container/build-libdrm.sh
9473-
9474-. .gitlab-ci/container/build-wayland.sh
9475-
9476-
9477-############### Uninstall the build software
9478-
9479-dnf remove -y "${EPHEMERAL[@]}"
9480-
9481-. .gitlab-ci/container/container_post_build.sh
9482diff --git a/.gitlab-ci/container/gitlab-ci-inc.yml b/.gitlab-ci/container/gitlab-ci-inc.yml
9483deleted file mode 100644
9484index b11b058..0000000
9485--- a/.gitlab-ci/container/gitlab-ci-inc.yml
9486+++ /dev/null
9487@@ -1,111 +0,0 @@
9488-# Docker image tag helper templates
9489-
9490-.incorporate-templates-commit:
9491- variables:
9492- FDO_DISTRIBUTION_TAG: "${MESA_IMAGE_TAG}--${MESA_TEMPLATES_COMMIT}"
9493-
9494-.incorporate-base-tag+templates-commit:
9495- variables:
9496- FDO_BASE_IMAGE: "${CI_REGISTRY_IMAGE}/${MESA_BASE_IMAGE}:${MESA_BASE_TAG}--${MESA_TEMPLATES_COMMIT}"
9497- FDO_DISTRIBUTION_TAG: "${MESA_IMAGE_TAG}--${MESA_BASE_TAG}--${MESA_TEMPLATES_COMMIT}"
9498-
9499-.set-image:
9500- extends:
9501- - .incorporate-templates-commit
9502- variables:
9503- MESA_IMAGE: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${FDO_DISTRIBUTION_TAG}"
9504- image: "$MESA_IMAGE"
9505-
9506-.set-image-base-tag:
9507- extends:
9508- - .set-image
9509- - .incorporate-base-tag+templates-commit
9510-
9511-.container:
9512- stage: container
9513- timeout: 1h
9514- extends:
9515- - .container-rules
9516- - .incorporate-templates-commit
9517- tags:
9518- - $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
9519- before_script:
9520- - !reference [default, before_script]
9521- # Undoing the `eval "$S3_JWT_FILE_SCRIPT"` from the default before_script,
9522- # because container_job_trampoline.sh and fdo_cntr_export.sh both need it.
9523- - S3_JWT=$(cat "${S3_JWT_FILE}")
9524- - export S3_JWT_FILE_SCRIPT="echo -n '${S3_JWT}' > '${S3_JWT_FILE}' && S3_JWT_FILE_SCRIPT= && unset CI_JOB_JWT S3_JWT"
9525- variables:
9526- FDO_REPO_SUFFIX: $CI_JOB_NAME
9527- FDO_DISTRIBUTION_EXEC: 'bash .gitlab-ci/container/container_job_trampoline.sh "${CI_JOB_NAME}"'
9528- # no need to pull the whole repo to build the container image
9529- GIT_STRATEGY: none
9530- CI_BUILD_COMPONENTS: "$CI_BUILD_COMPONENTS_ANDROID_CTS $CI_BUILD_COMPONENTS_ANGLE $CI_BUILD_COMPONENTS_CROSVM $CI_BUILD_COMPONENTS_FLUSTER $CI_BUILD_COMPONENTS_PIGLIT $CI_BUILD_COMPONENTS_VKD3D_PROTON"
9531-
9532-.container-builds-angle:
9533- variables:
9534- ANGLE_TAG: "${CONDITIONAL_BUILD_ANGLE_TAG}"
9535- CI_BUILD_COMPONENTS_ANGLE: angle
9536-
9537-.container-builds-crosvm:
9538- variables:
9539- CROSVM_TAG: "${CONDITIONAL_BUILD_CROSVM_TAG}"
9540- CI_BUILD_COMPONENTS_CROSVM: crosvm
9541-
9542-.container-builds-fluster:
9543- variables:
9544- FLUSTER_TAG: "${CONDITIONAL_BUILD_FLUSTER_TAG}"
9545- CI_BUILD_COMPONENTS_FLUSTER: fluster
9546-
9547-.container-builds-piglit:
9548- variables:
9549- PIGLIT_TAG: "${CONDITIONAL_BUILD_PIGLIT_TAG}"
9550- CI_BUILD_COMPONENTS_PIGLIT: piglit
9551-
9552-.container-builds-vkd3d-proton:
9553- variables:
9554- VKD3D_PROTON_TAG: "${CONDITIONAL_BUILD_VKD3D_PROTON_TAG}"
9555- CI_BUILD_COMPONENTS_VKD3D_PROTON: vkd3d-proton
9556-
9557-.container-builds-android-cts:
9558- variables:
9559- ANDROID_CTS_TAG: "${CONDITIONAL_BUILD_ANDROID_CTS_TAG}"
9560- CI_BUILD_COMPONENTS_ANDROID_CTS: android-cts
9561-
9562-.container-builds-android:
9563- extends:
9564- - .container-builds-android-cts
9565- - .container-builds-angle
9566-
9567-.container-builds-arm32:
9568- extends:
9569- - .container-builds-piglit
9570-
9571-.container-builds-base:
9572- extends:
9573- - .container-builds-crosvm
9574-
9575-.container-builds-gl:
9576- extends:
9577- - .container-builds-angle
9578- - .container-builds-piglit
9579-
9580-.container-builds-video:
9581- extends:
9582- - .container-builds-fluster
9583-
9584-.container-builds-vk:
9585- extends:
9586- - .container-builds-piglit
9587- - .container-builds-vkd3d-proton
9588-
9589-# Export the container rootfs and upload it to S3
9590-.export-container:
9591- variables:
9592- FDO_DISTRIBUTION_PACKAGES: zstd
9593- FDO_DISTRIBUTION_POST_EXEC: 'bash .gitlab-ci/container/fdo_cntr_export.sh'
9594-
9595-.use-base-image:
9596- extends:
9597- - .container
9598- - .incorporate-base-tag+templates-commit
9599diff --git a/.gitlab-ci/container/gitlab-ci.yml b/.gitlab-ci/container/gitlab-ci.yml
9600deleted file mode 100644
9601index 2416728..0000000
9602--- a/.gitlab-ci/container/gitlab-ci.yml
9603+++ /dev/null
9604@@ -1,20 +0,0 @@
9605-# Build the CI docker images.
9606-#
9607-# MESA_IMAGE_TAG is the tag of the docker image used by later stage jobs. If the
9608-# image doesn't exist yet, the container stage job generates it.
9609-#
9610-# In order to generate a new image, one should generally change the tag.
9611-# While removing the image from the registry would also work, that's not
9612-# recommended except for ephemeral images during development: Replacing
9613-# an image after a significant amount of time might pull in newer
9614-# versions of gcc/clang or other packages, which might break the build
9615-# with older commits using the same tag.
9616-#
9617-# After merging a change resulting in generating a new image to the
9618-# main repository, it's recommended to remove the image from the source
9619-# repository's container registry, so that the image from the main
9620-# repository's registry will be used there as well.
9621-
9622-include:
9623- - local: '.gitlab-ci/container/gitlab-ci-inc.yml'
9624- - local: '.gitlab-ci/container/*/gitlab-ci.yml'
9625diff --git a/.gitlab-ci/container/install-meson.sh b/.gitlab-ci/container/install-meson.sh
9626deleted file mode 100644
9627index 45a8370..0000000
9628--- a/.gitlab-ci/container/install-meson.sh
9629+++ /dev/null
9630@@ -1,12 +0,0 @@
9631-#!/usr/bin/env bash
9632-
9633-# When changing this file, you need to bump the following
9634-# .gitlab-ci/image-tags.yml tags:
9635-# ALPINE_X86_64_BUILD_TAG
9636-# DEBIAN_BUILD_BASE_TAG
9637-# FEDORA_X86_64_BUILD_TAG
9638-
9639-rm -f /usr/lib/python3.*/EXTERNALLY-MANAGED
9640-
9641-# We need at least 1.7.0 for proper rust binding generation
9642-pip3 install 'meson==1.7.0'
9643diff --git a/.gitlab-ci/container/install-wine-apitrace.sh b/.gitlab-ci/container/install-wine-apitrace.sh
9644deleted file mode 100644
9645index eb4f168..0000000
9646--- a/.gitlab-ci/container/install-wine-apitrace.sh
9647+++ /dev/null
9648@@ -1,16 +0,0 @@
9649-#!/bin/bash
9650-
9651-set -ue
9652-
9653-APITRACE_VERSION="11.1"
9654-APITRACE_VERSION_DATE=""
9655-
9656-curl -L -O --retry 4 -f --retry-all-errors --retry-delay 60 \
9657- "https://github.com/apitrace/apitrace/releases/download/${APITRACE_VERSION}/apitrace-${APITRACE_VERSION}${APITRACE_VERSION_DATE}-win64.7z"
9658-7zr x "apitrace-${APITRACE_VERSION}${APITRACE_VERSION_DATE}-win64.7z" \
9659- "apitrace-${APITRACE_VERSION}${APITRACE_VERSION_DATE}-win64/bin/apitrace.exe" \
9660- "apitrace-${APITRACE_VERSION}${APITRACE_VERSION_DATE}-win64/bin/d3dretrace.exe"
9661-mv "apitrace-${APITRACE_VERSION}${APITRACE_VERSION_DATE}-win64" /apitrace-msvc-win64
9662-rm "apitrace-${APITRACE_VERSION}${APITRACE_VERSION_DATE}-win64.7z"
9663-
9664-
9665diff --git a/.gitlab-ci/container/install-wine-dxvk.sh b/.gitlab-ci/container/install-wine-dxvk.sh
9666deleted file mode 100755
9667index 4785890..0000000
9668--- a/.gitlab-ci/container/install-wine-dxvk.sh
9669+++ /dev/null
9670@@ -1,27 +0,0 @@
9671-#!/usr/bin/env bash
9672-
9673-set -ue
9674-
9675-overrideDll() {
9676- if ! wine reg add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v "$1" /d native /f; then
9677- echo -e "Failed to add override for $1"
9678- exit 1
9679- fi
9680-}
9681-
9682-dxvk_install_release() {
9683- local DXVK_VERSION=${1:?}
9684-
9685- curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
9686- -O "https://github.com/doitsujin/dxvk/releases/download/v${DXVK_VERSION}/dxvk-${DXVK_VERSION}.tar.gz"
9687- tar xzpf dxvk-"${DXVK_VERSION}".tar.gz
9688- cp "dxvk-${DXVK_VERSION}"/x64/*.dll "$WINEPREFIX/drive_c/windows/system32/"
9689- overrideDll d3d9
9690- overrideDll d3d10core
9691- overrideDll d3d11
9692- overrideDll dxgi
9693- rm -rf "dxvk-${DXVK_VERSION}"
9694- rm dxvk-"${DXVK_VERSION}".tar.gz
9695-}
9696-
9697-dxvk_install_release "2.1"
9698diff --git a/.gitlab-ci/container/patches/build-deqp-gl_Build-Don-t-build-Vulkan-utilities-for-GL-builds.patch b/.gitlab-ci/container/patches/build-deqp-gl_Build-Don-t-build-Vulkan-utilities-for-GL-builds.patch
9699deleted file mode 100644
9700index 2be1bc8..0000000
9701--- a/.gitlab-ci/container/patches/build-deqp-gl_Build-Don-t-build-Vulkan-utilities-for-GL-builds.patch
9702+++ /dev/null
9703@@ -1,392 +0,0 @@
9704-From ccdc2b9341c703507cba6017d2a494595335ffdc Mon Sep 17 00:00:00 2001
9705-From: Daniel Stone <daniels@collabora.com>
9706-Date: Wed, 29 Jan 2025 12:50:33 +0000
9707-Subject: [PATCH] Build: Don't build Vulkan utilities for GL builds
9708-
9709-Change-Id: Ie412f914bb6264ffbd502deea57d80cc11a9948e
9710-Signed-off-by: Daniel Stone <daniels@collabora.com>
9711----
9712- framework/platform/CMakeLists.txt | 9 --
9713- .../platform/android/tcuAndroidPlatform.cpp | 126 +-----------------
9714- .../platform/android/tcuAndroidPlatform.hpp | 14 +-
9715- framework/platform/lnx/tcuLnxPlatform.cpp | 9 +-
9716- .../surfaceless/tcuSurfacelessPlatform.cpp | 54 --------
9717- 5 files changed, 3 insertions(+), 209 deletions(-)
9718-
9719-diff --git a/framework/platform/CMakeLists.txt b/framework/platform/CMakeLists.txt
9720-index ec1deb5c2..49fe412a7 100644
9721---- a/framework/platform/CMakeLists.txt
9722-+++ b/framework/platform/CMakeLists.txt
9723-@@ -15,8 +15,6 @@ if (NOT DEFINED TCUTIL_PLATFORM_SRCS)
9724- win32/tcuWin32Window.hpp
9725- win32/tcuWin32EGLNativeDisplayFactory.hpp
9726- win32/tcuWin32EGLNativeDisplayFactory.cpp
9727-- win32/tcuWin32VulkanPlatform.hpp
9728-- win32/tcuWin32VulkanPlatform.cpp
9729- )
9730-
9731- elseif ((DE_OS_IS_UNIX OR DE_OS_IS_OSX) AND (DEQP_USE_X11 OR DEQP_USE_WAYLAND OR DEQP_USE_HEADLESS))
9732-@@ -28,8 +26,6 @@ if (NOT DEFINED TCUTIL_PLATFORM_SRCS)
9733- lnx/tcuLnxPlatform.hpp
9734- lnx/tcuLnxEglPlatform.hpp
9735- lnx/tcuLnxEglPlatform.cpp
9736-- lnx/tcuLnxVulkanPlatform.hpp
9737-- lnx/tcuLnxVulkanPlatform.cpp
9738- )
9739-
9740- include_directories(lnx)
9741-@@ -164,8 +160,6 @@ if (NOT DEFINED TCUTIL_PLATFORM_SRCS)
9742- set(TCUTIL_PLATFORM_SRCS
9743- osx/tcuOSXPlatform.cpp
9744- osx/tcuOSXPlatform.hpp
9745-- osx/tcuOSXVulkanPlatform.cpp
9746-- osx/tcuOSXVulkanPlatform.hpp
9747- osx/tcuOSXMetalView.mm
9748- osx/tcuOSXMetalView.hpp
9749- )
9750-@@ -191,9 +185,6 @@ if (DEQP_USE_WAYLAND)
9751- add_dependencies(tcutil-platform deqp-xdg-shell)
9752- endif()
9753-
9754--# Add vkutil to the deps before tcutil so that it picks up the c++11 dependencies
9755--target_link_libraries(tcutil-platform vkutil)
9756--
9757- target_link_libraries(tcutil-platform tcutil ${TCUTIL_PLATFORM_LIBS})
9758-
9759- # Always link to glutil as some platforms such as Win32 always support GL
9760-diff --git a/framework/platform/android/tcuAndroidPlatform.cpp b/framework/platform/android/tcuAndroidPlatform.cpp
9761-index af56dabb8..6b0de6dba 100644
9762---- a/framework/platform/android/tcuAndroidPlatform.cpp
9763-+++ b/framework/platform/android/tcuAndroidPlatform.cpp
9764-@@ -31,7 +31,6 @@
9765- #include "eglwLibrary.hpp"
9766- #include "eglwEnums.hpp"
9767- #include "tcuFunctionLibrary.hpp"
9768--#include "vkWsiPlatform.hpp"
9769-
9770- // Assume no call translation is needed
9771- #include <android/native_window.h>
9772-@@ -217,102 +216,6 @@ eglu::NativeDisplay *NativeDisplayFactory::createDisplay(const EGLAttrib *attrib
9773- return new NativeDisplay();
9774- }
9775-
9776--// Vulkan
9777--
9778--class VulkanLibrary : public vk::Library
9779--{
9780--public:
9781-- VulkanLibrary(const char *libraryPath)
9782-- : m_library(libraryPath != nullptr ? libraryPath : "libvulkan.so")
9783-- , m_driver(m_library)
9784-- {
9785-- }
9786--
9787-- const vk::PlatformInterface &getPlatformInterface(void) const
9788-- {
9789-- return m_driver;
9790-- }
9791--
9792-- const tcu::FunctionLibrary &getFunctionLibrary(void) const
9793-- {
9794-- return m_library;
9795-- }
9796--
9797--private:
9798-- const tcu::DynamicFunctionLibrary m_library;
9799-- const vk::PlatformDriver m_driver;
9800--};
9801--
9802--DE_STATIC_ASSERT(sizeof(vk::pt::AndroidNativeWindowPtr) == sizeof(ANativeWindow *));
9803--
9804--class VulkanWindow : public vk::wsi::AndroidWindowInterface
9805--{
9806--public:
9807-- VulkanWindow(tcu::Android::Window &window)
9808-- : vk::wsi::AndroidWindowInterface(vk::pt::AndroidNativeWindowPtr(window.getNativeWindow()))
9809-- , m_window(window)
9810-- {
9811-- }
9812--
9813-- void setVisible(bool visible)
9814-- {
9815-- DE_UNREF(visible);
9816-- }
9817--
9818-- void resize(const UVec2 &newSize)
9819-- {
9820-- DE_UNREF(newSize);
9821-- }
9822--
9823-- void setMinimized(bool minimized)
9824-- {
9825-- DE_UNREF(minimized);
9826-- TCU_THROW(NotSupportedError, "Minimized on Android is not implemented");
9827-- }
9828--
9829-- ~VulkanWindow(void)
9830-- {
9831-- m_window.release();
9832-- }
9833--
9834--private:
9835-- tcu::Android::Window &m_window;
9836--};
9837--
9838--class VulkanDisplay : public vk::wsi::Display
9839--{
9840--public:
9841-- VulkanDisplay(WindowRegistry &windowRegistry) : m_windowRegistry(windowRegistry)
9842-- {
9843-- }
9844--
9845-- vk::wsi::Window *createWindow(const Maybe<UVec2> &initialSize) const
9846-- {
9847-- Window *const window = m_windowRegistry.tryAcquireWindow();
9848--
9849-- if (window)
9850-- {
9851-- try
9852-- {
9853-- if (initialSize)
9854-- window->setBuffersGeometry((int)initialSize->x(), (int)initialSize->y(), WINDOW_FORMAT_RGBA_8888);
9855--
9856-- return new VulkanWindow(*window);
9857-- }
9858-- catch (...)
9859-- {
9860-- window->release();
9861-- throw;
9862-- }
9863-- }
9864-- else
9865-- TCU_THROW(ResourceError, "Native window is not available");
9866-- }
9867--
9868--private:
9869-- WindowRegistry &m_windowRegistry;
9870--};
9871--
9872- static size_t getTotalSystemMemory(ANativeActivity *activity)
9873- {
9874- const size_t MiB = (size_t)(1 << 20);
9875-@@ -341,8 +244,7 @@ static size_t getTotalSystemMemory(ANativeActivity *activity)
9876- // Platform
9877-
9878- Platform::Platform(NativeActivity &activity)
9879-- : m_activity(activity)
9880-- , m_totalSystemMemory(getTotalSystemMemory(activity.getNativeActivity()))
9881-+ : m_totalSystemMemory(getTotalSystemMemory(activity.getNativeActivity()))
9882- {
9883- m_nativeDisplayFactoryRegistry.registerFactory(new NativeDisplayFactory(m_windowRegistry));
9884- m_contextFactoryRegistry.registerFactory(new eglu::GLContextFactory(m_nativeDisplayFactoryRegistry));
9885-@@ -358,16 +260,6 @@ bool Platform::processEvents(void)
9886- return true;
9887- }
9888-
9889--vk::Library *Platform::createLibrary(const char *libraryPath) const
9890--{
9891-- return new VulkanLibrary(libraryPath);
9892--}
9893--
9894--void Platform::describePlatform(std::ostream &dst) const
9895--{
9896-- tcu::Android::describePlatform(m_activity.getNativeActivity(), dst);
9897--}
9898--
9899- void Platform::getMemoryLimits(tcu::PlatformMemoryLimits &limits) const
9900- {
9901- // Worst-case estimates
9902-@@ -401,22 +293,6 @@ void Platform::getMemoryLimits(tcu::PlatformMemoryLimits &limits) const
9903- limits.devicePageTableHierarchyLevels = 3;
9904- }
9905-
9906--vk::wsi::Display *Platform::createWsiDisplay(vk::wsi::Type wsiType) const
9907--{
9908-- if (wsiType == vk::wsi::TYPE_ANDROID)
9909-- return new VulkanDisplay(const_cast<WindowRegistry &>(m_windowRegistry));
9910-- else
9911-- TCU_THROW(NotSupportedError, "WSI type not supported on Android");
9912--}
9913--
9914--bool Platform::hasDisplay(vk::wsi::Type wsiType) const
9915--{
9916-- if (wsiType == vk::wsi::TYPE_ANDROID)
9917-- return true;
9918--
9919-- return false;
9920--}
9921--
9922- } // namespace Android
9923- } // namespace tcu
9924-
9925-diff --git a/framework/platform/android/tcuAndroidPlatform.hpp b/framework/platform/android/tcuAndroidPlatform.hpp
9926-index 32cc9068c..3c3f02d98 100644
9927---- a/framework/platform/android/tcuAndroidPlatform.hpp
9928-+++ b/framework/platform/android/tcuAndroidPlatform.hpp
9929-@@ -27,7 +27,6 @@
9930- #include "tcuPlatform.hpp"
9931- #include "egluPlatform.hpp"
9932- #include "gluPlatform.hpp"
9933--#include "vkPlatform.hpp"
9934- #include "tcuAndroidWindow.hpp"
9935- #include "tcuAndroidNativeActivity.hpp"
9936-
9937-@@ -36,7 +35,7 @@ namespace tcu
9938- namespace Android
9939- {
9940-
9941--class Platform : public tcu::Platform, private eglu::Platform, private glu::Platform, private vk::Platform
9942-+class Platform : public tcu::Platform, private eglu::Platform, private glu::Platform
9943- {
9944- public:
9945- Platform(NativeActivity &activity);
9946-@@ -52,10 +51,6 @@ public:
9947- {
9948- return static_cast<const eglu::Platform &>(*this);
9949- }
9950-- virtual const vk::Platform &getVulkanPlatform(void) const
9951-- {
9952-- return static_cast<const vk::Platform &>(*this);
9953-- }
9954- virtual void getMemoryLimits(tcu::PlatformMemoryLimits &limits) const;
9955-
9956- WindowRegistry &getWindowRegistry(void)
9957-@@ -63,14 +58,7 @@ public:
9958- return m_windowRegistry;
9959- }
9960-
9961-- // Vulkan Platform API
9962-- vk::Library *createLibrary(const char *libraryPath) const;
9963-- void describePlatform(std::ostream &dst) const;
9964-- vk::wsi::Display *createWsiDisplay(vk::wsi::Type wsiType) const;
9965-- bool hasDisplay(vk::wsi::Type wsiType) const;
9966--
9967- private:
9968-- NativeActivity &m_activity;
9969- WindowRegistry m_windowRegistry;
9970- const size_t m_totalSystemMemory;
9971- };
9972-diff --git a/framework/platform/lnx/tcuLnxPlatform.cpp b/framework/platform/lnx/tcuLnxPlatform.cpp
9973-index 8c0a3ef06..6b1a4985a 100644
9974---- a/framework/platform/lnx/tcuLnxPlatform.cpp
9975-+++ b/framework/platform/lnx/tcuLnxPlatform.cpp
9976-@@ -23,12 +23,10 @@
9977-
9978- #include "tcuLnxPlatform.hpp"
9979-
9980--#include "tcuLnxVulkanPlatform.hpp"
9981- #include "tcuLnxEglPlatform.hpp"
9982-
9983- #include "deUniquePtr.hpp"
9984- #include "gluPlatform.hpp"
9985--#include "vkPlatform.hpp"
9986-
9987- #if defined(DEQP_SUPPORT_X11)
9988- #include <X11/Xlib.h>
9989-@@ -64,10 +62,6 @@ public:
9990- return !m_eventState.getQuitFlag();
9991- }
9992-
9993-- const vk::Platform &getVulkanPlatform(void) const
9994-- {
9995-- return m_vkPlatform;
9996-- }
9997- const eglu::Platform &getEGLPlatform(void) const
9998- {
9999- return m_eglPlatform;
10000-@@ -79,12 +73,11 @@ public:
10001-
10002- private:
10003- EventState m_eventState;
10004-- VulkanPlatform m_vkPlatform;
10005- egl::Platform m_eglPlatform;
10006- LinuxGLPlatform m_glPlatform;
10007- };
10008-
10009--LinuxPlatform::LinuxPlatform(void) : m_vkPlatform(m_eventState), m_eglPlatform(m_eventState)
10010-+LinuxPlatform::LinuxPlatform(void) : m_eglPlatform(m_eventState)
10011- {
10012- #if defined(DEQP_SUPPORT_GLX)
10013- m_glPlatform.registerFactory(x11::glx::createContextFactory(m_eventState));
10014-diff --git a/framework/platform/surfaceless/tcuSurfacelessPlatform.cpp b/framework/platform/surfaceless/tcuSurfacelessPlatform.cpp
10015-index 585bfbbae..9f386b3ca 100644
10016---- a/framework/platform/surfaceless/tcuSurfacelessPlatform.cpp
10017-+++ b/framework/platform/surfaceless/tcuSurfacelessPlatform.cpp
10018-@@ -43,7 +43,6 @@
10019- #include "tcuPixelFormat.hpp"
10020- #include "tcuPlatform.hpp"
10021- #include "tcuRenderTarget.hpp"
10022--#include "vkPlatform.hpp"
10023-
10024- #include <EGL/egl.h>
10025-
10026-@@ -99,52 +98,6 @@ namespace tcu
10027- namespace surfaceless
10028- {
10029-
10030--class VulkanLibrary : public vk::Library
10031--{
10032--public:
10033-- VulkanLibrary(const char *libraryPath)
10034-- : m_library(libraryPath != nullptr ? libraryPath : DEQP_VULKAN_LIBRARY_PATH)
10035-- , m_driver(m_library)
10036-- {
10037-- }
10038--
10039-- const vk::PlatformInterface &getPlatformInterface(void) const
10040-- {
10041-- return m_driver;
10042-- }
10043-- const tcu::FunctionLibrary &getFunctionLibrary(void) const
10044-- {
10045-- return m_library;
10046-- }
10047--
10048--private:
10049-- const tcu::DynamicFunctionLibrary m_library;
10050-- const vk::PlatformDriver m_driver;
10051--};
10052--
10053--// Copied from tcuX11Platform.cpp
10054--class VulkanPlatform : public vk::Platform
10055--{
10056--public:
10057-- vk::Library *createLibrary(const char *libraryPath) const
10058-- {
10059-- return new VulkanLibrary(libraryPath);
10060-- }
10061--
10062-- void describePlatform(std::ostream &dst) const
10063-- {
10064-- utsname sysInfo;
10065--
10066-- deMemset(&sysInfo, 0, sizeof(sysInfo));
10067--
10068-- if (uname(&sysInfo) != 0)
10069-- throw std::runtime_error("uname() failed");
10070--
10071-- dst << "OS: " << sysInfo.sysname << " " << sysInfo.release << " " << sysInfo.version << "\n";
10072-- dst << "CPU: " << sysInfo.machine << "\n";
10073-- }
10074--};
10075--
10076- bool isEGLExtensionSupported(const eglw::Library &egl, eglw::EGLDisplay, const std::string &extName)
10077- {
10078- const vector<string> exts = eglu::getClientExtensions(egl);
10079-@@ -191,13 +144,6 @@ public:
10080- {
10081- return *this;
10082- }
10083-- const vk::Platform &getVulkanPlatform(void) const
10084-- {
10085-- return m_vkPlatform;
10086-- }
10087--
10088--private:
10089-- VulkanPlatform m_vkPlatform;
10090- };
10091-
10092- class ContextFactory : public glu::ContextFactory
10093---
10094-2.45.2
10095-
10096diff --git a/.gitlab-ci/container/patches/build-perfetto-Fix-C-standard-library-build-errors-with-Debian-13.patch b/.gitlab-ci/container/patches/build-perfetto-Fix-C-standard-library-build-errors-with-Debian-13.patch
10097deleted file mode 100644
10098index 91a64ed..0000000
10099--- a/.gitlab-ci/container/patches/build-perfetto-Fix-C-standard-library-build-errors-with-Debian-13.patch
10100+++ /dev/null
10101@@ -1,49 +0,0 @@
10102-From 7a5a9e5be4306637cd3a0ef0f770832f4b4cf4b4 Mon Sep 17 00:00:00 2001
10103-From: Laura Nao <laura.nao@collabora.com>
10104-Date: Wed, 12 Nov 2025 14:45:32 +0100
10105-Subject: [PATCH] Fix C++ standard library build errors with Debian 13
10106-
10107-Address missing <algorithm> and <optional> includes that caused build
10108-failures ("no member named 'find' in namespace 'std'" and
10109-"error: no template named 'optional' in namespace 'std'") when building
10110-with the native toolchain on Debian 13.
10111-
10112-This was fixed upstream in v48[1] and v49[2] respectively, so this patch
10113-can be dropped once Perfetto is updated to v48+.
10114-
10115-[1] https://github.com/google/perfetto/commit/d005c0123b2f929b918359a53ffe61d7ca2212a0
10116-[2] https://github.com/google/perfetto/commit/acc24608c84d2d2d8d684f40a110d0a6f4eddc51
10117-
10118-Signed-off-by: Laura Nao <laura.nao@collabora.com>
10119----
10120- src/profiling/common/producer_support.cc | 1 +
10121- src/traced/probes/sys_stats/sys_stats_data_source.h | 1 +
10122- 2 files changed, 2 insertions(+)
10123-
10124-diff --git a/src/profiling/common/producer_support.cc b/src/profiling/common/producer_support.cc
10125-index 5303658..e9e193d 100644
10126---- a/src/profiling/common/producer_support.cc
10127-+++ b/src/profiling/common/producer_support.cc
10128-@@ -16,6 +16,7 @@
10129-
10130- #include "src/profiling/common/producer_support.h"
10131-
10132-+#include <algorithm>
10133- #include <optional>
10134-
10135- #include "perfetto/ext/base/android_utils.h"
10136-diff --git a/src/traced/probes/sys_stats/sys_stats_data_source.h b/src/traced/probes/sys_stats/sys_stats_data_source.h
10137-index e09cd8a..7e4749b 100644
10138---- a/src/traced/probes/sys_stats/sys_stats_data_source.h
10139-+++ b/src/traced/probes/sys_stats/sys_stats_data_source.h
10140-@@ -21,6 +21,7 @@
10141-
10142- #include <map>
10143- #include <memory>
10144-+#include <optional>
10145- #include <string>
10146-
10147- #include "perfetto/ext/base/paged_memory.h"
10148---
10149-2.39.5
10150-
10151diff --git a/.gitlab-ci/container/patches/build-skqp_BUILD.gn.patch b/.gitlab-ci/container/patches/build-skqp_BUILD.gn.patch
10152deleted file mode 100644
10153index a1e82af..0000000
10154--- a/.gitlab-ci/container/patches/build-skqp_BUILD.gn.patch
10155+++ /dev/null
10156@@ -1,13 +0,0 @@
10157-diff --git a/BUILD.gn b/BUILD.gn
10158-index d2b1407..7b60c90 100644
10159---- a/BUILD.gn
10160-+++ b/BUILD.gn
10161-@@ -144,7 +144,7 @@ config("skia_public") {
10162-
10163- # Skia internal APIs, used by Skia itself and a few test tools.
10164- config("skia_private") {
10165-- visibility = [ ":*" ]
10166-+ visibility = [ "*" ]
10167-
10168- include_dirs = [
10169- "include/private",
10170diff --git a/.gitlab-ci/container/patches/build-skqp_fetch_gn.patch b/.gitlab-ci/container/patches/build-skqp_fetch_gn.patch
10171deleted file mode 100644
10172index 545cf2a..0000000
10173--- a/.gitlab-ci/container/patches/build-skqp_fetch_gn.patch
10174+++ /dev/null
10175@@ -1,68 +0,0 @@
10176-diff --git a/bin/fetch-gn b/bin/fetch-gn
10177-index d5e94a2..59c4591 100755
10178---- a/bin/fetch-gn
10179-+++ b/bin/fetch-gn
10180-@@ -5,39 +5,44 @@
10181- # Use of this source code is governed by a BSD-style license that can be
10182- # found in the LICENSE file.
10183-
10184--import hashlib
10185- import os
10186-+import platform
10187- import shutil
10188- import stat
10189- import sys
10190--import urllib2
10191-+import tempfile
10192-+import zipfile
10193-+
10194-+if sys.version_info[0] < 3:
10195-+ from urllib2 import urlopen
10196-+else:
10197-+ from urllib.request import urlopen
10198-
10199- os.chdir(os.path.join(os.path.dirname(__file__), os.pardir))
10200-
10201--dst = 'bin/gn.exe' if 'win32' in sys.platform else 'bin/gn'
10202-+gnzip = os.path.join(tempfile.mkdtemp(), 'gn.zip')
10203-+with open(gnzip, 'wb') as f:
10204-+ OS = {'darwin': 'mac', 'linux': 'linux', 'linux2': 'linux', 'win32': 'windows'}[sys.platform]
10205-+ cpu = {'amd64': 'amd64', 'arm64': 'arm64', 'x86_64': 'amd64', 'aarch64': 'arm64'}[platform.machine().lower()]
10206-
10207--sha1 = '2f27ff0b6118e5886df976da5effa6003d19d1ce' if 'linux' in sys.platform else \
10208-- '9be792dd9010ce303a9c3a497a67bcc5ac8c7666' if 'darwin' in sys.platform else \
10209-- 'eb69be2d984b4df60a8c21f598135991f0ad1742' # Windows
10210-+ rev = 'd62642c920e6a0d1756316d225a90fd6faa9e21e'
10211-+ url = 'https://chrome-infra-packages.appspot.com/dl/gn/gn/{}-{}/+/git_revision:{}'.format(
10212-+ OS,cpu,rev)
10213-+ f.write(urlopen(url).read())
10214-
10215--def sha1_of_file(path):
10216-- h = hashlib.sha1()
10217-- if os.path.isfile(path):
10218-- with open(path, 'rb') as f:
10219-- h.update(f.read())
10220-- return h.hexdigest()
10221-+gn = 'gn.exe' if 'win32' in sys.platform else 'gn'
10222-+with zipfile.ZipFile(gnzip, 'r') as f:
10223-+ f.extract(gn, 'bin')
10224-
10225--if sha1_of_file(dst) != sha1:
10226-- with open(dst, 'wb') as f:
10227-- f.write(urllib2.urlopen('https://chromium-gn.storage-download.googleapis.com/' + sha1).read())
10228-+gn = os.path.join('bin', gn)
10229-
10230-- os.chmod(dst, stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR |
10231-- stat.S_IRGRP | stat.S_IXGRP |
10232-- stat.S_IROTH | stat.S_IXOTH )
10233-+os.chmod(gn, stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR |
10234-+ stat.S_IRGRP | stat.S_IXGRP |
10235-+ stat.S_IROTH | stat.S_IXOTH )
10236-
10237- # We'll also copy to a path that depot_tools' GN wrapper will expect to find the binary.
10238- copy_path = 'buildtools/linux64/gn' if 'linux' in sys.platform else \
10239- 'buildtools/mac/gn' if 'darwin' in sys.platform else \
10240- 'buildtools/win/gn.exe'
10241- if os.path.isdir(os.path.dirname(copy_path)):
10242-- shutil.copy(dst, copy_path)
10243-+ shutil.copy(gn, copy_path)
10244diff --git a/.gitlab-ci/container/patches/build-skqp_git-sync-deps.patch b/.gitlab-ci/container/patches/build-skqp_git-sync-deps.patch
10245deleted file mode 100644
10246index d088349..0000000
10247--- a/.gitlab-ci/container/patches/build-skqp_git-sync-deps.patch
10248+++ /dev/null
10249@@ -1,142 +0,0 @@
10250-Patch based from diff with skia repository from commit
10251-013397884c73959dc07cb0a26ee742b1cdfbda8a
10252-
10253-Adds support for Python3, but removes the constraint of only SHA based refs in
10254-DEPS
10255-diff --git a/tools/git-sync-deps b/tools/git-sync-deps
10256-index c7379c0b5c..f63d4d9ccf 100755
10257---- a/tools/git-sync-deps
10258-+++ b/tools/git-sync-deps
10259-@@ -43,7 +43,7 @@ def git_executable():
10260- A string suitable for passing to subprocess functions, or None.
10261- """
10262- envgit = os.environ.get('GIT_EXECUTABLE')
10263-- searchlist = ['git']
10264-+ searchlist = ['git', 'git.bat']
10265- if envgit:
10266- searchlist.insert(0, envgit)
10267- with open(os.devnull, 'w') as devnull:
10268-@@ -94,21 +94,25 @@ def is_git_toplevel(git, directory):
10269- try:
10270- toplevel = subprocess.check_output(
10271- [git, 'rev-parse', '--show-toplevel'], cwd=directory).strip()
10272-- return os.path.realpath(directory) == os.path.realpath(toplevel)
10273-+ return os.path.realpath(directory) == os.path.realpath(toplevel.decode())
10274- except subprocess.CalledProcessError:
10275- return False
10276-
10277-
10278--def status(directory, checkoutable):
10279-- def truncate(s, length):
10280-+def status(directory, commithash, change):
10281-+ def truncate_beginning(s, length):
10282-+ return s if len(s) <= length else '...' + s[-(length-3):]
10283-+ def truncate_end(s, length):
10284- return s if len(s) <= length else s[:(length - 3)] + '...'
10285-+
10286- dlen = 36
10287-- directory = truncate(directory, dlen)
10288-- checkoutable = truncate(checkoutable, 40)
10289-- sys.stdout.write('%-*s @ %s\n' % (dlen, directory, checkoutable))
10290-+ directory = truncate_beginning(directory, dlen)
10291-+ commithash = truncate_end(commithash, 40)
10292-+ symbol = '>' if change else '@'
10293-+ sys.stdout.write('%-*s %s %s\n' % (dlen, directory, symbol, commithash))
10294-
10295-
10296--def git_checkout_to_directory(git, repo, checkoutable, directory, verbose):
10297-+def git_checkout_to_directory(git, repo, commithash, directory, verbose):
10298- """Checkout (and clone if needed) a Git repository.
10299-
10300- Args:
10301-@@ -117,8 +121,7 @@ def git_checkout_to_directory(git, repo, checkoutable, directory, verbose):
10302- repo (string) the location of the repository, suitable
10303- for passing to `git clone`.
10304-
10305-- checkoutable (string) a tag, branch, or commit, suitable for
10306-- passing to `git checkout`
10307-+ commithash (string) a commit, suitable for passing to `git checkout`
10308-
10309- directory (string) the path into which the repository
10310- should be checked out.
10311-@@ -129,7 +132,12 @@ def git_checkout_to_directory(git, repo, checkoutable, directory, verbose):
10312- """
10313- if not os.path.isdir(directory):
10314- subprocess.check_call(
10315-- [git, 'clone', '--quiet', repo, directory])
10316-+ [git, 'clone', '--quiet', '--no-checkout', repo, directory])
10317-+ subprocess.check_call([git, 'checkout', '--quiet', commithash],
10318-+ cwd=directory)
10319-+ if verbose:
10320-+ status(directory, commithash, True)
10321-+ return
10322-
10323- if not is_git_toplevel(git, directory):
10324- # if the directory exists, but isn't a git repo, you will modify
10325-@@ -145,11 +153,11 @@ def git_checkout_to_directory(git, repo, checkoutable, directory, verbose):
10326- with open(os.devnull, 'w') as devnull:
10327- # If this fails, we will fetch before trying again. Don't spam user
10328- # with error infomation.
10329-- if 0 == subprocess.call([git, 'checkout', '--quiet', checkoutable],
10330-+ if 0 == subprocess.call([git, 'checkout', '--quiet', commithash],
10331- cwd=directory, stderr=devnull):
10332- # if this succeeds, skip slow `git fetch`.
10333- if verbose:
10334-- status(directory, checkoutable) # Success.
10335-+ status(directory, commithash, False) # Success.
10336- return
10337-
10338- # If the repo has changed, always force use of the correct repo.
10339-@@ -159,18 +167,24 @@ def git_checkout_to_directory(git, repo, checkoutable, directory, verbose):
10340-
10341- subprocess.check_call([git, 'fetch', '--quiet'], cwd=directory)
10342-
10343-- subprocess.check_call([git, 'checkout', '--quiet', checkoutable], cwd=directory)
10344-+ subprocess.check_call([git, 'checkout', '--quiet', commithash], cwd=directory)
10345-
10346- if verbose:
10347-- status(directory, checkoutable) # Success.
10348-+ status(directory, commithash, True) # Success.
10349-
10350-
10351- def parse_file_to_dict(path):
10352- dictionary = {}
10353-- execfile(path, dictionary)
10354-+ with open(path) as f:
10355-+ exec('def Var(x): return vars[x]\n' + f.read(), dictionary)
10356- return dictionary
10357-
10358-
10359-+def is_sha1_sum(s):
10360-+ """SHA1 sums are 160 bits, encoded as lowercase hexadecimal."""
10361-+ return len(s) == 40 and all(c in '0123456789abcdef' for c in s)
10362-+
10363-+
10364- def git_sync_deps(deps_file_path, command_line_os_requests, verbose):
10365- """Grab dependencies, with optional platform support.
10366-
10367-@@ -204,19 +218,19 @@ def git_sync_deps(deps_file_path, command_line_os_requests, verbose):
10368- raise Exception('%r is parent of %r' % (other_dir, directory))
10369- list_of_arg_lists = []
10370- for directory in sorted(dependencies):
10371-- if not isinstance(dependencies[directory], basestring):
10372-+ if not isinstance(dependencies[directory], str):
10373- if verbose:
10374-- print 'Skipping "%s".' % directory
10375-+ sys.stdout.write( 'Skipping "%s".\n' % directory)
10376- continue
10377- if '@' in dependencies[directory]:
10378-- repo, checkoutable = dependencies[directory].split('@', 1)
10379-+ repo, commithash = dependencies[directory].split('@', 1)
10380- else:
10381-- raise Exception("please specify commit or tag")
10382-+ raise Exception("please specify commit")
10383-
10384- relative_directory = os.path.join(deps_file_directory, directory)
10385-
10386- list_of_arg_lists.append(
10387-- (git, repo, checkoutable, relative_directory, verbose))
10388-+ (git, repo, commithash, relative_directory, verbose))
10389-
10390- multithread(git_checkout_to_directory, list_of_arg_lists)
10391-
10392diff --git a/.gitlab-ci/container/patches/build-skqp_gl.patch b/.gitlab-ci/container/patches/build-skqp_gl.patch
10393deleted file mode 100644
10394index 7467ee4..0000000
10395--- a/.gitlab-ci/container/patches/build-skqp_gl.patch
10396+++ /dev/null
10397@@ -1,41 +0,0 @@
10398-diff --git a/tools/skqp/src/skqp.cpp b/tools/skqp/src/skqp.cpp
10399-index 50ed9db01d..938217000d 100644
10400---- a/tools/skqp/src/skqp.cpp
10401-+++ b/tools/skqp/src/skqp.cpp
10402-@@ -448,7 +448,7 @@ inline void write(SkWStream* wStream, const T& text) {
10403-
10404- void SkQP::makeReport() {
10405- SkASSERT_RELEASE(fAssetManager);
10406-- int glesErrorCount = 0, vkErrorCount = 0, gles = 0, vk = 0;
10407-+ int glErrorCount = 0, glesErrorCount = 0, vkErrorCount = 0, gl = 0, gles = 0, vk = 0;
10408-
10409- if (!sk_isdir(fReportDirectory.c_str())) {
10410- SkDebugf("Report destination does not exist: '%s'\n", fReportDirectory.c_str());
10411-@@ -460,6 +460,7 @@ void SkQP::makeReport() {
10412- htmOut.writeText(kDocHead);
10413- for (const SkQP::RenderResult& run : fRenderResults) {
10414- switch (run.fBackend) {
10415-+ case SkQP::SkiaBackend::kGL: ++gl; break;
10416- case SkQP::SkiaBackend::kGLES: ++gles; break;
10417- case SkQP::SkiaBackend::kVulkan: ++vk; break;
10418- default: break;
10419-@@ -477,15 +478,17 @@ void SkQP::makeReport() {
10420- }
10421- write(&htmOut, SkStringPrintf(" f(%s);\n", str.c_str()));
10422- switch (run.fBackend) {
10423-+ case SkQP::SkiaBackend::kGL: ++glErrorCount; break;
10424- case SkQP::SkiaBackend::kGLES: ++glesErrorCount; break;
10425- case SkQP::SkiaBackend::kVulkan: ++vkErrorCount; break;
10426- default: break;
10427- }
10428- }
10429- htmOut.writeText(kDocMiddle);
10430-- write(&htmOut, SkStringPrintf("<p>gles errors: %d (of %d)</br>\n"
10431-+ write(&htmOut, SkStringPrintf("<p>gl errors: %d (of %d)</br>\n"
10432-+ "gles errors: %d (of %d)</br>\n"
10433- "vk errors: %d (of %d)</p>\n",
10434-- glesErrorCount, gles, vkErrorCount, vk));
10435-+ glErrorCount, gl, glesErrorCount, gles, vkErrorCount, vk));
10436- htmOut.writeText(kDocTail);
10437- SkFILEWStream unitOut(SkOSPath::Join(fReportDirectory.c_str(), kUnitTestReportPath).c_str());
10438- SkASSERT_RELEASE(unitOut.isValid());
10439diff --git a/.gitlab-ci/container/patches/build-skqp_include_cstdint.patch b/.gitlab-ci/container/patches/build-skqp_include_cstdint.patch
10440deleted file mode 100644
10441index 3c24b9b..0000000
10442--- a/.gitlab-ci/container/patches/build-skqp_include_cstdint.patch
10443+++ /dev/null
10444@@ -1,12 +0,0 @@
10445-diff --git a/src/sksl/SkSLString.h b/src/sksl/SkSLString.h
10446-index b3e411e..257a1ed 100644
10447---- a/src/sksl/SkSLString.h
10448-+++ b/src/sksl/SkSLString.h
10449-@@ -8,6 +8,7 @@
10450- #ifndef SKSL_STRING
10451- #define SKSL_STRING
10452-
10453-+#include <cstdint>
10454- #include <cstring>
10455-
10456- #define SKSL_USE_STD_STRING
10457diff --git a/.gitlab-ci/container/patches/build-skqp_is_clang.py.patch b/.gitlab-ci/container/patches/build-skqp_is_clang.py.patch
10458deleted file mode 100644
10459index af6f6cf..0000000
10460--- a/.gitlab-ci/container/patches/build-skqp_is_clang.py.patch
10461+++ /dev/null
10462@@ -1,13 +0,0 @@
10463-diff --git a/gn/BUILDCONFIG.gn b/gn/BUILDCONFIG.gn
10464-index 454334a..1797594 100644
10465---- a/gn/BUILDCONFIG.gn
10466-+++ b/gn/BUILDCONFIG.gn
10467-@@ -80,7 +80,7 @@ if (current_cpu == "") {
10468- is_clang = is_android || is_ios || is_mac ||
10469- (cc == "clang" && cxx == "clang++") || clang_win != ""
10470- if (!is_clang && !is_win) {
10471-- is_clang = exec_script("gn/is_clang.py",
10472-+ is_clang = exec_script("//gn/is_clang.py",
10473- [
10474- cc,
10475- cxx,
10476diff --git a/.gitlab-ci/container/patches/build-skqp_nima.patch b/.gitlab-ci/container/patches/build-skqp_nima.patch
10477deleted file mode 100644
10478index a7ad032..0000000
10479--- a/.gitlab-ci/container/patches/build-skqp_nima.patch
10480+++ /dev/null
10481@@ -1,18 +0,0 @@
10482-Nima-Cpp is not available anymore inside googlesource, revert to github one
10483-Simulates `git revert 49233d2521054037ded7d760427c4a0dc1e11356`
10484-
10485-diff --git a/DEPS b/DEPS
10486-index 7e0b941..c88b064 100644
10487---- a/DEPS
10488-+++ b/DEPS
10489-@@ -33,8 +33,8 @@ deps = {
10490- #"third_party/externals/v8" : "https://chromium.googlesource.com/v8/v8.git@5f1ae66d5634e43563b2d25ea652dfb94c31a3b4",
10491- "third_party/externals/wuffs" : "https://skia.googlesource.com/external/github.com/google/wuffs.git@fda3c4c9863d9f9fcec58ae66508c4621fc71ea5",
10492- "third_party/externals/zlib" : "https://chromium.googlesource.com/chromium/src/third_party/zlib@47af7c547f8551bd25424e56354a2ae1e9062859",
10493-- "third_party/externals/Nima-Cpp" : "https://skia.googlesource.com/external/github.com/2d-inc/Nima-Cpp.git@4bd02269d7d1d2e650950411325eafa15defb084",
10494-- "third_party/externals/Nima-Math-Cpp" : "https://skia.googlesource.com/external/github.com/2d-inc/Nima-Math-Cpp.git@e0c12772093fa8860f55358274515b86885f0108",
10495-+ "third_party/externals/Nima-Cpp" : "https://github.com/2d-inc/Nima-Cpp.git@4bd02269d7d1d2e650950411325eafa15defb084",
10496-+ "third_party/externals/Nima-Math-Cpp" : "https://github.com/2d-inc/Nima-Math-Cpp.git@e0c12772093fa8860f55358274515b86885f0108",
10497-
10498- "../src": {
10499- "url": "https://chromium.googlesource.com/chromium/src.git@ccf3465732e5d5363f0e44a8fac54550f62dd1d0",
10500diff --git a/.gitlab-ci/container/patches/weston-no-xwm.patch b/.gitlab-ci/container/patches/weston-no-xwm.patch
10501deleted file mode 100644
10502index a12057a..0000000
10503--- a/.gitlab-ci/container/patches/weston-no-xwm.patch
10504+++ /dev/null
10505@@ -1,161 +0,0 @@
10506-diff --git a/libweston/meson.build b/libweston/meson.build
10507-index d1f126f232a489daa7f96135e353c88129135436..cf7ae7ea05c1479773c31b6786d3cd2a5ffbae02 100644
10508---- a/libweston/meson.build
10509-+++ b/libweston/meson.build
10510-@@ -101,6 +101,10 @@ if get_option('backend-vnc')
10511- deps_libweston += dep_pam
10512- endif
10513-
10514-+if get_option('no-xwm-decorations')
10515-+ config_h.set('HAVE_NO_XWM_DECORATIONS', '1')
10516-+endif
10517-+
10518- lib_weston = shared_library(
10519- 'weston-@0@'.format(libweston_major),
10520- srcs_libweston,
10521-diff --git a/meson_options.txt b/meson_options.txt
10522-index 0fbd42a9ff40669391b355ce68e13b84a28e7e4b..f5d8e64cdd9c9a86faf7ae37a9701efb52e553c3 100644
10523---- a/meson_options.txt
10524-+++ b/meson_options.txt
10525-@@ -214,3 +214,9 @@ option(
10526- value: false,
10527- description: 'Generate documentation'
10528- )
10529-+option(
10530-+ 'no-xwm-decorations',
10531-+ type : 'boolean',
10532-+ value : false,
10533-+ description : 'Disable xwayland window manager decorations so cairo_xcb is unused.'
10534-+)
10535-diff --git a/xwayland/window-manager.c b/xwayland/window-manager.c
10536-index d403675227432ceab81cf09ba2191d21570b8ebc..2d196da272ac153c83bdcd0c7e132712d83662c3 100644
10537---- a/xwayland/window-manager.c
10538-+++ b/xwayland/window-manager.c
10539-@@ -665,6 +665,12 @@ weston_wm_window_get_frame_size(struct weston_wm_window *window,
10540- {
10541- struct theme *t = window->wm->theme;
10542-
10543-+#ifdef HAVE_NO_XWM_DECORATIONS
10544-+ *width = window->width;
10545-+ *height = window->height;
10546-+ return;
10547-+#endif
10548-+
10549- if (window->fullscreen) {
10550- *width = window->width;
10551- *height = window->height;
10552-@@ -683,6 +689,12 @@ weston_wm_window_get_child_position(struct weston_wm_window *window,
10553- {
10554- struct theme *t = window->wm->theme;
10555-
10556-+#ifdef HAVE_NO_XWM_DECORATIONS
10557-+ *x = 0;
10558-+ *y = 0;
10559-+ return;
10560-+#endif
10561-+
10562- if (window->fullscreen) {
10563- *x = 0;
10564- *y = 0;
10565-@@ -1096,6 +1108,9 @@ weston_wm_window_set_net_frame_extents(struct weston_wm_window *window)
10566- uint32_t property[4];
10567- int top = 0, bottom = 0, left = 0, right = 0;
10568-
10569-+ if (!window->frame)
10570-+ return;
10571-+
10572- if (!window->fullscreen)
10573- frame_decoration_sizes(window->frame, &top, &bottom, &left, &right);
10574-
10575-@@ -1159,14 +1174,17 @@ weston_wm_window_create_frame(struct weston_wm_window *window)
10576- if (window->decorate & MWM_DECOR_MINIMIZE)
10577- buttons |= FRAME_BUTTON_MINIMIZE;
10578-
10579-+ window->frame = NULL;
10580-+#ifndef HAVE_NO_XWM_DECORATIONS
10581- window->frame = frame_create(window->wm->theme,
10582- window->width, window->height,
10583- buttons, window->name, NULL);
10584-
10585- if (!window->frame)
10586- return;
10587--
10588-- frame_resize_inside(window->frame, window->width, window->height);
10589-+#endif
10590-+ if (window->frame)
10591-+ frame_resize_inside(window->frame, window->width, window->height);
10592-
10593- weston_wm_window_get_frame_size(window, &width, &height);
10594- weston_wm_window_get_child_position(window, &x, &y);
10595-@@ -1204,13 +1222,15 @@ weston_wm_window_create_frame(struct weston_wm_window *window)
10596- weston_wm_configure_window(wm, window->id,
10597- XCB_CONFIG_WINDOW_BORDER_WIDTH, values);
10598-
10599-+ window->cairo_surface = NULL;
10600-+#ifndef HAVE_NO_XWM_DECORATIONS
10601- window->cairo_surface =
10602- cairo_xcb_surface_create_with_xrender_format(wm->conn,
10603- wm->screen,
10604- window->frame_id,
10605- &wm->format_rgba,
10606- width, height);
10607--
10608-+#endif
10609- hash_table_insert(wm->window_hash, window->frame_id, window);
10610- weston_wm_window_send_configure_notify(window);
10611- }
10612-@@ -1369,6 +1389,9 @@ weston_wm_window_draw_decoration(struct weston_wm_window *window)
10613- int width, height;
10614- const char *how;
10615-
10616-+#ifdef HAVE_NO_XWM_DECORATIONS
10617-+ return;
10618-+#endif
10619- weston_wm_window_get_frame_size(window, &width, &height);
10620-
10621- cairo_xcb_surface_set_size(window->cairo_surface, width, height);
10622-@@ -1426,7 +1449,7 @@ weston_wm_window_set_pending_state(struct weston_wm_window *window)
10623- window->height + 2);
10624- }
10625-
10626-- if (window->decorate && !window->fullscreen) {
10627-+ if (window->decorate && !window->fullscreen && window->frame) {
10628- frame_input_rect(window->frame, &input_x, &input_y,
10629- &input_w, &input_h);
10630- } else {
10631-@@ -2282,7 +2305,7 @@ weston_wm_handle_button(struct weston_wm *wm, xcb_generic_event_t *event)
10632- "PRESS" : "RELEASE", button->detail);
10633-
10634- if (!wm_lookup_window(wm, button->event, &window) ||
10635-- !window->decorate)
10636-+ !window->decorate || !window->frame)
10637- return;
10638-
10639- if (button->detail != 1 && button->detail != 2)
10640-@@ -2380,7 +2403,7 @@ weston_wm_handle_motion(struct weston_wm *wm, xcb_generic_event_t *event)
10641- int cursor;
10642-
10643- if (!wm_lookup_window(wm, motion->event, &window) ||
10644-- !window->decorate)
10645-+ !window->decorate || !window->frame)
10646- return;
10647-
10648- location = frame_pointer_motion(window->frame, NULL,
10649-@@ -2401,7 +2424,7 @@ weston_wm_handle_enter(struct weston_wm *wm, xcb_generic_event_t *event)
10650- int cursor;
10651-
10652- if (!wm_lookup_window(wm, enter->event, &window) ||
10653-- !window->decorate)
10654-+ !window->decorate || !window->frame)
10655- return;
10656-
10657- location = frame_pointer_enter(window->frame, NULL,
10658-@@ -2420,7 +2443,7 @@ weston_wm_handle_leave(struct weston_wm *wm, xcb_generic_event_t *event)
10659- struct weston_wm_window *window;
10660-
10661- if (!wm_lookup_window(wm, leave->event, &window) ||
10662-- !window->decorate)
10663-+ !window->decorate || !window->frame)
10664- return;
10665-
10666- frame_pointer_leave(window->frame, NULL);
10667diff --git a/.gitlab-ci/container/setup-rootfs.sh b/.gitlab-ci/container/setup-rootfs.sh
10668deleted file mode 100755
10669index 0ba816b..0000000
10670--- a/.gitlab-ci/container/setup-rootfs.sh
10671+++ /dev/null
10672@@ -1,23 +0,0 @@
10673-#!/usr/bin/env bash
10674-# shellcheck disable=SC1091 # The relative paths in this file only become valid at runtime.
10675-# When changing this file, you need to bump the following
10676-# .gitlab-ci/image-tags.yml tags:
10677-# DEBIAN_TEST_GL_TAG
10678-# DEBIAN_TEST_VIDEO_TAG
10679-# DEBIAN_TEST_VK_TAG
10680-
10681-set -eux -o pipefail
10682-
10683-passwd root -d
10684-chsh -s /bin/sh
10685-
10686-cat > /init <<EOF
10687-#!/bin/sh
10688-export PS1=lava-shell:
10689-exec sh
10690-EOF
10691-chmod +x /init
10692-
10693-# Copy timezone file and remove tzdata package
10694-rm -rf /etc/localtime
10695-cp /usr/share/zoneinfo/Etc/UTC /etc/localtime
10696diff --git a/.gitlab-ci/container/setup-wine.sh b/.gitlab-ci/container/setup-wine.sh
10697deleted file mode 100755
10698index 4eb3f3a..0000000
10699--- a/.gitlab-ci/container/setup-wine.sh
10700+++ /dev/null
10701@@ -1,30 +0,0 @@
10702-#!/usr/bin/env bash
10703-
10704-set -u
10705-
10706-section_start wine "Setting up Wine"
10707-
10708-export WINEPREFIX="$1"
10709-export WINEDEBUG="-all"
10710-
10711-# We don't want crash dialogs
10712-cat >crashdialog.reg <<EOF
10713-Windows Registry Editor Version 5.00
10714-
10715-[HKEY_CURRENT_USER\Software\Wine\WineDbg]
10716-"ShowCrashDialog"=dword:00000000
10717-
10718-EOF
10719-
10720-# Set the wine prefix and disable the crash dialog
10721-wine regedit crashdialog.reg
10722-rm crashdialog.reg
10723-
10724-# An immediate wine command may fail with: "${WINEPREFIX}: Not a
10725-# valid wine prefix." and that is just spit because of checking
10726-# the existance of the system.reg file, which fails. Just giving
10727-# it a bit more of time for it to be created solves the problem
10728-# ...
10729-while ! test -f "${WINEPREFIX}/system.reg"; do sleep 1; done
10730-
10731-section_end wine
10732diff --git a/.gitlab-ci/container/strip-rootfs.sh b/.gitlab-ci/container/strip-rootfs.sh
10733deleted file mode 100644
10734index 70df62b..0000000
10735--- a/.gitlab-ci/container/strip-rootfs.sh
10736+++ /dev/null
10737@@ -1,163 +0,0 @@
10738-#!/usr/bin/env bash
10739-# Strip the image to a small minimal system.
10740-# When changing this file, you need to bump the following
10741-# .gitlab-ci/image-tags.yml tags:
10742-# DEBIAN_TEST_ANDROID_TAG
10743-# DEBIAN_TEST_GL_TAG
10744-# DEBIAN_TEST_VIDEO_TAG
10745-# DEBIAN_TEST_VK_TAG
10746-set -ex
10747-
10748-section_start strip-rootfs "Stripping rootfs"
10749-
10750-export DEBIAN_FRONTEND=noninteractive
10751-
10752-UNNEEDED_PACKAGES=(
10753- libfdisk1 git
10754- python3-dev python3-pip python3-setuptools python3-wheel
10755-)
10756-
10757-# Removing unused packages
10758-for PACKAGE in "${UNNEEDED_PACKAGES[@]}"
10759-do
10760- if ! apt-get remove --purge --yes "${PACKAGE}"
10761- then
10762- echo "WARNING: ${PACKAGE} isn't installed"
10763- fi
10764-done
10765-
10766-apt-get autoremove --yes || true
10767-
10768-UNNEEDED_PACKAGES=(
10769- apt libapt-pkg6.0
10770- ncurses-bin ncurses-base libncursesw6 libncurses6
10771- perl-base libperl5.36 perl-modules-5.36
10772- debconf libdebconfclient0
10773- e2fsprogs e2fslibs libfdisk1
10774- insserv
10775- udev
10776- init-system-helpers
10777- cpio
10778- libsemanage1 libsemanage-common
10779- libsepol1
10780- gpgv
10781- hostname
10782- adduser
10783- debian-archive-keyring
10784- libgl1-mesa-dri mesa-vulkan-drivers mesa-va-drivers mesa-vdpau-drivers i965-va-driver
10785- intel-media-va-driver
10786- gnupg2
10787- qemu-user
10788-)
10789-
10790-# Removing unneeded packages
10791-for PACKAGE in "${UNNEEDED_PACKAGES[@]}"
10792-do
10793- if ! dpkg --purge --force-remove-essential --force-depends "${PACKAGE}"
10794- then
10795- echo "WARNING: ${PACKAGE} isn't installed"
10796- fi
10797-done
10798-
10799-# Show what's left package-wise before dropping dpkg itself
10800-COLUMNS=300 dpkg-query -W --showformat='${Installed-Size;10}\t${Package}\n' | sort -k1,1n
10801-
10802-# Drop dpkg
10803-dpkg --purge --force-remove-essential --force-depends dpkg
10804-
10805-# directories for a removal
10806-
10807-directories=(
10808- /var/log/* # logs
10809- /usr/share/doc/* # docs, i18n, etc.
10810- /usr/share/locale/*
10811- /usr/share/X11/locale/*
10812- /usr/share/man
10813- /usr/share/i18n/*
10814- /usr/share/info/*
10815- /usr/share/lintian/*
10816- /usr/share/common-licenses/*
10817- /usr/share/mime/*
10818- /usr/share/bug
10819- /lib/udev/hwdb.bin # udev hwdb not required on a stripped system
10820- /lib/udev/hwdb.d/*
10821- /usr/bin/iconv # gconv conversions && binaries
10822- /usr/sbin/iconvconfig
10823- /usr/lib/*/gconv/
10824- /usr/sbin/update-usbids # libusb db
10825- /usr/share/misc/usb.ids
10826- /var/lib/usbutils/usb.ids
10827- /root/.pip # pip cache
10828- /root/.cache
10829- /root/.cargo
10830- /etc/apt # configuration archives of apt and dpkg
10831- /etc/dpkg
10832- /var/* # drop non-ostree directories
10833- /srv
10834- /share
10835- /usr/share/ca-certificates # certificates are in /etc
10836- /usr/share/bash-completion # completions
10837- /usr/share/zsh/vendor-completions
10838- /usr/share/gcc # gcc python helpers
10839- /etc/inid.d # sysvinit leftovers
10840- /etc/rc[0-6S].d
10841- /etc/init
10842- /usr/lib/lsb
10843- /usr/lib/xtables # xtrables helpers
10844- /usr/lib/locale/* # should we keep C locale?
10845- /usr/sbin/*fdisk # partitioning
10846- /usr/bin/localedef # local compiler
10847- /usr/sbin/ldconfig* # only needed when adding libs
10848- /usr/games
10849- /usr/lib/*/security/pam_userdb.so # Remove pam module to authenticate against a DB
10850- /usr/lib/*/libdb-5.3.so # libdb-5.3.so that is only used by this pam module ^
10851- /usr/lib/*/libnss_hesiod* # remove NSS support for nis, nisplus and hesiod
10852- /usr/lib/*/libnss_nis*
10853- /usr/lib/*/wine # don't need Wine's implementation, using Proton instead
10854- /usr/local/bin/mold
10855- /usr/local/bin/bindgen
10856- /usr/local/bin/cargo*
10857- /usr/local/bin/clippy*
10858- /usr/local/bin/rust*
10859- /usr/local/bin/rls
10860- /usr/lib/*/dri
10861-)
10862-
10863-for directory in "${directories[@]}"; do
10864- rm -rf "$directory" || echo "Failed to remove $directory! Update scripts!"
10865-done
10866-
10867-files=(
10868- '*systemd-resolve*' # systemd dns resolver
10869- '*networkd*' # systemd network configuration
10870- '*timesyncd*' # systemd ntp
10871- 'systemd-hwdb*' # systemd hw database
10872- '*fuse*' # FUSE
10873-)
10874-
10875-for files in "${files[@]}"; do
10876- find /usr /etc -name "$files" -prune -exec rm -r {} \;
10877-done
10878-
10879-# We purge apt and dpkg to save on space, which is great for runtime and
10880-# bandwidth use etc, but less great for cbuild which wants to run apt-get clean
10881-# when we're done. Install a stub which works for that and is apologetic for
10882-# anyone else.
10883-cat >/usr/bin/apt-get <<EOF
10884-#!/bin/bash
10885-
10886-if [ "\${1:-}" != "clean" ]; then
10887- echo "Couldn't run '\$0 \$*', because apt has been cleaned from this container."
10888- echo ""
10889- echo "After .gitlab-ci/container/strip-rootfs.sh has run, you cannot install"
10890- echo "new packages."
10891- echo ""
10892- echo "Sorry."
10893- exit 1
10894-fi
10895-EOF
10896-
10897-chmod +x /usr/bin/apt-get
10898-ln -s /usr/bin/apt-get /usr/bin/apt
10899-
10900-section_end strip-rootfs
10901diff --git a/.gitlab-ci/container/windows/gitlab-ci.yml b/.gitlab-ci/container/windows/gitlab-ci.yml
10902deleted file mode 100644
10903index 4ee6e62..0000000
10904--- a/.gitlab-ci/container/windows/gitlab-ci.yml
10905+++ /dev/null
10906@@ -1,110 +0,0 @@
10907-# Native Windows docker builds
10908-#
10909-# Unlike the above Linux-based builds - including MinGW builds which
10910-# cross-compile for Windows - which use the freedesktop ci-templates, we
10911-# cannot use the same scheme here. As Windows lacks support for
10912-# Docker-in-Docker, and Podman does not run natively on Windows, we have
10913-# to open-code much of the same ourselves.
10914-#
10915-# This is achieved by first running in a native Windows shell instance
10916-# (host PowerShell) in the container stage to build and push the image,
10917-# then in the build stage by executing inside Docker.
10918-
10919-.windows-docker-msvc:
10920- variables:
10921- MESA_IMAGE: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${MESA_IMAGE_TAG}"
10922- MESA_UPSTREAM_IMAGE: "$CI_REGISTRY/$FDO_UPSTREAM_REPO/$MESA_IMAGE_PATH:${MESA_IMAGE_TAG}"
10923- extends:
10924- - .windows-docker-tags
10925-
10926-.windows_container_build:
10927- inherit:
10928- default: [retry]
10929- extends:
10930- - .container
10931- - .windows-docker-msvc
10932- - .windows-shell-tags
10933- rules:
10934- - !reference [.common-rules, rules]
10935- - !reference [.microsoft-farm-container-rules, rules]
10936- - !reference [.container-rules, rules]
10937- variables:
10938- GIT_STRATEGY: fetch # we do actually need the full repository though
10939- MESA_BASE_IMAGE: None
10940- before_script: null # remove .container before_script as it's unix-only
10941- script:
10942- - .\.gitlab-ci\windows\mesa_container.ps1 $CI_REGISTRY $CI_REGISTRY_USER $CI_REGISTRY_PASSWORD $MESA_IMAGE $MESA_UPSTREAM_IMAGE ${DOCKERFILE} ${MESA_BASE_IMAGE}
10943-
10944-windows_msvc:
10945- inherit:
10946- default: [retry]
10947- extends:
10948- - .windows_container_build
10949- variables:
10950- MESA_IMAGE_PATH: &windows_msvc_image_path "windows/x86_64_msvc"
10951- MESA_IMAGE_TAG: ${WINDOWS_X64_MSVC_TAG}
10952- DOCKERFILE: Dockerfile_msvc
10953- MESA_BASE_IMAGE: "mcr.microsoft.com/windows/server:ltsc2022"
10954-
10955-windows_build_msvc:
10956- inherit:
10957- default: [retry]
10958- extends:
10959- - .windows_container_build
10960- rules:
10961- - !reference [.common-rules, rules]
10962- - !reference [.microsoft-farm-rules, rules]
10963- - !reference [.container-rules, rules]
10964- variables:
10965- MESA_IMAGE_PATH: &windows_build_image_path "windows/x86_64_build"
10966- MESA_IMAGE_TAG: &windows_build_image_tag ${WINDOWS_X64_MSVC_TAG}--${WINDOWS_X64_BUILD_TAG}
10967- DOCKERFILE: Dockerfile_build
10968- MESA_BASE_IMAGE_PATH: *windows_msvc_image_path
10969- MESA_BASE_IMAGE: "$CI_REGISTRY_IMAGE/${MESA_BASE_IMAGE_PATH}:${WINDOWS_X64_MSVC_TAG}"
10970- timeout: 2h 30m # LLVM takes ages
10971- needs:
10972- - job: windows_msvc
10973- optional: true
10974-
10975-windows_test_msvc:
10976- inherit:
10977- default: [retry]
10978- extends:
10979- - .windows_container_build
10980- rules:
10981- - !reference [.common-rules, rules]
10982- - !reference [.microsoft-farm-rules, rules]
10983- - !reference [.container-rules, rules]
10984- variables:
10985- MESA_IMAGE_PATH: &windows_test_image_path "windows/x86_64_test"
10986- MESA_IMAGE_TAG: &windows_test_image_tag ${WINDOWS_X64_MSVC_TAG}--${WINDOWS_X64_TEST_TAG}
10987- DOCKERFILE: Dockerfile_test
10988- MESA_BASE_IMAGE_PATH: *windows_msvc_image_path
10989- MESA_BASE_IMAGE: "$CI_REGISTRY_IMAGE/${MESA_BASE_IMAGE_PATH}:${WINDOWS_X64_MSVC_TAG}"
10990- timeout: 2h 30m
10991- needs:
10992- - job: windows_msvc
10993- optional: true
10994-
10995-.use-windows_build_msvc:
10996- inherit:
10997- default: [retry]
10998- extends: .windows-docker-msvc
10999- image: "$MESA_IMAGE"
11000- variables:
11001- MESA_IMAGE_PATH: *windows_build_image_path
11002- MESA_IMAGE_TAG: *windows_build_image_tag
11003- needs:
11004- - job: sanity
11005- optional: true
11006- - job: windows_build_msvc
11007- optional: true
11008-
11009-.use-windows_test_msvc:
11010- inherit:
11011- default: [retry]
11012- extends: .windows-docker-msvc
11013- image: "$MESA_IMAGE"
11014- variables:
11015- MESA_IMAGE_PATH: *windows_test_image_path
11016- MESA_IMAGE_TAG: *windows_test_image_tag
11017diff --git a/.gitlab-ci/create-llvm-meson-wrap-file.sh b/.gitlab-ci/create-llvm-meson-wrap-file.sh
11018deleted file mode 100755
11019index f586875..0000000
11020--- a/.gitlab-ci/create-llvm-meson-wrap-file.sh
11021+++ /dev/null
11022@@ -1,42 +0,0 @@
11023-#!/usr/bin/env bash
11024-
11025-set -exu
11026-
11027-# Early check for required env variables, relies on `set -u`
11028-: "$ANDROID_LLVM_ARTIFACT_NAME"
11029-
11030-# if DEST_DIR is not set, assing an empty value, this prevents -u to fail
11031-: "${DEST_DIR:=}"
11032-
11033-# TODO, check if meson can do the download and wrap file generation for us.
11034-
11035-LLVM_INSTALL_PREFIX="${DEST_DIR}/${ANDROID_LLVM_ARTIFACT_NAME}"
11036-
11037-if [ ! -d "$LLVM_INSTALL_PREFIX" ]; then
11038- echo "Cannot find an LLVM build in $LLVM_INSTALL_PREFIX" 1>&2
11039- exit 1
11040-fi
11041-
11042-mkdir -p subprojects/llvm
11043-
11044-cat << EOF > subprojects/llvm/meson.build
11045-project('llvm', ['cpp'])
11046-
11047-cpp = meson.get_compiler('cpp')
11048-
11049-_deps = []
11050-_search = join_paths('$LLVM_INSTALL_PREFIX', 'lib')
11051-
11052-foreach d: ['libLLVMAggressiveInstCombine', 'libLLVMAnalysis', 'libLLVMAsmParser', 'libLLVMAsmPrinter', 'libLLVMBinaryFormat', 'libLLVMBitReader', 'libLLVMBitstreamReader', 'libLLVMBitWriter', 'libLLVMCFGuard', 'libLLVMCFIVerify', 'libLLVMCodeGen', 'libLLVMCodeGenTypes', 'libLLVMCore', 'libLLVMCoroutines', 'libLLVMCoverage', 'libLLVMDebugInfoBTF', 'libLLVMDebugInfoCodeView', 'libLLVMDebuginfod', 'libLLVMDebugInfoDWARF', 'libLLVMDebugInfoGSYM', 'libLLVMDebugInfoLogicalView', 'libLLVMDebugInfoMSF', 'libLLVMDebugInfoPDB', 'libLLVMDemangle', 'libLLVMDiff', 'libLLVMDlltoolDriver', 'libLLVMDWARFLinker', 'libLLVMDWARFLinkerClassic', 'libLLVMDWARFLinkerParallel', 'libLLVMDWP', 'libLLVMExecutionEngine', 'libLLVMExegesis', 'libLLVMExegesisX86', 'libLLVMExtensions', 'libLLVMFileCheck', 'libLLVMFrontendDriver', 'libLLVMFrontendHLSL', 'libLLVMFrontendOffloading', 'libLLVMFrontendOpenACC', 'libLLVMFrontendOpenMP', 'libLLVMFuzzerCLI', 'libLLVMFuzzMutate', 'libLLVMGlobalISel', 'libLLVMHipStdPar', 'libLLVMInstCombine', 'libLLVMInstrumentation', 'libLLVMInterfaceStub', 'libLLVMInterpreter', 'libLLVMipo', 'libLLVMIRPrinter', 'libLLVMIRReader', 'libLLVMJITLink', 'libLLVMLibDriver', 'libLLVMLineEditor', 'libLLVMLinker', 'libLLVMLTO', 'libLLVMMC', 'libLLVMMCA', 'libLLVMMCDisassembler', 'libLLVMMCJIT', 'libLLVMMCParser', 'libLLVMMIRParser', 'libLLVMObjCARCOpts', 'libLLVMObjCopy', 'libLLVMObject', 'libLLVMObjectYAML', 'libLLVMOption', 'libLLVMOrcDebugging', 'libLLVMOrcJIT', 'libLLVMOrcShared', 'libLLVMOrcTargetProcess', 'libLLVMPasses', 'libLLVMProfileData', 'libLLVMRemarks', 'libLLVMRuntimeDyld', 'libLLVMScalarOpts', 'libLLVMSelectionDAG', 'libLLVMSupport', 'libLLVMSymbolize', 'libLLVMTableGen', 'libLLVMTableGenCommon', 'libLLVMTarget', 'libLLVMTargetParser', 'libLLVMTextAPI', 'libLLVMTextAPIBinaryReader', 'libLLVMTransformUtils', 'libLLVMVectorize', 'libLLVMWindowsDriver', 'libLLVMWindowsManifest', 'libLLVMX86AsmParser', 'libLLVMX86CodeGen', 'libLLVMX86Desc', 'libLLVMX86Disassembler', 'libLLVMX86Info', 'libLLVMX86TargetMCA', 'libLLVMXRay']
11053- _deps += cpp.find_library(d, dirs : _search)
11054-endforeach
11055-
11056-dep_llvm = declare_dependency(
11057- include_directories : include_directories('$LLVM_INSTALL_PREFIX/include'),
11058- dependencies : _deps,
11059- version : '$(sed -n -e 's/^#define LLVM_VERSION_STRING "\([^"]*\)".*/\1/p' "${LLVM_INSTALL_PREFIX}/include/llvm/Config/llvm-config.h" )',
11060-)
11061-
11062-has_rtti = false
11063-irbuilder_h = files('$LLVM_INSTALL_PREFIX/include/llvm/IR/IRBuilder.h')
11064-EOF
11065diff --git a/.gitlab-ci/cross-xfail-ppc64el b/.gitlab-ci/cross-xfail-ppc64el
11066deleted file mode 100644
11067index e077aa1..0000000
11068--- a/.gitlab-ci/cross-xfail-ppc64el
11069+++ /dev/null
11070@@ -1 +0,0 @@
11071-lp_test_arit
11072diff --git a/.gitlab-ci/cross-xfail-s390x b/.gitlab-ci/cross-xfail-s390x
11073deleted file mode 100644
11074index 3c3c8ac..0000000
11075--- a/.gitlab-ci/cross-xfail-s390x
11076+++ /dev/null
11077@@ -1 +0,0 @@
11078-lp_test_format
11079diff --git a/.gitlab-ci/crosvm-init.sh b/.gitlab-ci/crosvm-init.sh
11080deleted file mode 100755
11081index c4446bf..0000000
11082--- a/.gitlab-ci/crosvm-init.sh
11083+++ /dev/null
11084@@ -1,46 +0,0 @@
11085-#!/usr/bin/env bash
11086-# shellcheck disable=SC1091 # The relative paths in this file only become valid at runtime.
11087-# shellcheck disable=SC2086 # we want word splitting
11088-set -e
11089-
11090-VSOCK_STDOUT=$1
11091-VSOCK_STDERR=$2
11092-VM_TEMP_DIR=$3
11093-
11094-mount -t proc none /proc
11095-mount -t sysfs none /sys
11096-mkdir -p /dev/pts
11097-mount -t devpts devpts /dev/pts
11098-mkdir /dev/shm
11099-mount -t tmpfs -o noexec,nodev,nosuid tmpfs /dev/shm
11100-mount -t tmpfs tmpfs /tmp
11101-
11102-. ${VM_TEMP_DIR}/crosvm-env.sh
11103-. ${VM_TEMP_DIR}/setup-test-env.sh
11104-
11105-# .gitlab-ci.yml script variable is using relative paths to install directory,
11106-# so change to that dir before running `crosvm-script`
11107-cd "${CI_PROJECT_DIR}"
11108-
11109-# The exception is the dEQP binary, as it needs to run from its own directory
11110-[ -z "${DEQP_BIN_DIR}" ] || cd "${DEQP_BIN_DIR}"
11111-
11112-# Use a FIFO to collect relevant error messages
11113-STDERR_FIFO=/tmp/crosvm-stderr.fifo
11114-mkfifo -m 600 ${STDERR_FIFO}
11115-
11116-dmesg --level crit,err,warn -w > ${STDERR_FIFO} &
11117-DMESG_PID=$!
11118-
11119-# Transfer the errors and crosvm-script output via a pair of virtio-vsocks
11120-socat -d -u pipe:${STDERR_FIFO} vsock-listen:${VSOCK_STDERR} &
11121-socat -d -U vsock-listen:${VSOCK_STDOUT} \
11122- system:"stdbuf -eL bash ${VM_TEMP_DIR}/crosvm-script.sh 2> ${STDERR_FIFO}; echo \$? > ${VM_TEMP_DIR}/exit_code",nofork
11123-
11124-kill ${DMESG_PID}
11125-wait
11126-
11127-sync
11128-poweroff -d -n -f || true
11129-
11130-sleep 1 # Just in case init would exit before the kernel shuts down the VM
11131diff --git a/.gitlab-ci/crosvm-runner.sh b/.gitlab-ci/crosvm-runner.sh
11132deleted file mode 100755
11133index 0b3b514..0000000
11134--- a/.gitlab-ci/crosvm-runner.sh
11135+++ /dev/null
11136@@ -1,169 +0,0 @@
11137-#!/usr/bin/env bash
11138-# shellcheck disable=SC2086 # we want word splitting
11139-# shellcheck disable=SC1091 # paths only become valid at runtime
11140-
11141-. "${SCRIPTS_DIR}/setup-test-env.sh"
11142-
11143-set -ue
11144-
11145-if [ -z "$CROSVM_TAG" ]; then
11146- echo "CROSVM_TAG must be set to the conditional build tag"
11147- exit 1
11148-fi
11149-
11150-# Are we using the right crosvm version?
11151-ci_tag_test_time_check "CROSVM_TAG"
11152-
11153-# Instead of starting one dEQP instance per available CPU core, pour our
11154-# concurrency at llvmpipe threads instead. This is mostly useful for VirGL and
11155-# Venus, which serialise quite a bit at the host level. So instead of smashing
11156-# it with a pile of concurrent jobs which don't actually parallelise very well,
11157-# we use that concurrency for llvmpipe/lavapipe's render pipeline.
11158-if [ -n "${PARALLELISE_VIA_LP_THREADS:-}" ]; then
11159- export LP_NUM_THREADS="${FDO_CI_CONCURRENT:-4}"
11160- export FDO_CI_CONCURRENT=1
11161-fi
11162-
11163-# If run outside of a deqp-runner invoction (e.g. piglit trace replay), then act
11164-# the same as the first thread in its threadpool.
11165-THREAD=${DEQP_RUNNER_THREAD:-0}
11166-
11167-#
11168-# Helper to generate CIDs for virtio-vsock based communication with processes
11169-# running inside crosvm guests.
11170-#
11171-# A CID is a 32-bit Context Identifier to be assigned to a crosvm instance
11172-# and must be unique across the host system. For this purpose, let's take
11173-# the least significant 25 bits from CI_JOB_ID as a base and generate a 7-bit
11174-# prefix number to handle up to 128 concurrent crosvm instances per job runner.
11175-#
11176-# As a result, the following variables are set:
11177-# - VSOCK_CID: the crosvm unique CID to be passed as a run argument
11178-#
11179-# - VSOCK_STDOUT, VSOCK_STDERR: the port numbers the guest should accept
11180-# vsock connections on in order to transfer output messages
11181-#
11182-# - VM_TEMP_DIR: the temporary directory path used to pass additional
11183-# context data towards the guest
11184-#
11185-set_vsock_context() {
11186- [ -n "${CI_JOB_ID:-}" ] || {
11187- echo "Missing or unset CI_JOB_ID env variable" >&2
11188- exit 1
11189- }
11190-
11191- VM_TEMP_DIR="/tmp-vm.${THREAD}"
11192- # Clear out any leftover files from a previous run.
11193- rm -rf $VM_TEMP_DIR
11194- mkdir $VM_TEMP_DIR || return 1
11195-
11196- VSOCK_CID=$(((CI_JOB_ID & 0x1ffffff) | ((THREAD & 0x7f) << 25)))
11197- VSOCK_STDOUT=5001
11198- VSOCK_STDERR=5002
11199-
11200- return 0
11201-}
11202-
11203-# The dEQP binary needs to run from the directory it's in
11204-if [ -n "${1##*.sh}" ] && [ -z "${1##*"deqp"*}" ]; then
11205- DEQP_BIN_DIR=$(dirname "$1")
11206- export DEQP_BIN_DIR
11207-fi
11208-
11209-VM_SOCKET=crosvm-${THREAD}.sock
11210-
11211-# Terminate any existing crosvm, if a previous invocation of this shell script
11212-# was terminated due to timeouts. This "vm stop" may fail if the crosvm died
11213-# without cleaning itself up.
11214-if [ -e $VM_SOCKET ]; then
11215- crosvm stop $VM_SOCKET || true
11216- # Wait for socats from that invocation to drain
11217- sleep 5
11218- rm -rf $VM_SOCKET || true
11219-fi
11220-
11221-set_vsock_context || { echo "Could not generate crosvm vsock CID" >&2; exit 1; }
11222-
11223-# Securely pass the current variables to the crosvm environment
11224-section_start variables "Environment variables passed through to VM:"
11225-SCRIPTS_DIR=$(readlink -en "${0%/*}")
11226-filter_env_vars | tee ${VM_TEMP_DIR}/crosvm-env.sh
11227-cp ${SCRIPTS_DIR}/setup-test-env.sh ${VM_TEMP_DIR}/setup-test-env.sh
11228-section_end variables
11229-
11230-# Set the crosvm-script as the arguments of the current script
11231-{
11232- echo "export SCRIPTS_DIR=${SCRIPTS_DIR}"
11233- echo "export RESULTS_DIR=${RESULTS_DIR}"
11234- echo ". ${VM_TEMP_DIR}/setup-test-env.sh"
11235- echo "$@"
11236-} > ${VM_TEMP_DIR}/crosvm-script.sh
11237-
11238-# Setup networking
11239-/usr/sbin/iptables-legacy -w -t nat -A POSTROUTING -o eth0 -j MASQUERADE
11240-echo 1 > /proc/sys/net/ipv4/ip_forward
11241-
11242-# Start background processes to receive output from guest
11243-socat -u vsock-connect:${VSOCK_CID}:${VSOCK_STDERR},retry=200,interval=0.1 stderr &
11244-socat -u vsock-connect:${VSOCK_CID}:${VSOCK_STDOUT},retry=200,interval=0.1 stdout &
11245-
11246-# Prepare to start crosvm
11247-unset DISPLAY
11248-unset XDG_RUNTIME_DIR
11249-
11250-CROSVM_KERN_ARGS="quiet console=null root=my_root rw rootfstype=virtiofs ip=192.168.30.2::192.168.30.1:255.255.255.0:crosvm:eth0"
11251-CROSVM_KERN_ARGS="${CROSVM_KERN_ARGS} init=${SCRIPTS_DIR}/crosvm-init.sh -- ${VSOCK_STDOUT} ${VSOCK_STDERR} ${VM_TEMP_DIR}"
11252-
11253-[ "${CROSVM_GALLIUM_DRIVER:-}" = "llvmpipe" ] && \
11254- CROSVM_LIBGL_ALWAYS_SOFTWARE=true || CROSVM_LIBGL_ALWAYS_SOFTWARE=false
11255-
11256-set +e
11257-
11258-if [ "${INSIDE_DEQP_RUNNER:-}" != "true" ]
11259-then
11260- set -x
11261-fi
11262-
11263-section_start kernel "Downloading kernel image"
11264-if [ ! -f "/kernel/${KERNEL_IMAGE_NAME:-bzImage}" ]; then
11265- mkdir -p /kernel
11266- # shellcheck disable=SC2153
11267- curl -L --retry 4 -f --retry-all-errors --retry-delay 30 \
11268- -o "/kernel/${KERNEL_IMAGE_NAME:-bzImage}" "${KERNEL_IMAGE_BASE}/${DEBIAN_ARCH:-amd64}/${KERNEL_IMAGE_NAME:-bzImage}"
11269-fi
11270-section_end kernel
11271-
11272-# We aren't testing the host driver here, so we don't need to validate NIR on the host
11273-NIR_DEBUG="novalidate" \
11274-LIBGL_ALWAYS_SOFTWARE=${CROSVM_LIBGL_ALWAYS_SOFTWARE:-} \
11275-GALLIUM_DRIVER=${CROSVM_GALLIUM_DRIVER:-} \
11276-VK_DRIVER_FILES=$CI_PROJECT_DIR/install/share/vulkan/icd.d/${CROSVM_VK_DRIVER:-}_icd.x86_64.json \
11277-crosvm --no-syslog run \
11278- --gpu "${CROSVM_GPU_ARGS:-}" --gpu-render-server "path=${VIRGL_RENDER_SERVER:-/usr/local/libexec/virgl_render_server}" \
11279- -m "${CROSVM_MEMORY:-4096}" -c "${CROSVM_CPU:-2}" --disable-sandbox \
11280- --shared-dir /:my_root:type=fs:writeback=true:timeout=60:cache=always \
11281- --net "host-ip=192.168.30.1,netmask=255.255.255.0,mac=AA:BB:CC:00:00:12" \
11282- -s $VM_SOCKET \
11283- --cid ${VSOCK_CID} -p "${CROSVM_KERN_ARGS}" \
11284- /kernel/${KERNEL_IMAGE_NAME:-bzImage} > ${VM_TEMP_DIR}/crosvm 2>&1
11285-
11286-section_start crosvm_results "Processing crosvm results"
11287-CROSVM_RET=$?
11288-
11289-[ ${CROSVM_RET} -eq 0 ] && {
11290- # The actual return code is the crosvm guest script's exit code
11291- CROSVM_RET=$(cat ${VM_TEMP_DIR}/exit_code 2>/dev/null)
11292- # Force error when the guest script's exit code is not available
11293- CROSVM_RET=${CROSVM_RET:-1}
11294-}
11295-
11296-# Show crosvm output on error to help with debugging
11297-[ ${CROSVM_RET} -eq 0 ] || {
11298- { set +x; } 2>/dev/null
11299- echo "Dumping crosvm output.." >&2
11300- cat ${VM_TEMP_DIR}/crosvm >&2
11301- set -x
11302-}
11303-section_end crosvm_results
11304-
11305-exit ${CROSVM_RET}
11306diff --git a/.gitlab-ci/cuttlefish-runner.sh b/.gitlab-ci/cuttlefish-runner.sh
11307deleted file mode 100755
11308index 5bcf18c..0000000
11309--- a/.gitlab-ci/cuttlefish-runner.sh
11310+++ /dev/null
11311@@ -1,93 +0,0 @@
11312-#!/usr/bin/env bash
11313-# shellcheck disable=SC2086 # we want word splitting
11314-# shellcheck disable=SC1091 # paths only become valid at runtime
11315-
11316-. "${SCRIPTS_DIR}/setup-test-env.sh"
11317-
11318-set -uex
11319-
11320-section_start cuttlefish_setup "cuttlefish: setup"
11321-
11322-# Structured tagging check for angle
11323-if [ -n "${ANGLE_TAG:-}" ]; then
11324- # Bail out if the ANGLE_TAG differs from what is offered in the system
11325- ci_tag_test_time_check "ANGLE_TAG"
11326-fi
11327-
11328-export PATH=/cuttlefish/bin:$PATH
11329-export LD_LIBRARY_PATH=/cuttlefish/lib64:${CI_PROJECT_DIR}/install/lib:${LD_LIBRARY_PATH:-}
11330-
11331-# Pick up a vulkan driver
11332-ARCH=$(uname -m)
11333-export VK_DRIVER_FILES=${CI_PROJECT_DIR}/install/share/vulkan/icd.d/${VK_DRIVER}_icd.$ARCH.json
11334-
11335-syslogd
11336-
11337-chown root:kvm /dev/kvm
11338-
11339-pushd /cuttlefish
11340-
11341-# Add a function to perform some tasks when exiting the script
11342-function my_atexit()
11343-{
11344- section_switch cuttlefish_stop "cuttlefish: stop + storing logs"
11345- set -x
11346- set +e # Be resilient and get logs even if stop_cvd fails
11347-
11348- # shellcheck disable=SC2317
11349- HOME=/cuttlefish stop_cvd -wait_for_launcher=40
11350-
11351- # shellcheck disable=SC2317
11352- cp /cuttlefish/cuttlefish/instances/cvd-1/logs/logcat $RESULTS_DIR
11353- # shellcheck disable=SC2317
11354- cp /cuttlefish/cuttlefish/instances/cvd-1/kernel.log $RESULTS_DIR
11355- # shellcheck disable=SC2317
11356- cp /cuttlefish/cuttlefish/instances/cvd-1/logs/launcher.log $RESULTS_DIR
11357-
11358- set -e
11359- set +x
11360- section_end cuttlefish_stop
11361-}
11362-
11363-# stop cuttlefish if the script ends prematurely or is interrupted
11364-trap 'my_atexit' EXIT
11365-trap 'exit 2' HUP INT PIPE TERM
11366-
11367-ulimit -n 32768
11368-
11369-VSOCK_BASE=10000 # greater than all the default vsock ports
11370-VSOCK_CID=$((VSOCK_BASE + (CI_JOB_ID & 0xfff)))
11371-
11372-HOME=/cuttlefish timeout 5m launch_cvd \
11373- -daemon \
11374- -verbosity=INFO \
11375- -file_verbosity=VERBOSE \
11376- -vsock_guest_cid=$VSOCK_CID \
11377- -enable_audio=false \
11378- -enable_bootanimation=false \
11379- -enable_minimal_mode=true \
11380- -enable_modem_simulator=false \
11381- -enable_wifi=false \
11382- -guest_enforce_security=false \
11383- -report_anonymous_usage_stats=no \
11384- -gpu_mode="$CUTTLEFISH_GPU_MODE" \
11385- -cpus=${FDO_CI_CONCURRENT:-4} \
11386- -memory_mb ${CUTTLEFISH_MEMORY:-4096}
11387-
11388-sleep 1
11389-
11390-popd
11391-
11392-# download Android Mesa from S3
11393-curl-with-retry -O "${FDO_HTTP_CACHE_URI:-}https://${PIPELINE_ARTIFACTS_BASE}/${S3_ANDROID_ARTIFACT_NAME}.tar.zst"
11394-mkdir /mesa-android
11395-tar -C /mesa-android -xf ${S3_ANDROID_ARTIFACT_NAME}.tar.zst
11396-
11397-# shellcheck disable=SC2034 # used externally
11398-INSTALL="/mesa-android/install"
11399-
11400-# shellcheck disable=SC2034 # used externally
11401-ADB=adb
11402-
11403-# The script exits with the appropriate exit code
11404-. "$(dirname "$0")/android-runner.sh"
11405diff --git a/.gitlab-ci/deqp-runner.sh b/.gitlab-ci/deqp-runner.sh
11406deleted file mode 100755
11407index d8f13f7..0000000
11408--- a/.gitlab-ci/deqp-runner.sh
11409+++ /dev/null
11410@@ -1,233 +0,0 @@
11411-#!/usr/bin/env bash
11412-# shellcheck disable=SC2086 # we want word splitting
11413-# shellcheck disable=SC1091 # paths only become valid at runtime
11414-
11415-. "${SCRIPTS_DIR}/setup-test-env.sh"
11416-
11417-section_start test_setup "deqp: preparing test setup"
11418-
11419-set -ex
11420-
11421-# Needed so configuration files can contain paths to files in /install
11422-ln -sf "$CI_PROJECT_DIR"/install /install
11423-
11424-if [ -z "$GPU_VERSION" ]; then
11425- echo 'GPU_VERSION must be set to something like "llvmpipe" or "freedreno-a630" (the name used in .gitlab-ci/gpu-version-*.txt)'
11426- exit 1
11427-fi
11428-
11429-INSTALL=$(realpath -s "$PWD"/install)
11430-
11431-# Set up the driver environment.
11432-export LD_LIBRARY_PATH="$INSTALL"/lib/:$LD_LIBRARY_PATH
11433-export EGL_PLATFORM=surfaceless
11434-ARCH=$(uname -m)
11435-export VK_DRIVER_FILES="$INSTALL"/share/vulkan/icd.d/"$VK_DRIVER"_icd."$ARCH".json
11436-export OCL_ICD_VENDORS="$INSTALL"/etc/OpenCL/vendors/
11437-
11438-if [ -n "${ANGLE_TAG:-}" ]; then
11439- # Are we using the right ANGLE version?
11440- ci_tag_test_time_check "ANGLE_TAG"
11441- export LD_LIBRARY_PATH=/angle:$LD_LIBRARY_PATH
11442-fi
11443-
11444-if [ -n "${FLUSTER_TAG:-}" ]; then
11445- # Are we using the right Fluster version?
11446- ci_tag_test_time_check "FLUSTER_TAG"
11447- export LIBVA_DRIVERS_PATH=$INSTALL/lib/dri/
11448- # libva spams driver open info by default, and that happens per testcase.
11449- export LIBVA_MESSAGING_LEVEL=1
11450-fi
11451-
11452-if [ -n "${PIGLIT_TAG:-}" ]; then
11453- # Are we using the right Piglit version?
11454- ci_tag_test_time_check "PIGLIT_TAG"
11455-elif [ -d "/piglit" ]; then
11456- # The job does not inherit from .test-piglit, so we remove it.
11457- # This makes sure that we can both do the right version checks when needed,
11458- # and also optimise our dependencies so we don't pull unneeded stuff.
11459- rm -r /piglit
11460-fi
11461-
11462-if [ -n "$VKD3D_PROTON_TAG" ]; then
11463- # Are we using the right vkd3d-proton version?
11464- ci_tag_test_time_check "VKD3D_PROTON_TAG"
11465-
11466- # Set environment for Wine.
11467- export WINEDEBUG="-all"
11468- export WINEPREFIX="/vkd3d-proton-wine64"
11469- export WINEESYNC=1
11470-fi
11471-
11472-
11473-# Ensure Mesa Shader Cache resides on tmpfs.
11474-SHADER_CACHE_HOME=${XDG_CACHE_HOME:-${HOME}/.cache}
11475-SHADER_CACHE_DIR=${MESA_SHADER_CACHE_DIR:-${SHADER_CACHE_HOME}/mesa_shader_cache}
11476-
11477-findmnt -n tmpfs ${SHADER_CACHE_HOME} || findmnt -n tmpfs ${SHADER_CACHE_DIR} || {
11478- mkdir -p ${SHADER_CACHE_DIR}
11479- mount -t tmpfs -o nosuid,nodev,size=2G,mode=1755 tmpfs ${SHADER_CACHE_DIR}
11480-}
11481-
11482-FILE_ARGS=""
11483-
11484-touch /fails.txt
11485-
11486-# There must be a single baseline expected fails list, this lets us cat together
11487-# xfails from multiple possible sources. Do we actually use this, though?
11488-cat_if_exists() {
11489- prefix=$1
11490- kind=$2
11491- if [ -e "$INSTALL/$prefix-$kind.txt" ]; then
11492- cat "$INSTALL/$prefix-$kind.txt" >> "/$kind.txt"
11493- fi
11494-}
11495-
11496-add_if_exists() {
11497- if [ -e "$INSTALL/$2" ]; then
11498- FILE_ARGS="$FILE_ARGS $1 $INSTALL/$2"
11499- fi
11500-}
11501-
11502-# remove duplicate values to avoid reading the same file multiple times
11503-for prefix in $({
11504- echo "all"
11505- echo "$DRIVER_NAME"
11506- echo "$GPU_VERSION"
11507-} | sort -u); do
11508- cat_if_exists "$prefix" fails
11509- add_if_exists "--flakes" "$prefix-flakes.txt"
11510- add_if_exists "--skips" "$prefix-skips.txt"
11511- add_if_exists "--single-thread" "$prefix-single-thread.txt"
11512-done
11513-
11514-if [[ $CI_JOB_NAME != *full* ]]; then
11515- FILE_ARGS="$FILE_ARGS --skips $INSTALL/all-slow-skips.txt"
11516- add_if_exists "--skips" "$GPU_VERSION-slow-skips.txt"
11517-fi
11518-
11519-if [ -n "${ANGLE_TAG:-}" ]; then
11520- FILE_ARGS="$FILE_ARGS --skips $INSTALL/angle-skips.txt"
11521-fi
11522-
11523-# Set the path to VK validation layer settings (in case it ends up getting loaded)
11524-# Note: If you change the format of this filename, look through the rest of the
11525-# tree for other places that need to be kept in sync (e.g.
11526-# src/gallium/drivers/zink/ci/gitlab-ci-inc.yml)
11527-export VK_LAYER_SETTINGS_PATH=$INSTALL/$GPU_VERSION-validation-settings.txt
11528-
11529-report_load() {
11530- echo "System load: $(cut -d' ' -f1-3 < /proc/loadavg)"
11531- echo "# of CPU cores: $(grep -c processor /proc/cpuinfo)"
11532-}
11533-
11534-if [ "$GALLIUM_DRIVER" = "virpipe" ]; then
11535- # deqp is to use virpipe, and virgl_test_server llvmpipe
11536- export GALLIUM_DRIVER="$GALLIUM_DRIVER"
11537-
11538- VTEST_ARGS="--use-egl-surfaceless"
11539- if [ "$VIRGL_HOST_API" = "GLES" ]; then
11540- VTEST_ARGS="$VTEST_ARGS --use-gles"
11541- fi
11542-
11543- GALLIUM_DRIVER=llvmpipe \
11544- virgl_test_server $VTEST_ARGS >$RESULTS_DIR/vtest-log.txt 2>&1 &
11545-
11546- sleep 1
11547-fi
11548-
11549-uncollapsed_section_switch deqp "deqp: deqp-runner"
11550-
11551-# Print the detailed version with the list of backports and local patches
11552-{ set +x; } 2>/dev/null
11553-for api in vk-main vk gl gles; do
11554- deqp_version_log=/deqp-$api/deqp-$api-version
11555- if [ -r "$deqp_version_log" ]; then
11556- cat "$deqp_version_log"
11557- fi
11558-done
11559-set -x
11560-
11561-# If you change the format of the suite toml filenames or the
11562-# $GPU_VERSION-{fails,flakes,skips}.txt filenames, look through the rest
11563-# of the tree for other places that need to be kept in sync (e.g.
11564-# src/**/ci/gitlab-ci*.yml)
11565-set +e
11566-deqp-runner -V
11567-deqp-runner \
11568- suite \
11569- --suite $INSTALL/deqp-$DEQP_SUITE.toml \
11570- --output $RESULTS_DIR \
11571- --baseline /fails.txt \
11572- $FILE_ARGS \
11573- --testlog-to-xml /deqp-tools/testlog-to-xml \
11574- --fraction-start ${CI_NODE_INDEX:-1} \
11575- --fraction $((CI_NODE_TOTAL * ${DEQP_FRACTION:-1})) \
11576- --jobs ${FDO_CI_CONCURRENT:-4} \
11577- ${DEQP_RUNNER_MAX_FAILS:+--max-fails "$DEQP_RUNNER_MAX_FAILS"} \
11578- ${DEQP_RUNNER_SHADER_CACHE_DIR:+--shader-cache-dir "$DEQP_RUNNER_SHADER_CACHE_DIR"} \
11579- ${DEQP_FORCE_ASAN:+--env LD_PRELOAD=libasan.so.8:/install/lib/libdlclose-skip.so --env ASAN_OPTIONS=malloc_fill_byte=1}; DEQP_EXITCODE=$?
11580-
11581-{ set +x; } 2>/dev/null
11582-
11583-set -e
11584-
11585-section_switch test_post_process "deqp: post-processing test results"
11586-set -x
11587-
11588-report_load
11589-
11590-# Remove all but the first 50 individual XML, test log and caselist
11591-# files uploaded as artifacts, to save fd.o space and avoid job log spam
11592-# when you break everything.
11593-# Note that each of these pattern gets to keep 50 files, but there is nothing
11594-# making sure the remaining 50 files of each correspond to the same tests.
11595-find $RESULTS_DIR -name \*.xml | \
11596- sort -n |
11597- sed -n '1,+49!p' | \
11598- xargs rm -f
11599-find $RESULTS_DIR -name 'c*.r*.caselist.txt' | \
11600- sort -n |
11601- sed -n '1,+49!p' | \
11602- xargs rm -f
11603-find $RESULTS_DIR -name 'c*.r*.log' | \
11604- sort -n |
11605- sed -n '1,+49!p' | \
11606- xargs rm -f
11607-
11608-# If any QPA XMLs are there, then include the XSL/CSS in our artifacts.
11609-find $RESULTS_DIR -name \*.xml \
11610- -exec cp /deqp-tools/testlog.css /deqp-tools/testlog.xsl "$RESULTS_DIR/" ";" \
11611- -quit
11612-
11613-deqp-runner junit \
11614- --testsuite dEQP \
11615- --results $RESULTS_DIR/failures.csv \
11616- --output $RESULTS_DIR/junit.xml \
11617- --limit 50 \
11618- --template "See $ARTIFACTS_BASE_URL/results/{{testcase}}.xml"
11619-
11620-# Report the flakes to the IRC channel for monitoring (if configured):
11621-if [ -n "$FLAKES_CHANNEL" ]; then
11622- python3 $INSTALL/report-flakes.py \
11623- --host irc.oftc.net \
11624- --port 6667 \
11625- --results $RESULTS_DIR/results.csv \
11626- --known-flakes $INSTALL/$GPU_VERSION-flakes.txt \
11627- --channel "$FLAKES_CHANNEL" \
11628- --runner "$CI_RUNNER_DESCRIPTION" \
11629- --job "$CI_JOB_ID" \
11630- --url "$CI_JOB_URL" \
11631- --branch "${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME:-$CI_COMMIT_BRANCH}" \
11632- --branch-title "${CI_MERGE_REQUEST_TITLE:-$CI_COMMIT_TITLE}" || true
11633-fi
11634-
11635-# Compress results.csv to save on bandwidth during the upload of artifacts to
11636-# GitLab. This reduces the size in a VKCTS run from 135 to 7.6MB, and takes
11637-# 0.17s on a Ryzen 5950X (16 threads, 0.95s when limited to 1 thread).
11638-zstd --quiet --rm --threads ${FDO_CI_CONCURRENT:-0} -8 "$RESULTS_DIR/results.csv" -o "$RESULTS_DIR/results.csv.zst"
11639-
11640-set +x
11641-section_end test_post_process
11642-
11643-exit $DEQP_EXITCODE
11644diff --git a/.gitlab-ci/docs b/.gitlab-ci/docs
11645deleted file mode 120000
11646index af422db..0000000
11647--- a/.gitlab-ci/docs
11648+++ /dev/null
11649@@ -1 +0,0 @@
11650-../docs/ci
11651\ No newline at end of file
11652diff --git a/.gitlab-ci/download-git-cache.sh b/.gitlab-ci/download-git-cache.sh
11653deleted file mode 100644
11654index a414f76..0000000
11655--- a/.gitlab-ci/download-git-cache.sh
11656+++ /dev/null
11657@@ -1,36 +0,0 @@
11658-#!/usr/bin/env bash
11659-
11660-set +e
11661-set -o xtrace
11662-
11663-# if we run this script outside of gitlab-ci for testing, ensure
11664-# we got meaningful variables
11665-CI_PROJECT_DIR=${CI_PROJECT_DIR:-$(mktemp -d)/$CI_PROJECT_NAME}
11666-
11667-if [[ -e $CI_PROJECT_DIR/.git ]]
11668-then
11669- echo "Repository already present, skip cache download"
11670- exit
11671-fi
11672-
11673-TMP_DIR=$(mktemp -d)
11674-
11675-echo "$(date +"%F %T") Downloading archived master..."
11676-if ! curl --location --fail --retry-connrefused --retry 3 --retry-delay 10 \
11677- --output "$TMP_DIR/$CI_PROJECT_NAME.tar.gz" \
11678- "https://${S3_HOST}/${S3_GITCACHE_BUCKET}/${FDO_UPSTREAM_REPO}/$CI_PROJECT_NAME.tar.gz";
11679-then
11680- echo "Repository cache not available"
11681- exit
11682-fi
11683-
11684-set -e
11685-
11686-rm -rf "$CI_PROJECT_DIR"
11687-echo "$(date +"%F %T") Extracting tarball into '$CI_PROJECT_DIR'..."
11688-mkdir -p "$CI_PROJECT_DIR"
11689-tar xzf "$TMP_DIR/$CI_PROJECT_NAME.tar.gz" -C "$CI_PROJECT_DIR"
11690-rm -rf "$TMP_DIR"
11691-chmod a+w "$CI_PROJECT_DIR"
11692-
11693-echo "$(date +"%F %T") Git cache download done"
11694diff --git a/.gitlab-ci/farm-rules.yml b/.gitlab-ci/farm-rules.yml
11695deleted file mode 100644
11696index 761aff2..0000000
11697--- a/.gitlab-ci/farm-rules.yml
11698+++ /dev/null
11699@@ -1,404 +0,0 @@
11700-# The logic for each $FARM is as follows:
11701-#
11702-# If the disable file exists, we are disabling the farm, or it's already
11703-# disabled:
11704-# - exists: [ .ci-farms-disabled/$FARM ]
11705-# when: never
11706-#
11707-# Otherwise, changing the disable file means removing it, so we are
11708-# re-enabling the farm:
11709-# - changes: [ .ci-farms-disabled/$FARM ]
11710-# if: '$CI_PIPELINE_SOURCE != "schedule"'
11711-# when: on_success
11712-# Note: the "manual" variant of each farm rules changes the above to `never`,
11713-# so that jobs meant to be manual don't run in re-enablement MRs. This is the
11714-# only difference between `.$FARM-farm-rules` and `.$FARM-farm-manual-rules`.
11715-#
11716-# If any other disable file is modified, we are disabling/re-enabling another
11717-# farm:
11718-# - changes: [ .ci-farms-disabled/* ]
11719-# if: '$CI_PIPELINE_SOURCE != "schedule"'
11720-# when: never
11721-#
11722-# The `not schedule` condition is there to make sure scheduled pipelines
11723-# contains all the jobs, as `changes` conditions in scheduled pipelines are
11724-# always evaluated to `true`.
11725-#
11726-# The "fallback", if none of these rules match, is usually the list of files
11727-# that are used by a driver. See the various `.$DRIVER-rules` in the
11728-# corresponding `src/**/ci/gitlab-ci.yml`.
11729-
11730-# In case of issues with a farm, here are the people to contact:
11731-# farm name | ci infrastructure used | admin(s)
11732-# -----------------|----------------------------------|---------
11733-# anholt | (decommissioned) | @anholt
11734-# austriancoder | ci-tron | @austriancoder
11735-# collabora | lava | @daniels, @sergi
11736-# igalia | baremetal/poe-powered, ci-tron | @jasuarez, @chema
11737-# imagination | ci-tron | @MTCoster
11738-# lima | lava | @enunes
11739-# lumag | ci-tron | @lumag
11740-# microsoft | custom | @jenatali, @alatiera
11741-# ondracka | ci-tron | @ondracka
11742-# pengutronix | lava | @hnez, @lynxeye
11743-# valve-kws | ci-tron | @mupuf, @eric
11744-# valve-mupuf | ci-tron | @mupuf, @eric
11745-# vmware | lava | @mombasa, @bhenden
11746-
11747-.microsoft-farm-rules:
11748- rules:
11749- - exists: [ .ci-farms-disabled/microsoft ] # 1. Is disabled, never run
11750- when: never
11751- - changes: [ .ci-farms-disabled/microsoft ] # 2. Removed from disabled, run
11752- if: '$CI_PIPELINE_SOURCE != "schedule"'
11753- when: on_success
11754- - changes: [ .ci-farms-disabled/* ] # 3. We touched other farms in MR, do not run
11755- if: '$CI_PIPELINE_SOURCE != "schedule"'
11756- when: never
11757- # 4. Fall-through (other rules or on_success)
11758-
11759-.microsoft-farm-manual-rules:
11760- rules:
11761- # Allow triggering jobs manually in other cases if any files affecting the
11762- # pipeline were changed
11763- - exists: [ .ci-farms-disabled/microsoft ]
11764- when: never
11765- - changes: [ .ci-farms-disabled/microsoft ]
11766- if: '$CI_PIPELINE_SOURCE != "schedule"'
11767- when: never
11768- - !reference [.microsoft-farm-rules, rules]
11769-
11770-.microsoft-farm-container-rules:
11771- rules:
11772- # Allow triggering jobs manually in other cases if any files affecting the
11773- # pipeline were changed
11774- - exists: [ .ci-farms-disabled/microsoft ]
11775- when: never
11776- - changes: [ .ci-farms-disabled/microsoft ]
11777- if: '$CI_PROJECT_NAMESPACE == "mesa" && $CI_COMMIT_BRANCH'
11778- when: on_success
11779- - changes: [ .ci-farms-disabled/microsoft ]
11780- if: '$GITLAB_USER_LOGIN == "marge-bot" && $CI_PIPELINE_SOURCE == "merge_request_event"'
11781- when: on_success
11782- - changes: [ .ci-farms-disabled/microsoft ]
11783- if: '$CI_PROJECT_NAMESPACE == "mesa" && $GITLAB_USER_LOGIN != "marge-bot" && $CI_COMMIT_BRANCH'
11784- when: on_success
11785- - changes: [ .ci-farms-disabled/* ]
11786- if: '$CI_PROJECT_NAMESPACE == "mesa" && $CI_COMMIT_BRANCH'
11787- when: never
11788- - changes: [ .ci-farms-disabled/* ]
11789- if: '$GITLAB_USER_LOGIN == "marge-bot" && $CI_PIPELINE_SOURCE == "merge_request_event"'
11790- when: never
11791- - changes: [ .ci-farms-disabled/* ]
11792- if: '$CI_PROJECT_NAMESPACE == "mesa" && $GITLAB_USER_LOGIN != "marge-bot" && $CI_COMMIT_BRANCH'
11793- when: never
11794-
11795-
11796-.collabora-farm-rules:
11797- rules:
11798- - exists: [ .ci-farms-disabled/collabora ]
11799- when: never
11800- - if: '$CI_PIPELINE_SOURCE != "schedule"'
11801- changes: [ .ci-farms-disabled/collabora ]
11802- when: on_success
11803- - if: '$CI_PIPELINE_SOURCE != "schedule"'
11804- changes: [ .ci-farms-disabled/* ]
11805- when: never
11806-
11807-.collabora-farm-manual-rules:
11808- rules:
11809- - exists: [ .ci-farms-disabled/collabora ]
11810- when: never
11811- - if: '$CI_PIPELINE_SOURCE != "schedule"'
11812- changes: [ .ci-farms-disabled/collabora ]
11813- when: never
11814- - !reference [.collabora-farm-rules, rules]
11815-
11816-
11817-.igalia-farm-rules:
11818- rules:
11819- - exists: [ .ci-farms-disabled/igalia ]
11820- when: never
11821- - changes: [ .ci-farms-disabled/igalia ]
11822- if: '$CI_PIPELINE_SOURCE != "schedule"'
11823- when: on_success
11824- - changes: [ .ci-farms-disabled/* ]
11825- if: '$CI_PIPELINE_SOURCE != "schedule"'
11826- when: never
11827-
11828-.igalia-farm-manual-rules:
11829- rules:
11830- - exists: [ .ci-farms-disabled/igalia ]
11831- when: never
11832- - changes: [ .ci-farms-disabled/igalia ]
11833- if: '$CI_PIPELINE_SOURCE != "schedule"'
11834- when: never
11835- - !reference [.igalia-farm-rules, rules]
11836-
11837-
11838-.lima-farm-rules:
11839- rules:
11840- - exists: [ .ci-farms-disabled/lima ]
11841- when: never
11842- - changes: [ .ci-farms-disabled/lima ]
11843- if: '$CI_PIPELINE_SOURCE != "schedule"'
11844- when: on_success
11845- - changes: [ .ci-farms-disabled/* ]
11846- if: '$CI_PIPELINE_SOURCE != "schedule"'
11847- when: never
11848-
11849-.lima-farm-manual-rules:
11850- rules:
11851- - exists: [ .ci-farms-disabled/lima ]
11852- when: never
11853- - changes: [ .ci-farms-disabled/lima ]
11854- if: '$CI_PIPELINE_SOURCE != "schedule"'
11855- when: never
11856- - !reference [.lima-farm-rules, rules]
11857-
11858-
11859-.anholt-farm-rules:
11860- rules:
11861- - exists: [ .ci-farms-disabled/anholt ]
11862- when: never
11863- - changes: [ .ci-farms-disabled/anholt ]
11864- if: '$CI_PIPELINE_SOURCE != "schedule"'
11865- when: on_success
11866- - changes: [ .ci-farms-disabled/* ]
11867- if: '$CI_PIPELINE_SOURCE != "schedule"'
11868- when: never
11869-
11870-.anholt-farm-manual-rules:
11871- rules:
11872- - exists: [ .ci-farms-disabled/anholt ]
11873- when: never
11874- - changes: [ .ci-farms-disabled/anholt ]
11875- if: '$CI_PIPELINE_SOURCE != "schedule"'
11876- when: never
11877- - !reference [.anholt-farm-rules, rules]
11878-
11879-
11880-.valve-farm-rules:
11881- rules:
11882- - exists: [ .ci-farms-disabled/valve-mupuf ]
11883- if: '$RUNNER_FARM_LOCATION == "mupuf"'
11884- when: never
11885- - exists: [ .ci-farms-disabled/valve-kws ]
11886- if: '$RUNNER_FARM_LOCATION == "keywords"'
11887- when: never
11888- - changes: [ .ci-farms-disabled/valve-mupuf ]
11889- if: '$RUNNER_FARM_LOCATION == "mupuf" && $CI_PIPELINE_SOURCE != "schedule"'
11890- when: on_success
11891- - changes: [ .ci-farms-disabled/valve-kws ]
11892- if: '$RUNNER_FARM_LOCATION == "keywords" && $CI_PIPELINE_SOURCE != "schedule"'
11893- when: on_success
11894- - changes: [ .ci-farms-disabled/* ]
11895- if: '$CI_PIPELINE_SOURCE != "schedule"'
11896- when: never
11897-
11898-.valve-farm-manual-rules:
11899- rules:
11900- - exists: [ .ci-farms-disabled/valve-mupuf ]
11901- if: '$RUNNER_FARM_LOCATION == "mupuf"'
11902- when: never
11903- - exists: [ .ci-farms-disabled/valve-kws ]
11904- if: '$RUNNER_FARM_LOCATION == "keywords"'
11905- when: never
11906- - changes: [ .ci-farms-disabled/valve-mupuf ]
11907- if: '$RUNNER_FARM_LOCATION == "mupuf" && $CI_PIPELINE_SOURCE != "schedule"'
11908- when: never
11909- - changes: [ .ci-farms-disabled/valve-kws ]
11910- if: '$RUNNER_FARM_LOCATION == "keywords" && $CI_PIPELINE_SOURCE != "schedule"'
11911- when: never
11912- - !reference [.valve-farm-rules, rules]
11913-
11914-.austriancoder-farm-rules:
11915- rules:
11916- - exists: [ .ci-farms-disabled/austriancoder ]
11917- when: never
11918- - changes: [ .ci-farms-disabled/austriancoder ]
11919- if: '$CI_PIPELINE_SOURCE != "schedule"'
11920- when: on_success
11921- - changes: [ .ci-farms-disabled/* ]
11922- if: '$CI_PIPELINE_SOURCE != "schedule"'
11923- when: never
11924-
11925-.austriancoder-farm-manual-rules:
11926- rules:
11927- - exists: [ .ci-farms-disabled/austriancoder ]
11928- when: never
11929- - changes: [ .ci-farms-disabled/austriancoder ]
11930- if: '$CI_PIPELINE_SOURCE != "schedule"'
11931- when: never
11932- - !reference [.austriancoder-farm-rules, rules]
11933-
11934-.vmware-farm-rules:
11935- rules:
11936- - exists: [ .ci-farms-disabled/vmware ]
11937- when: never
11938- - changes: [ .ci-farms-disabled/vmware ]
11939- if: '$CI_PIPELINE_SOURCE != "schedule"'
11940- when: on_success
11941- - changes: [ .ci-farms-disabled/* ]
11942- if: '$CI_PIPELINE_SOURCE != "schedule"'
11943- when: never
11944-
11945-.vmware-farm-manual-rules:
11946- rules:
11947- - exists: [ .ci-farms-disabled/vmware ]
11948- when: never
11949- - changes: [ .ci-farms-disabled/vmware ]
11950- if: '$CI_PIPELINE_SOURCE != "schedule"'
11951- when: never
11952- - !reference [.vmware-farm-rules, rules]
11953-
11954-.ondracka-farm-rules:
11955- rules:
11956- - exists: [ .ci-farms-disabled/ondracka ]
11957- when: never
11958- - changes: [ .ci-farms-disabled/ondracka ]
11959- if: '$CI_PIPELINE_SOURCE != "schedule"'
11960- when: on_success
11961- - changes: [ .ci-farms-disabled/* ]
11962- if: '$CI_PIPELINE_SOURCE != "schedule"'
11963- when: never
11964-
11965-.ondracka-farm-manual-rules:
11966- rules:
11967- - exists: [ .ci-farms-disabled/ondracka ]
11968- when: never
11969- - changes: [ .ci-farms-disabled/ondracka ]
11970- if: '$CI_PIPELINE_SOURCE != "schedule"'
11971- when: never
11972- - !reference [.ondracka-farm-rules, rules]
11973-
11974-
11975-.pengutronix-farm-rules:
11976- rules:
11977- - exists: [ .ci-farms-disabled/pengutronix ]
11978- when: never
11979- - if: '$CI_PIPELINE_SOURCE != "schedule"'
11980- changes: [ .ci-farms-disabled/pengutronix ]
11981- when: on_success
11982- - if: '$CI_PIPELINE_SOURCE != "schedule"'
11983- changes: [ .ci-farms-disabled/* ]
11984- when: never
11985-
11986-.pengutronix-farm-manual-rules:
11987- rules:
11988- - exists: [ .ci-farms-disabled/pengutronix ]
11989- when: never
11990- - if: '$CI_PIPELINE_SOURCE != "schedule"'
11991- changes: [ .ci-farms-disabled/pengutronix ]
11992- when: never
11993- - !reference [.pengutronix-farm-rules, rules]
11994-
11995-
11996-.lumag-farm-rules:
11997- rules:
11998- - exists: [ .ci-farms-disabled/lumag ]
11999- when: never
12000- - changes: [ .ci-farms-disabled/lumag ]
12001- if: '$CI_PIPELINE_SOURCE != "schedule"'
12002- when: on_success
12003- - changes: [ .ci-farms-disabled/* ]
12004- if: '$CI_PIPELINE_SOURCE != "schedule"'
12005- when: never
12006-
12007-.lumag-farm-manual-rules:
12008- rules:
12009- - exists: [ .ci-farms-disabled/lumag ]
12010- when: never
12011- - changes: [ .ci-farms-disabled/lumag ]
12012- if: '$CI_PIPELINE_SOURCE != "schedule"'
12013- when: never
12014- - !reference [.lumag-farm-rules, rules]
12015-
12016-.imagination-farm-rules:
12017- rules:
12018- - exists: [ .ci-farms-disabled/imagination ]
12019- when: never
12020- - changes: [ .ci-farms-disabled/imagination ]
12021- if: '$CI_PIPELINE_SOURCE != "schedule"'
12022- when: on_success
12023- - changes: [ .ci-farms-disabled/* ]
12024- if: '$CI_PIPELINE_SOURCE != "schedule"'
12025- when: never
12026-
12027-.imagination-farm-manual-rules:
12028- rules:
12029- - exists: [ .ci-farms-disabled/imagination ]
12030- when: never
12031- - changes: [ .ci-farms-disabled/imagination ]
12032- if: '$CI_PIPELINE_SOURCE != "schedule"'
12033- when: never
12034- - !reference [.imagination-farm-rules, rules]
12035-
12036-# Skip container & build jobs when disabling any farm, and run them if any
12037-# farm gets re-enabled.
12038-# Just like above, don't apply these rules in scheduled pipelines (see comment
12039-# on line 23).
12040-.disable-farm-rules:
12041- rules:
12042- # changes(disabled) + exists(disabled) = disabling the farm
12043- # Note: this cannot be simplified into a single `.ci-farms-disabled/*` rule
12044- # because if there are more than one disabled farm and we only re-enable
12045- # one, the exits(.ci-farms-disabled/*) would match and what should be
12046- # a farm re-enable pipeline will be detected as a farm disable pipeline.
12047- - changes: [ .ci-farms-disabled/microsoft ]
12048- exists: [ .ci-farms-disabled/microsoft ]
12049- if: '$CI_PIPELINE_SOURCE != "schedule"'
12050- when: never
12051- - changes: [ .ci-farms-disabled/collabora ]
12052- exists: [ .ci-farms-disabled/collabora ]
12053- if: '$CI_PIPELINE_SOURCE != "schedule"'
12054- when: never
12055- - changes: [ .ci-farms-disabled/igalia ]
12056- exists: [ .ci-farms-disabled/igalia ]
12057- if: '$CI_PIPELINE_SOURCE != "schedule"'
12058- when: never
12059- - changes: [ .ci-farms-disabled/lima ]
12060- exists: [ .ci-farms-disabled/lima ]
12061- if: '$CI_PIPELINE_SOURCE != "schedule"'
12062- when: never
12063- - changes: [ .ci-farms-disabled/anholt ]
12064- exists: [ .ci-farms-disabled/anholt ]
12065- if: '$CI_PIPELINE_SOURCE != "schedule"'
12066- when: never
12067- - changes: [ .ci-farms-disabled/valve-mupuf ]
12068- exists: [ .ci-farms-disabled/valve-mupuf ]
12069- if: '$CI_PIPELINE_SOURCE != "schedule"'
12070- when: never
12071- - changes: [ .ci-farms-disabled/valve-kws ]
12072- exists: [ .ci-farms-disabled/valve-kws ]
12073- if: '$CI_PIPELINE_SOURCE != "schedule"'
12074- when: never
12075- - changes: [ .ci-farms-disabled/austriancoder ]
12076- exists: [ .ci-farms-disabled/austriancoder ]
12077- if: '$CI_PIPELINE_SOURCE != "schedule"'
12078- when: never
12079- - changes: [ .ci-farms-disabled/ondracka ]
12080- exists: [ .ci-farms-disabled/ondracka ]
12081- if: '$CI_PIPELINE_SOURCE != "schedule"'
12082- when: never
12083- - changes: [ .ci-farms-disabled/vmware ]
12084- exists: [ .ci-farms-disabled/vmware ]
12085- if: '$CI_PIPELINE_SOURCE != "schedule"'
12086- when: never
12087- - changes: [ .ci-farms-disabled/pengutronix ]
12088- exists: [ .ci-farms-disabled/pengutronix ]
12089- if: '$CI_PIPELINE_SOURCE != "schedule"'
12090- when: never
12091- - changes: [ .ci-farms-disabled/lumag ]
12092- exists: [ .ci-farms-disabled/lumag ]
12093- if: '$CI_PIPELINE_SOURCE != "schedule"'
12094- when: never
12095- - changes: [ .ci-farms-disabled/imagination ]
12096- exists: [ .ci-farms-disabled/imagination ]
12097- if: '$CI_PIPELINE_SOURCE != "schedule"'
12098- when: never
12099- # Any other change to ci-farms/* means some farm is getting re-enabled.
12100- # Run jobs in Marge pipelines (and let it fallback to manual otherwise)
12101- - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $GITLAB_USER_LOGIN == "marge-bot"'
12102- changes: [ .ci-farms/* ]
12103- when: on_success
12104diff --git a/.gitlab-ci/fossilize-runner.sh b/.gitlab-ci/fossilize-runner.sh
12105deleted file mode 100755
12106index af0182b..0000000
12107--- a/.gitlab-ci/fossilize-runner.sh
12108+++ /dev/null
12109@@ -1,20 +0,0 @@
12110-#!/usr/bin/env bash
12111-
12112-set -ex
12113-
12114-if [ -z "$VK_DRIVER" ]; then
12115- echo 'VK_DRIVER must be to something like "radeon" or "intel" for the test run'
12116- exit 1
12117-fi
12118-
12119-INSTALL=$PWD/install
12120-
12121-# Set up the driver environment.
12122-export LD_LIBRARY_PATH="$INSTALL/lib/"
12123-export VK_DRIVER_FILES="$INSTALL/share/vulkan/icd.d/${VK_DRIVER}_icd.x86_64.json"
12124-
12125-# To store Fossilize logs on failure.
12126-RESULTS="$PWD/results"
12127-mkdir -p results
12128-
12129-"$INSTALL/fossils/fossils.sh" "$INSTALL/fossils.yml" "$RESULTS"
12130diff --git a/.gitlab-ci/fossils.yml b/.gitlab-ci/fossils.yml
12131deleted file mode 100644
12132index f33ed18..0000000
12133--- a/.gitlab-ci/fossils.yml
12134+++ /dev/null
12135@@ -1,10 +0,0 @@
12136-fossils-db:
12137- repo: "https://gitlab.freedesktop.org/hakzsam/fossils-db"
12138- commit: "5626cedcb58bd95a7b79a9664651818aea92b21c"
12139-
12140-fossils:
12141- - path: sascha-willems/database.foz
12142- - path: parallel-rdp/small_subgroup.foz
12143- - path: parallel-rdp/small_uber_subgroup.foz
12144- - path: parallel-rdp/subgroup.foz
12145- - path: parallel-rdp/uber_subgroup.foz
12146diff --git a/.gitlab-ci/fossils/fossils.sh b/.gitlab-ci/fossils/fossils.sh
12147deleted file mode 100755
12148index e50312d..0000000
12149--- a/.gitlab-ci/fossils/fossils.sh
12150+++ /dev/null
12151@@ -1,79 +0,0 @@
12152-#!/usr/bin/env bash
12153-# shellcheck disable=SC2086 # we want word splitting
12154-# shellcheck disable=SC2155
12155-
12156-FOSSILS_SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
12157-FOSSILS_YAML="$(readlink -f "$1")"
12158-FOSSILS_RESULTS="$2"
12159-
12160-clone_fossils_db()
12161-{
12162- local repo="$1"
12163- local commit="$2"
12164- rm -rf fossils-db
12165- git clone --no-checkout "$repo" fossils-db
12166- (cd fossils-db || return; git reset "$commit" || git reset "origin/$commit")
12167-}
12168-
12169-query_fossils_yaml()
12170-{
12171- python3 "$FOSSILS_SCRIPT_DIR/query_fossils_yaml.py" \
12172- --file "$FOSSILS_YAML" "$@"
12173-}
12174-
12175-create_clean_git()
12176-{
12177- rm -rf .clean_git
12178- cp -R .git .clean_git
12179-}
12180-
12181-restore_clean_git()
12182-{
12183- rm -rf .git
12184- cp -R .clean_git .git
12185-}
12186-
12187-fetch_fossil()
12188-{
12189- local fossil="${1//,/?}"
12190- echo -n "[fetch_fossil] Fetching $1... "
12191- local output=$(git lfs pull -I "$fossil" 2>&1)
12192- local ret=0
12193- if [[ $? -ne 0 || ! -f "$1" ]]; then
12194- echo "ERROR"
12195- echo "$output"
12196- ret=1
12197- else
12198- echo "OK"
12199- fi
12200- restore_clean_git
12201- return $ret
12202-}
12203-
12204-if [[ -n "$(query_fossils_yaml fossils_db_repo)" ]]; then
12205- clone_fossils_db "$(query_fossils_yaml fossils_db_repo)" \
12206- "$(query_fossils_yaml fossils_db_commit)"
12207- cd fossils-db || return
12208-else
12209- echo "Warning: No fossils-db entry in $FOSSILS_YAML, assuming fossils-db is current directory"
12210-fi
12211-
12212-# During git operations various git objects get created which
12213-# may take up significant space. Store a clean .git instance,
12214-# which we restore after various git operations to keep our
12215-# storage consumption low.
12216-create_clean_git
12217-
12218-for fossil in $(query_fossils_yaml fossils)
12219-do
12220- fetch_fossil "$fossil" || exit $?
12221- if ! fossilize-replay --num-threads 4 $fossil 1>&2 2> $FOSSILS_RESULTS/fossil_replay.txt;
12222- then
12223- echo "Replay of $fossil failed"
12224- grep "pipeline crashed or hung" $FOSSILS_RESULTS/fossil_replay.txt
12225- exit 1
12226- fi
12227- rm $fossil
12228-done
12229-
12230-exit $ret
12231diff --git a/.gitlab-ci/fossils/query_fossils_yaml.py b/.gitlab-ci/fossils/query_fossils_yaml.py
12232deleted file mode 100644
12233index 42e4b8e..0000000
12234--- a/.gitlab-ci/fossils/query_fossils_yaml.py
12235+++ /dev/null
12236@@ -1,69 +0,0 @@
12237-#!/usr/bin/python3
12238-
12239-# Copyright (c) 2019 Collabora Ltd
12240-# Copyright (c) 2020 Valve Corporation
12241-#
12242-# Permission is hereby granted, free of charge, to any person obtaining a
12243-# copy of this software and associated documentation files (the "Software"),
12244-# to deal in the Software without restriction, including without limitation
12245-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
12246-# and/or sell copies of the Software, and to permit persons to whom the
12247-# Software is furnished to do so, subject to the following conditions:
12248-#
12249-# The above copyright notice and this permission notice shall be included
12250-# in all copies or substantial portions of the Software.
12251-#
12252-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
12253-# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12254-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
12255-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
12256-# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
12257-# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
12258-# OTHER DEALINGS IN THE SOFTWARE.
12259-#
12260-# SPDX-License-Identifier: MIT
12261-
12262-import argparse
12263-import yaml
12264-
12265-def cmd_fossils_db_repo(args):
12266- with open(args.file, 'r') as f:
12267- y = yaml.safe_load(f)
12268- print(y['fossils-db']['repo'])
12269-
12270-def cmd_fossils_db_commit(args):
12271- with open(args.file, 'r') as f:
12272- y = yaml.safe_load(f)
12273- print(y['fossils-db']['commit'])
12274-
12275-def cmd_fossils(args):
12276- with open(args.file, 'r') as f:
12277- y = yaml.safe_load(f)
12278-
12279- fossils = list(y['fossils'])
12280- if len(fossils) == 0:
12281- return
12282-
12283- print('\n'.join((t['path'] for t in fossils)))
12284-
12285-def main():
12286- parser = argparse.ArgumentParser()
12287- parser.add_argument('--file', required=True,
12288- help='the name of the yaml file')
12289-
12290- subparsers = parser.add_subparsers(help='sub-command help')
12291-
12292- parser_fossils_db_repo = subparsers.add_parser('fossils_db_repo')
12293- parser_fossils_db_repo.set_defaults(func=cmd_fossils_db_repo)
12294-
12295- parser_fossils_db_commit = subparsers.add_parser('fossils_db_commit')
12296- parser_fossils_db_commit.set_defaults(func=cmd_fossils_db_commit)
12297-
12298- parser_fossils = subparsers.add_parser('fossils')
12299- parser_fossils.set_defaults(func=cmd_fossils)
12300-
12301- args = parser.parse_args()
12302- args.func(args)
12303-
12304-if __name__ == "__main__":
12305- main()
12306diff --git a/.gitlab-ci/image-tags.yml b/.gitlab-ci/image-tags.yml
12307deleted file mode 100644
12308index 4806f9d..0000000
12309--- a/.gitlab-ci/image-tags.yml
12310+++ /dev/null
12311@@ -1,45 +0,0 @@
12312-# Keep the tags below under 20 chars each, as they end up combined into
12313-# docker image tags, and docker has a length limit of 128 chars total in tags.
12314-#
12315-# The word after the date doesn't need to be overly descriptive, it exists
12316-# purely to avoid the risk of two people updating an image tag on the same day
12317-# while working on different changes, so it doesn't matter whether that word
12318-# will make sense to someone else. Aim for "nobody else will pick that word
12319-# for their change".
12320-#
12321-# If you update a tag and you get an error like this:
12322-# cannot parse input: "$image:$tag": invalid reference format
12323-# check the length of $tag; if it's > 128 chars you need to shorten your tag.
12324-
12325-include:
12326- # Include the conditional build image tags used for structured tagging runtime checks that happens
12327- # during both build and test jobs
12328- # It can be auto-generated by bin/ci/update_tag.py script, so to keep the script's serde simple,
12329- # let's keep the component tags in a separate file
12330- - .gitlab-ci/conditional-build-image-tags.yml
12331-
12332-variables:
12333- DEBIAN_BUILD_BASE_TAG: "20251016-riscv"
12334- DEBIAN_BUILD_TAG: "20260309-D3D619"
12335-
12336- DEBIAN_TEST_BASE_TAG: "20260201-deqp-runner"
12337- DEBIAN_TEST_ANDROID_TAG: "20260415-vkcts"
12338- DEBIAN_TEST_GL_TAG: "20260415-vkcts"
12339- DEBIAN_TEST_VIDEO_TAG: "20250813-vector"
12340- DEBIAN_TEST_VK_TAG: "20260415-vkcts"
12341-
12342- ALPINE_X86_64_BUILD_TAG: "20251001-realninja"
12343-
12344- FEDORA_X86_64_BUILD_TAG: "20260429-static261"
12345-
12346- KERNEL_TAG: "v6.19-mesa-8a6f"
12347- KERNEL_REPO: "gfx-ci/linux"
12348- PKG_REPO_REV: "78fcf356"
12349- FIRMWARE_TAG: "8fc31b97"
12350- FIRMWARE_REPO: "gfx-ci/firmware"
12351-
12352- WINDOWS_X64_MSVC_TAG: "20251120-bison"
12353-
12354- WINDOWS_X64_BUILD_TAG: "20260309-D3D619"
12355-
12356- WINDOWS_X64_TEST_TAG: "20260309-D3D619"
12357diff --git a/.gitlab-ci/lava/gitlab-ci.yml b/.gitlab-ci/lava/gitlab-ci.yml
12358deleted file mode 100644
12359index f3f9f8c..0000000
12360--- a/.gitlab-ci/lava/gitlab-ci.yml
12361+++ /dev/null
12362@@ -1,279 +0,0 @@
12363-variables:
12364- LAVA_SSH_CLIENT_IMAGE: registry.freedesktop.org/gfx-ci/lava-job-submitter/alpine/x86_64_lava_ssh_client:20250908-lava-ssh
12365-
12366-
12367-.lava-test:
12368- # LAVA relies on two main containers:
12369- # 1. alpine/x86_64_lava-trigger - the container used on the GitLab CI runner
12370- # 2. the test-* container (e.g. debian/arm64_test-vk), whose derived rootfs
12371- # is used on the DUT
12372- # The following two containers are also used:
12373- # 3. alpine/x86_64_lava_ssh_client - the slim SSH client container for jobs
12374- # that use SSH instead of UART as job output
12375- # 4. lava/health-check-docker - the slim container used for fastboot
12376- # Set image: directly instead of extending .set-image to avoid conflicts
12377- # with MESA_IMAGE_PATH and FDO_DISTRIBUTION_TAG between the containers.
12378- image: registry.freedesktop.org/gfx-ci/lava-job-submitter/alpine/x86_64_lava-trigger:20260302.0
12379- # Cancel job if a newer commit is pushed to the same branch
12380- interruptible: true
12381- # The jobs themselves shouldn't actually run for an hour, of course.
12382- # Jobs are picked up greedily by a GitLab CI runner which is deliberately
12383- # overprovisioned compared to the number of available devices. They are
12384- # submitted to the LAVA co-ordinator with a job priority which gives
12385- # pre-merge priority over everyone else. User-submitted and nightly jobs
12386- # can thus spend ages just waiting around in a queue to be run at some
12387- # point as they get pre-empted by other things.
12388- # Non-queue time has strict timeouts for each stage, e.g. for downloading
12389- # the artifacts, booting the device, device setup, running the tests, etc,
12390- # which is handled by LAVA itself.
12391- # So the only reason we should see anyone bouncing off this timeout is due
12392- # to a lack of available devices to run the jobs.
12393- timeout: 1h
12394- variables:
12395- GIT_STRATEGY: none # testing doesn't build anything from source
12396- HWCI_TEST_SCRIPT: ./install/deqp-runner.sh
12397- FDO_CI_CONCURRENT: 6 # should be replaced by per-machine definitions
12398- # the dispatchers use this to cache data locally
12399- LAVA_HTTP_CACHE_URI: "http://caching-proxy/cache/?uri="
12400- LAVA_ROOTFS_PATH: "${MESA_IMAGE_PATH}:${FDO_DISTRIBUTION_TAG}/lava-rootfs.tar.zst"
12401- # per-job build artifacts
12402- JOB_RESULTS_PATH: "${JOB_ARTIFACTS_BASE}/results.tar.zst"
12403- S3_ARTIFACT_NAME: "mesa-${ARCH}-default-debugoptimized"
12404- S3_RESULTS_UPLOAD: "${JOB_ARTIFACTS_BASE}"
12405- PIGLIT_NO_WINDOW: 1
12406- VISIBILITY_GROUP: "Collabora+fdo"
12407- # Override the default `before_script` since we don't need to download
12408- # setup-test-env.sh.
12409- # The LAVA containers already include the necessary FDO CI bash helpers from
12410- # ci-templates.
12411- before_script:
12412- - >
12413- export SCRIPTS_DIR=$(mktemp -d) &&
12414- curl -L -s --retry 4 -f --retry-all-errors --retry-delay 60 -O --output-dir "${SCRIPTS_DIR}" "${CI_PROJECT_URL}/-/raw/${CI_COMMIT_SHA}/.gitlab-ci/lava/lava-submit.sh"
12415- - eval "$S3_JWT_FILE_SCRIPT"
12416- script:
12417- - . ${SCRIPTS_DIR}/lava-submit.sh
12418- artifacts:
12419- name: "${CI_PROJECT_NAME}_${CI_JOB_NAME_SLUG}"
12420- when: always
12421- paths:
12422- - results/
12423- exclude:
12424- - results/*.shader_cache
12425- reports:
12426- junit: results/junit.xml
12427- tags:
12428- - $RUNNER_TAG
12429- after_script:
12430- - curl -L --retry 4 -f --retry-connrefused --retry-delay 30 -s "https://${JOB_RESULTS_PATH}" | tar --warning=no-timestamp --zstd -x
12431-
12432-.lava-x86_64-test:
12433- extends:
12434- - .lava-test
12435- variables:
12436- ARCH: x86_64
12437- DEBIAN_ARCH: amd64
12438- KERNEL_IMAGE_NAME: bzImage
12439- KERNEL_IMAGE_TYPE: "zimage"
12440- BOOT_METHOD: u-boot
12441-
12442-.lava-x86_64-test-android:
12443- extends:
12444- - .use-debian/x86_64_test-android
12445- - .lava-x86_64-test
12446- - .android-variables
12447- variables:
12448- HWCI_ENABLE_X86_KVM: 1
12449- HWCI_TEST_SCRIPT: install/cuttlefish-runner.sh
12450- S3_ANDROID_ARTIFACT_NAME: mesa-x86_64-android-debug
12451- needs:
12452- - job: debian/x86_64_test-android
12453- artifacts: false
12454- optional: true
12455- - job: debian-x86_64 # The generic Linux build for the host will be downloaded later
12456- artifacts: false
12457- - job: debian-android # The Android build for the guest will be downloaded later and installed via adb
12458- artifacts: false
12459-
12460-.lava-x86_64-test-gl:
12461- extends:
12462- - .use-debian/x86_64_test-gl
12463- - .lava-x86_64-test
12464- needs:
12465- - job: debian/x86_64_test-gl
12466- artifacts: false
12467- optional: true
12468- - job: debian-x86_64
12469- artifacts: false
12470-
12471-.lava-x86_64-test-asan-gl:
12472- extends:
12473- - .use-debian/x86_64_test-gl
12474- - .lava-x86_64-test
12475- variables:
12476- DEQP_FORCE_ASAN: 1
12477- S3_ARTIFACT_NAME: mesa-x86_64-asan-debugoptimized
12478- needs:
12479- - job: debian/x86_64_test-gl
12480- artifacts: false
12481- optional: true
12482- - job: debian-x86_64-asan
12483- artifacts: false
12484-
12485-.lava-x86_64-test-video:
12486- extends:
12487- - .use-debian/x86_64_test-video
12488- - .lava-x86_64-test
12489- needs:
12490- - job: debian/x86_64_test-video
12491- artifacts: false
12492- optional: true
12493- - job: debian-x86_64
12494- artifacts: false
12495-
12496-.lava-x86_64-test-vk:
12497- extends:
12498- - .use-debian/x86_64_test-vk
12499- - .lava-x86_64-test
12500- needs:
12501- - job: debian/x86_64_test-vk
12502- artifacts: false
12503- optional: true
12504- - job: debian-x86_64
12505- artifacts: false
12506-
12507-.lava-x86_64-test-asan-vk:
12508- extends:
12509- - .use-debian/x86_64_test-vk
12510- - .lava-x86_64-test
12511- variables:
12512- DEQP_FORCE_ASAN: 1
12513- S3_ARTIFACT_NAME: mesa-x86_64-asan-debugoptimized
12514- needs:
12515- - job: debian/x86_64_test-vk
12516- artifacts: false
12517- optional: true
12518- - job: debian-x86_64-asan
12519- artifacts: false
12520-
12521-.lava-arm32-test:
12522- extends:
12523- - .lava-test
12524- variables:
12525- ARCH: arm32
12526- DEBIAN_ARCH: armhf
12527- KERNEL_IMAGE_NAME: zImage
12528- KERNEL_IMAGE_TYPE: "zimage"
12529- BOOT_METHOD: u-boot
12530-
12531-.lava-arm32-test-gl:
12532- extends:
12533- - .use-debian/arm32_test-gl
12534- - .lava-arm32-test
12535- needs:
12536- - job: debian/arm32_test-gl
12537- artifacts: false
12538- optional: true
12539- - job: debian-arm32
12540- artifacts: false
12541-
12542-.lava-arm64-test:
12543- extends:
12544- - .lava-test
12545- variables:
12546- ARCH: arm64
12547- DEBIAN_ARCH: arm64
12548- KERNEL_IMAGE_NAME: Image
12549- KERNEL_IMAGE_TYPE: "image"
12550- BOOT_METHOD: u-boot
12551-
12552-.lava-arm64-test-android:
12553- extends:
12554- - .use-debian/arm64_test-android
12555- - .lava-arm64-test
12556- - .android-variables
12557- variables:
12558- HWCI_KERNEL_MODULES: vhost_vsock
12559- HWCI_TEST_SCRIPT: install/cuttlefish-runner.sh
12560- S3_ANDROID_ARTIFACT_NAME: mesa-arm64-android-debug
12561- needs:
12562- - job: debian/arm64_test-android
12563- artifacts: false
12564- optional: true
12565- - job: debian-arm64 # The generic Linux build for the host will be downloaded later
12566- artifacts: false
12567- - job: debian-android # The Android build for the guest will be downloaded later and installed via adb
12568- artifacts: false
12569-
12570-.lava-arm64-test-gl:
12571- extends:
12572- - .use-debian/arm64_test-gl
12573- - .lava-arm64-test
12574- needs:
12575- - job: debian/arm64_test-gl
12576- artifacts: false
12577- optional: true
12578- - job: debian-arm64
12579- artifacts: false
12580-
12581-.lava-arm64-test-asan-gl:
12582- extends:
12583- - .use-debian/arm64_test-gl
12584- - .lava-arm64-test
12585- variables:
12586- DEQP_FORCE_ASAN: 1
12587- S3_ARTIFACT_NAME: mesa-arm64-asan-debugoptimized
12588- needs:
12589- - job: debian/arm64_test-gl
12590- artifacts: false
12591- optional: true
12592- - job: debian-arm64-asan
12593- artifacts: false
12594-
12595-.lava-arm64-test-vk:
12596- extends:
12597- - .use-debian/arm64_test-vk
12598- - .lava-arm64-test
12599- needs:
12600- - job: debian/arm64_test-vk
12601- artifacts: false
12602- optional: true
12603- - job: debian-arm64
12604- artifacts: false
12605-
12606-.lava-arm64-test-asan-vk:
12607- extends:
12608- - .use-debian/arm64_test-vk
12609- - .lava-arm64-test
12610- variables:
12611- DEQP_FORCE_ASAN: 1
12612- S3_ARTIFACT_NAME: mesa-arm64-asan-debugoptimized
12613- needs:
12614- - job: debian/arm64_test-vk
12615- artifacts: false
12616- optional: true
12617- - job: debian-arm64-asan
12618- artifacts: false
12619-
12620-.lava-piglit-traces:
12621- extends:
12622- - .piglit-traces-test
12623- variables:
12624- # until we overcome Infrastructure issues, give traces extra 5 min before timeout
12625- DEVICE_HANGING_TIMEOUT_SEC: 600
12626- PIGLIT_REPLAY_DEVICE_NAME: "gl-${GPU_VERSION}"
12627-
12628-.lava-x86_64-piglit-traces:
12629- extends:
12630- - .lava-x86_64-test-gl
12631- - .lava-piglit-traces
12632-
12633-.lava-arm32-piglit-traces:
12634- extends:
12635- - .lava-arm32-test-gl
12636- - .lava-piglit-traces
12637-
12638-.lava-arm64-piglit-traces:
12639- extends:
12640- - .lava-arm64-test-gl
12641- - .lava-piglit-traces
12642diff --git a/.gitlab-ci/lava/lava-submit.sh b/.gitlab-ci/lava/lava-submit.sh
12643deleted file mode 100755
12644index 84d35c0..0000000
12645--- a/.gitlab-ci/lava/lava-submit.sh
12646+++ /dev/null
12647@@ -1,150 +0,0 @@
12648-#!/usr/bin/env bash
12649-# shellcheck disable=SC2086 # we want word splitting
12650-# shellcheck disable=SC1091 # paths only become valid at runtime
12651-
12652-# shellcheck disable=SC1090
12653-source "${FDO_CI_BASH_HELPERS}"
12654-
12655-fdo_log_section_start_collapsed prepare_rootfs "Preparing root filesystem"
12656-
12657-set -ex
12658-
12659-# If we run in the fork (not from mesa or Marge-bot), reuse mainline kernel and rootfs, if exist.
12660-ROOTFS_URL="$(fdo_find_s3_path "$LAVA_ROOTFS_PATH")" ||
12661-{
12662- set +x
12663- fdo_log_section_error "Sorry, I couldn't find a viable built path for ${LAVA_ROOTFS_PATH} in either mainline or a fork." >&2
12664- echo "" >&2
12665- echo "If you're working on CI, this probably means that you're missing a dependency:" >&2
12666- echo "this job ran ahead of the job which was supposed to upload that artifact." >&2
12667- echo "" >&2
12668- echo "If you aren't working on CI, please ping @mesa/ci-helpers to see if we can help." >&2
12669- echo "" >&2
12670- echo "This job is going to fail, because I can't find the resources I need. Sorry." >&2
12671- set -x
12672- exit 1
12673-}
12674-
12675-rm -rf results
12676-mkdir results
12677-
12678-fdo_filter_env_vars > dut-env-vars.sh
12679-# Set SCRIPTS_DIR to point to the Mesa install we download for the DUT
12680-echo "export SCRIPTS_DIR='$CI_PROJECT_DIR/install'" >> dut-env-vars.sh
12681-
12682-fdo_log_section_end prepare_rootfs
12683-
12684-# Prepare env vars for upload.
12685-fdo_log_section_start_collapsed variables "Environment variables passed through to device:"
12686-cat dut-env-vars.sh
12687-fdo_log_section_end variables
12688-
12689-fdo_log_section_start_collapsed lava_submit "Submitting job for scheduling"
12690-
12691-touch results/lava.log
12692-tail -f results/lava.log &
12693-# Ensure that we are printing the commands that are being executed,
12694-# making it easier to debug the job in case it fails.
12695-set -x
12696-
12697-# List of optional overlays
12698-LAVA_EXTRA_OVERLAYS=()
12699-if [ -n "${LAVA_FIRMWARE:-}" ]; then
12700- for fw in $LAVA_FIRMWARE; do
12701- LAVA_EXTRA_OVERLAYS+=(
12702- - append-overlay
12703- --name=linux-firmware
12704- --url="https://${S3_BASE_PATH}/${FIRMWARE_REPO}/${fw}-${FIRMWARE_TAG}.tar"
12705- --path="/"
12706- --format=tar
12707- )
12708- done
12709-fi
12710-if [ -n "${HWCI_KERNEL_MODULES:-}" ]; then
12711- LAVA_EXTRA_OVERLAYS+=(
12712- - append-overlay
12713- --name=kernel-modules
12714- --url="${KERNEL_IMAGE_BASE}/${DEBIAN_ARCH}/modules.tar"
12715- --path="/"
12716- --format=tar
12717- )
12718-fi
12719-if [ -n "${ANDROID_CTS_TAG:-}" ]; then
12720- LAVA_EXTRA_OVERLAYS+=(
12721- - append-overlay
12722- --name=android-cts
12723- --url="$(fdo_find_s3_path "${DATA_STORAGE_PATH}/android-cts/${ANDROID_CTS_TAG}.tar.zst")"
12724- --path="/"
12725- --format=tar
12726- --compression=zstd
12727- )
12728-fi
12729-if [ -n "${FLUSTER_TAG:-}" ]; then
12730- LAVA_EXTRA_OVERLAYS+=(
12731- - append-overlay
12732- --name=vkd3d-proton
12733- --url="$(fdo_find_s3_path "${DATA_STORAGE_PATH}/fluster/${FLUSTER_TAG}/vectors.tar.zst")"
12734- --path="/"
12735- --format=tar
12736- --compression=zstd
12737- )
12738-fi
12739-if [ -n "${VKD3D_PROTON_TAG:-}" ]; then
12740- LAVA_EXTRA_OVERLAYS+=(
12741- - append-overlay
12742- --name=vkd3d-proton
12743- --url="$(fdo_find_s3_path "${DATA_STORAGE_PATH}/vkd3d-proton/${VKD3D_PROTON_TAG}/${MESA_IMAGE_PATH}/vkd3d-proton.tar.zst")"
12744- --path="/"
12745- --format=tar
12746- --compression=zstd
12747- )
12748-fi
12749-if [ -n "${S3_ANDROID_ARTIFACT_NAME:-}" ]; then
12750- LAVA_EXTRA_OVERLAYS+=(
12751- - append-overlay
12752- --name=android-cf-image
12753- --url="https://${S3_BASE_PATH}/${CUTTLEFISH_PROJECT_PATH}/aosp-${CUTTLEFISH_BUILD_VERSION_TAGS}.${CUTTLEFISH_BUILD_NUMBER}/aosp_cf_${ARCH}_only_phone-img-${CUTTLEFISH_BUILD_NUMBER}.tar.zst"
12754- --path="/cuttlefish"
12755- --format=tar
12756- --compression=zstd
12757- - append-overlay
12758- --name=android-cvd-host-package
12759- --url="https://${S3_BASE_PATH}/${CUTTLEFISH_PROJECT_PATH}/aosp-${CUTTLEFISH_BUILD_VERSION_TAGS}.${CUTTLEFISH_BUILD_NUMBER}/cvd-host_package-${ARCH}.tar.zst"
12760- --path="/cuttlefish"
12761- --format=tar
12762- --compression=zstd
12763- )
12764-fi
12765-
12766-lava-job-submitter \
12767- --farm "${FARM}" \
12768- --device-type "${DEVICE_TYPE}" \
12769- --boot-method "${BOOT_METHOD}" \
12770- --job-timeout-min $((CI_JOB_TIMEOUT/60 - 5)) \
12771- --dump-yaml \
12772- --pipeline-info "$CI_JOB_NAME: $CI_PIPELINE_URL on $CI_COMMIT_REF_NAME ${CI_NODE_INDEX}/${CI_NODE_TOTAL}" \
12773- --rootfs-url "${ROOTFS_URL}" \
12774- --kernel-url-prefix "${KERNEL_IMAGE_BASE}/${DEBIAN_ARCH}" \
12775- --dtb-filename "${DTB}" \
12776- --env-file dut-env-vars.sh \
12777- --jwt-file "${S3_JWT_FILE}" \
12778- --kernel-image-name "${KERNEL_IMAGE_NAME}" \
12779- --kernel-image-type "${KERNEL_IMAGE_TYPE}" \
12780- --visibility-group "${VISIBILITY_GROUP}" \
12781- --lava-tags "${LAVA_TAGS}" \
12782- --mesa-job-name "$CI_JOB_NAME" \
12783- --structured-log-file "results/lava_job_detail.json" \
12784- --ssh-client-image "${LAVA_SSH_CLIENT_IMAGE}" \
12785- --project-dir "${CI_PROJECT_DIR}" \
12786- --project-name "${CI_PROJECT_NAME}" \
12787- --starting-section lava_submit \
12788- --job-submitted-at "${CI_JOB_STARTED_AT}" \
12789- - append-overlay \
12790- --name=mesa-build \
12791- --url="https://${PIPELINE_ARTIFACTS_BASE}/${S3_ARTIFACT_NAME:?}.tar.zst" \
12792- --compression=zstd \
12793- --path="${CI_PROJECT_DIR}" \
12794- --format=tar \
12795- "${LAVA_EXTRA_OVERLAYS[@]}" \
12796- - submit \
12797- >> results/lava.log
12798diff --git a/.gitlab-ci/meson/build.sh b/.gitlab-ci/meson/build.sh
12799deleted file mode 100755
12800index 9abfa5c..0000000
12801--- a/.gitlab-ci/meson/build.sh
12802+++ /dev/null
12803@@ -1,237 +0,0 @@
12804-#!/usr/bin/env bash
12805-# shellcheck disable=SC1003 # works for us now...
12806-# shellcheck disable=SC2086 # we want word splitting
12807-# shellcheck disable=SC1091 # paths only become valid at runtime
12808-
12809-. "${SCRIPTS_DIR}/setup-test-env.sh"
12810-
12811-section_switch meson-cross-file "meson: cross file generate"
12812-
12813-set -e
12814-set -o xtrace
12815-
12816-comma_separated() {
12817- local IFS=,
12818- echo "$*"
12819-}
12820-
12821-no_werror() {
12822- # shellcheck disable=SC2048
12823- for i in $*; do
12824- echo "-D${i}:werror=false "
12825- done
12826-}
12827-
12828-CROSS_FILE=/cross_file-"$CROSS".txt
12829-
12830-export PATH=$PATH:$PWD/.gitlab-ci/build
12831-
12832-touch native.file
12833-printf > native.file "%s\n" \
12834- "[binaries]"
12835-
12836-# We need to control the version of llvm-config we're using, so we'll
12837-# tweak the cross file or generate a native file to do so.
12838-if test -n "$LLVM_VERSION"; then
12839- LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
12840- echo "llvm-config = '$(which "$LLVM_CONFIG")'" >> native.file
12841- if [ -n "$CROSS" ]; then
12842- sed -i -e '/\[binaries\]/a\' -e "llvm-config = '$(which "$LLVM_CONFIG")'" $CROSS_FILE
12843- fi
12844- $LLVM_CONFIG --version
12845-fi
12846-
12847-# Android manages the rust toolchain differently, ignore that case
12848-if [ "$CI_JOB_STAGE" = "build-for-tests" ] && [[ "$CI_JOB_NAME" != *android* ]]; then
12849- rustup default "$(python3 -c 'import tomllib; print(tomllib.load(open("'"$CI_PROJECT_DIR"'/clippy.toml", "rb"))["msrv"])')"
12850-fi
12851-
12852-# cross-xfail-$CROSS, if it exists, contains a list of tests that are expected
12853-# to fail for the $CROSS configuration, one per line. you can then mark those
12854-# tests in their meson.build with:
12855-#
12856-# test(...,
12857-# should_fail: meson.get_external_property('xfail', '').contains(t),
12858-# )
12859-#
12860-# where t is the name of the test, and the '' is the string to search when
12861-# not cross-compiling (which is empty, because for amd64 everything is
12862-# expected to pass).
12863-if [ -n "$CROSS" ]; then
12864- CROSS_XFAIL=.gitlab-ci/cross-xfail-"$CROSS"
12865- if [ -s "$CROSS_XFAIL" ]; then
12866- sed -i \
12867- -e '/\[properties\]/a\' \
12868- -e "xfail = '$(tr '\n' , < $CROSS_XFAIL)'" \
12869- "$CROSS_FILE"
12870- fi
12871-fi
12872-
12873-if [ -n "$HOST_BUILD_OPTIONS" ]; then
12874- section_switch meson-host-configure "meson: host configure"
12875-
12876- # Stash the PKG_CONFIG_LIBDIR so that we can use the base x86_64 image
12877- # libraries.
12878- tmp_pkg_config_libdir=$PKG_CONFIG_LIBDIR
12879- unset PKG_CONFIG_LIBDIR
12880-
12881- # Compile a host version for the few tools we need for a cross build (for
12882- # now just intel-clc)
12883- rm -rf _host_build
12884- meson setup _host_build \
12885- --native-file=native.file \
12886- -D prefix=/usr \
12887- -D libdir=lib \
12888- ${HOST_BUILD_OPTIONS}
12889-
12890- pushd _host_build
12891-
12892- section_switch meson-host-build "meson: host build"
12893-
12894- meson configure --no-pager
12895- ninja
12896- ninja install
12897- popd
12898-
12899- # Restore PKG_CONFIG_LIBDIR
12900- if [ -n "$tmp_pkg_config_libdir" ]; then
12901- export PKG_CONFIG_LIBDIR=$tmp_pkg_config_libdir
12902- fi
12903-fi
12904-
12905-# Only use GNU time if available, not any shell built-in command
12906-case $CI_JOB_NAME in
12907- # ASAN leak detection is incompatible with strace
12908- *-asan*)
12909- if test -f /usr/bin/time; then
12910- MESON_TEST_ARGS+=--wrapper=$PWD/.gitlab-ci/meson/time.sh
12911- fi
12912- Xvfb :0 -screen 0 1024x768x16 &
12913- export DISPLAY=:0.0
12914- ;;
12915- *)
12916- if test -f /usr/bin/time -a -f /usr/bin/strace; then
12917- MESON_TEST_ARGS+=--wrapper=$PWD/.gitlab-ci/meson/time-strace.sh
12918- fi
12919- ;;
12920-esac
12921-
12922-# LTO handling
12923-case $CI_PIPELINE_SOURCE in
12924- schedule)
12925- # run builds with LTO only for nightly
12926- if [ "$CI_JOB_NAME" == "debian-ppc64el" ]; then
12927- # /tmp/ccWlDCPV.s: Assembler messages:
12928- # /tmp/ccWlDCPV.s:15250880: Error: operand out of range (0xfffffffffdd4e688 is not between 0xfffffffffe000000 and 0x1fffffc)
12929- LTO=false
12930- # enable one by one for now
12931- elif [ "$CI_JOB_NAME" == "fedora-release" ]; then
12932- LTO=false
12933- else
12934- LTO=false
12935- fi
12936- ;;
12937- *)
12938- LTO=false
12939- ;;
12940-esac
12941-
12942-if [ "$LTO" == "true" ]; then
12943- MAX_LD=2
12944-else
12945- MAX_LD=${FDO_CI_CONCURRENT:-4}
12946-fi
12947-
12948-# these are built as Meson subprojects; we want to use Meson's
12949-# --force-fallback-for to ensure that we build the subprojects from their wrap
12950-# files, and we also want to disable Werror on those, since we do not control
12951-# these projects and making them warning-free is not our goal.
12952-# shellcheck disable=2206
12953-meson_subprojects=(
12954- perfetto
12955- syn-2-rs
12956- paste-1-rs
12957- pest-2-rs
12958- pest_derive-2-rs
12959- pest_generator-2-rs
12960- pest_meta-2-rs
12961- roxmltree-0.20-rs
12962- rustc-hash-2-rs
12963- indexmap-2-rs
12964- bitflags-2-rs
12965- cfg-if-1-rs
12966- equivalent-1-rs
12967- errno-0.3-rs
12968- hashbrown-0.14-rs
12969- indexmap-2-rs
12970- libc-0.2-rs
12971- log-0.4-rs
12972- once_cell-1-rs
12973- proc-macro2-1-rs
12974- quote-1-rs
12975- remain-0.2-rs
12976- rustix-1-rs
12977- thiserror-2-rs
12978- thiserror-impl-2-rs
12979- ucd-trie-0.1-rs
12980- unicode-ident-1-rs
12981- zerocopy-derive-0.8-rs
12982- ${FORCE_FALLBACK_FOR:-}
12983-)
12984-
12985-section_switch meson-configure "meson: configure"
12986-
12987-rm -rf _build
12988-# shellcheck disable=SC2046
12989-meson setup _build \
12990- --native-file=native.file \
12991- --wrap-mode=nofallback \
12992- --force-fallback-for "$(comma_separated "${meson_subprojects[@]}")" \
12993- $(no_werror "${meson_subprojects[@]}") \
12994- ${CROSS+--cross "$CROSS_FILE"} \
12995- -D prefix=$PWD/install \
12996- -D libdir=lib \
12997- -D buildtype=${BUILDTYPE:?} \
12998- -D build-tests=${RUN_MESON_TESTS} \
12999- -D c_args="$(echo -n $C_ARGS)" \
13000- -D c_link_args="$(echo -n $C_LINK_ARGS) -Wl,--fatal-warnings" \
13001- -D cpp_args="$(echo -n $CPP_ARGS)" \
13002- -D cpp_link_args="$(echo -n $CPP_LINK_ARGS) -Wl,--fatal-warnings" \
13003- -D enable-glcpp-tests=false \
13004- -D libunwind=${UNWIND} \
13005- ${DRI_LOADERS} \
13006- ${GALLIUM_ST} \
13007- -D gallium-drivers=${GALLIUM_DRIVERS:-[]} \
13008- -D vulkan-drivers=${VULKAN_DRIVERS:-[]} \
13009- -D video-codecs=all \
13010- -D werror=true \
13011- -D b_lto=${LTO} \
13012- -D backend_max_links=${MAX_LD} \
13013- ${EXTRA_OPTION}
13014-cd _build
13015-meson configure --no-pager
13016-
13017-uncollapsed_section_switch meson-build "meson: build"
13018-
13019-ninja
13020-
13021-if [ "${RUN_MESON_TESTS}" = "true" ]; then
13022- uncollapsed_section_switch meson-test "meson: test"
13023- LC_ALL=C.UTF-8 meson test --num-processes "${FDO_CI_CONCURRENT:-4}" --print-errorlogs ${MESON_TEST_ARGS}
13024-fi
13025-
13026-uncollapsed_section_switch meson-missingdeps "meson: check for missing dependencies"
13027-
13028-if ! missingdeps=$(ninja -t missingdeps); then
13029- # phony rules are false positives
13030- missingdeps=$(grep -vF '(generated by phony)' <<< "$missingdeps")
13031- if grep -qE '^Missing dep:' <<< "$missingdeps"; then
13032- echo "$missingdeps"
13033- exit 1
13034- fi
13035-fi
13036-
13037-section_switch meson-install "meson: install"
13038-ninja install
13039-cd ..
13040-section_end meson-install
13041diff --git a/.gitlab-ci/meson/time-strace.sh b/.gitlab-ci/meson/time-strace.sh
13042deleted file mode 100755
13043index 53bfd6a..0000000
13044--- a/.gitlab-ci/meson/time-strace.sh
13045+++ /dev/null
13046@@ -1,30 +0,0 @@
13047-#!/usr/bin/env bash
13048-# shellcheck disable=SC2086 # we want word splitting
13049-
13050-if [[ -z "$STRACEDIR" ]]; then
13051- STRACEDIR=meson-logs/strace/$(for i in "$@"; do basename -z -- $i; echo -n _; done).$$
13052-fi
13053-
13054-mkdir -p $STRACEDIR
13055-
13056-# If the test times out, meson sends SIGTERM to this process.
13057-# Simply exec'ing "time" would result in no output from that in this case.
13058-# Instead, we need to run "time" in the background, catch the signals and
13059-# propagate them to the actual test process.
13060-
13061-/usr/bin/time -v strace -ff -tt -T -o $STRACEDIR/log "$@" &
13062-TIMEPID=$!
13063-STRACEPID=$(ps --ppid $TIMEPID -o pid=)
13064-TESTPID=$(ps --ppid $STRACEPID -o pid=)
13065-
13066-if test "x$TESTPID" != x; then
13067- trap 'kill -TERM $TESTPID; wait $TIMEPID; exit $?' TERM
13068-fi
13069-
13070-wait $TIMEPID
13071-EXITCODE=$?
13072-
13073-# Only keep strace logs if the test timed out
13074-rm -rf $STRACEDIR &
13075-
13076-exit $EXITCODE
13077diff --git a/.gitlab-ci/meson/time.sh b/.gitlab-ci/meson/time.sh
13078deleted file mode 100755
13079index cde6bb7..0000000
13080--- a/.gitlab-ci/meson/time.sh
13081+++ /dev/null
13082@@ -1,17 +0,0 @@
13083-#!/bin/sh
13084-
13085-# If the test times out, meson sends SIGTERM to this process.
13086-# Simply exec'ing "time" would result in no output from that in this case.
13087-# Instead, we need to run "time" in the background, catch the signals and
13088-# propagate them to the actual test process.
13089-
13090-/usr/bin/time -v "$@" &
13091-TIMEPID=$!
13092-TESTPID=$(ps --ppid $TIMEPID -o pid=)
13093-
13094-if test "x$TESTPID" != x; then
13095- trap 'kill -TERM $TESTPID; wait $TIMEPID; exit $?' TERM
13096-fi
13097-
13098-wait $TIMEPID
13099-exit $?
13100diff --git a/.gitlab-ci/piglit/disable-vs_in.diff b/.gitlab-ci/piglit/disable-vs_in.diff
13101deleted file mode 100644
13102index 5eba593..0000000
13103--- a/.gitlab-ci/piglit/disable-vs_in.diff
13104+++ /dev/null
13105@@ -1,36 +0,0 @@
13106-diff --git a/generated_tests/CMakeLists.txt b/generated_tests/CMakeLists.txt
13107-index 738526546..6f89048cd 100644
13108---- a/generated_tests/CMakeLists.txt
13109-+++ b/generated_tests/CMakeLists.txt
13110-@@ -206,11 +206,6 @@ piglit_make_generated_tests(
13111- templates/gen_variable_index_write_tests/vs.shader_test.mako
13112- templates/gen_variable_index_write_tests/fs.shader_test.mako
13113- templates/gen_variable_index_write_tests/helpers.mako)
13114--piglit_make_generated_tests(
13115-- vs_in_fp64.list
13116-- gen_vs_in_fp64.py
13117-- templates/gen_vs_in_fp64/columns.shader_test.mako
13118-- templates/gen_vs_in_fp64/regular.shader_test.mako)
13119- piglit_make_generated_tests(
13120- shader_framebuffer_fetch_tests.list
13121- gen_shader_framebuffer_fetch_tests.py)
13122-@@ -279,7 +274,6 @@ add_custom_target(gen-gl-tests
13123- gen_extensions_defined.list
13124- vp-tex.list
13125- variable_index_write_tests.list
13126-- vs_in_fp64.list
13127- gpu_shader4_tests.list
13128- )
13129-
13130-diff --git a/tests/sanity.py b/tests/sanity.py
13131-index 12f1614c9..9019087e2 100644
13132---- a/tests/sanity.py
13133-+++ b/tests/sanity.py
13134-@@ -100,7 +100,6 @@ shader_tests = (
13135- 'spec/arb_tessellation_shader/execution/barrier-patch.shader_test',
13136- 'spec/arb_tessellation_shader/execution/built-in-functions/tcs-any-bvec4-using-if.shader_test',
13137- 'spec/arb_tessellation_shader/execution/sanity.shader_test',
13138-- 'spec/arb_vertex_attrib_64bit/execution/vs_in/vs-input-uint_uvec4-double_dmat3x4_array2-position.shader_test',
13139- 'spec/glsl-1.50/execution/geometry-basic.shader_test',
13140- 'spec/oes_viewport_array/viewport-gs-write-simple.shader_test',
13141- )
13142diff --git a/.gitlab-ci/piglit/piglit-traces.sh b/.gitlab-ci/piglit/piglit-traces.sh
13143deleted file mode 100755
13144index ff812cb..0000000
13145--- a/.gitlab-ci/piglit/piglit-traces.sh
13146+++ /dev/null
13147@@ -1,241 +0,0 @@
13148-#!/usr/bin/env bash
13149-# shellcheck disable=SC2035 # FIXME glob
13150-# shellcheck disable=SC2086 # we want word splitting
13151-# shellcheck disable=SC1091 # paths only become valid at runtime
13152-
13153-. "${SCRIPTS_DIR}/setup-test-env.sh"
13154-
13155-section_start traces_prepare "traces: preparing test setup"
13156-
13157-set -ex
13158-
13159-# Our rootfs may not have "less", which apitrace uses during apitrace dump
13160-export PAGER=cat # FIXME: export everywhere
13161-
13162-# Check we're using the version of Piglit we think we are
13163-ci_tag_test_time_check "PIGLIT_TAG"
13164-
13165-INSTALL=$(realpath -s "$PWD"/install)
13166-
13167-export PIGLIT_REPLAY_DESCRIPTION_FILE="$INSTALL/$PIGLIT_TRACES_FILE"
13168-
13169-# FIXME: guess why /usr/local/bin is not included in all runners PATH.
13170-# Needed because yq and ci-fairy are installed there.
13171-PATH="/usr/local/bin:$PATH"
13172-
13173-if [ "$PIGLIT_REPLAY_SUBCOMMAND" = "profile" ]; then
13174- yq -iY 'del(.traces[][] | select(.label[]? == "no-perf"))' \
13175- "$PIGLIT_REPLAY_DESCRIPTION_FILE"
13176-else
13177- # keep the images for the later upload
13178- export PIGLIT_REPLAY_EXTRA_ARGS="--keep-image ${PIGLIT_REPLAY_EXTRA_ARGS}"
13179-fi
13180-
13181-if [ -n "${LAVA_HTTP_CACHE_URI:-}" ]; then
13182- export PIGLIT_REPLAY_EXTRA_ARGS="--download-caching-proxy-url=${LAVA_HTTP_CACHE_URI} ${PIGLIT_REPLAY_EXTRA_ARGS}"
13183-elif [ -n "${CI_TRON_JOB_HTTP_SERVER:-}" ]; then
13184- export PIGLIT_REPLAY_EXTRA_ARGS="--download-caching-proxy-url=${CI_TRON_JOB_HTTP_SERVER}/caching_proxy/ ${PIGLIT_REPLAY_EXTRA_ARGS}"
13185-elif [ -n "${FDO_HTTP_CACHE_URI:-}" ]; then
13186- # FIXME: remove when there is no baremetal traces job anymore.
13187- export PIGLIT_REPLAY_EXTRA_ARGS="--download-caching-proxy-url=${FDO_HTTP_CACHE_URI} ${PIGLIT_REPLAY_EXTRA_ARGS}"
13188-fi
13189-
13190-# Set up the environment.
13191-# Modifiying here directly LD_LIBRARY_PATH may cause problems when
13192-# using a command wrapper. Hence, we will just set it when running the
13193-# command.
13194-export __LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$INSTALL/lib/"
13195-if [ -n "${VK_DRIVER}" ]; then
13196- ARCH=$(uname -m)
13197- export VK_DRIVER_FILES="$INSTALL/share/vulkan/icd.d/${VK_DRIVER}_icd.$ARCH.json"
13198-fi
13199-
13200-# Sanity check to ensure that our environment is sufficient to make our tests
13201-# run against the Mesa built by CI, rather than any installed distro version.
13202-MESA_VERSION=$(head -1 "$INSTALL/VERSION" | sed 's/\./\\./g')
13203-
13204-# wrapper to supress +x to avoid spamming the log
13205-quiet() {
13206- set +x
13207- "$@"
13208- set -x
13209-}
13210-
13211-# Set environment for apitrace executable.
13212-export PATH="/apitrace/build:$PATH"
13213-
13214-echo "Version:"
13215-apitrace version 2>/dev/null || echo "apitrace not found (Linux)"
13216-
13217-SANITY_MESA_VERSION_CMD="wflinfo"
13218-
13219-HANG_DETECTION_CMD=""
13220-
13221-# Set up the platform windowing system.
13222-if [ "$EGL_PLATFORM" = "surfaceless" ]; then
13223- # Use the surfaceless EGL platform.
13224- export DISPLAY=
13225- export WAFFLE_PLATFORM="surfaceless_egl"
13226-
13227- SANITY_MESA_VERSION_CMD="$SANITY_MESA_VERSION_CMD --platform surfaceless_egl --api gles2"
13228-
13229- if [ "$GALLIUM_DRIVER" = "virpipe" ]; then
13230- # piglit is to use virpipe, and virgl_test_server llvmpipe
13231- export GALLIUM_DRIVER="$GALLIUM_DRIVER"
13232-
13233- LD_LIBRARY_PATH="$__LD_LIBRARY_PATH" \
13234- GALLIUM_DRIVER=llvmpipe \
13235- VTEST_USE_EGL_SURFACELESS=1 \
13236- VTEST_USE_GLES=1 \
13237- virgl_test_server >"$RESULTS_DIR"/vtest-log.txt 2>&1 &
13238-
13239- sleep 1
13240- fi
13241-elif [ "$PIGLIT_PLATFORM" = "gbm" ]; then
13242- SANITY_MESA_VERSION_CMD="$SANITY_MESA_VERSION_CMD --platform gbm --api gl"
13243-elif [ "$PIGLIT_PLATFORM" = "mixed_glx_egl" ]; then
13244- # It is assumed that you have already brought up your X server before
13245- # calling this script.
13246- SANITY_MESA_VERSION_CMD="$SANITY_MESA_VERSION_CMD --platform glx --api gl"
13247-else
13248- SANITY_MESA_VERSION_CMD="$SANITY_MESA_VERSION_CMD --platform glx --api gl --profile core"
13249- . /install/common/weston.sh --renderer=gl
13250-fi
13251-
13252-# If the job is parallel at the gitlab job level, will take the corresponding
13253-# fraction of the caselist.
13254-if [ -n "$CI_NODE_INDEX" ]; then
13255- USE_CASELIST=1
13256-fi
13257-
13258-# shellcheck disable=SC2317
13259-replay_s3_upload_images() {
13260- find "$RESULTS_DIR/$__PREFIX" -type f -name "*.png" -printf "%P\n" \
13261- | while read -r line; do
13262-
13263- __TRACE="${line%-*-*}"
13264- if grep -q "^$__PREFIX/$__TRACE: pass$" ".gitlab-ci/piglit/$PIGLIT_RESULTS.txt.orig"; then
13265- if [ "x$CI_PROJECT_PATH" != "x$FDO_UPSTREAM_REPO" ]; then
13266- continue
13267- fi
13268- __S3_PATH="$PIGLIT_REPLAY_REFERENCE_IMAGES_BASE"
13269- __DESTINATION_FILE_PATH="${line##*-}"
13270- if curl --fail -L -s -I "https://${__S3_PATH}/${__DESTINATION_FILE_PATH}" | grep -Eq "^content-type: (binary|application)\/octet-stream" 2>/dev/null; then
13271- continue
13272- fi
13273- else
13274- __S3_PATH="$JOB_ARTIFACTS_BASE"
13275- __DESTINATION_FILE_PATH="$__S3_TRACES_PREFIX/${line##*-}"
13276- fi
13277-
13278- ci-fairy s3cp --token-file "${S3_JWT_FILE}" "$RESULTS_DIR/$__PREFIX/$line" \
13279- "https://${__S3_PATH}/${__DESTINATION_FILE_PATH}"
13280- done
13281-}
13282-
13283-SANITY_MESA_VERSION_CMD="$SANITY_MESA_VERSION_CMD | tee /tmp/version.txt | grep \"Mesa $MESA_VERSION\(\s\|$\)\""
13284-
13285-if [ "${GIT_STRATEGY:-}" = none ]; then
13286- cd $RESULTS_DIR && rm -rf ..?* .[!.]* *
13287-fi
13288-cd /piglit
13289-
13290-if [ -n "$USE_CASELIST" ]; then
13291- PIGLIT_TESTS=$(printf "%s" "$PIGLIT_TESTS")
13292- PIGLIT_GENTESTS="./piglit print-cmd $PIGLIT_TESTS replay --format \"{name}\" > /tmp/case-list.txt"
13293- RUN_GENTESTS="export LD_LIBRARY_PATH=$__LD_LIBRARY_PATH; $PIGLIT_GENTESTS"
13294-
13295- eval $RUN_GENTESTS
13296-
13297- sed -ni $CI_NODE_INDEX~$CI_NODE_TOTAL"p" /tmp/case-list.txt
13298-
13299- PIGLIT_TESTS="--test-list /tmp/case-list.txt"
13300-fi
13301-
13302-PIGLIT_OPTIONS=$(printf "%s" "$PIGLIT_OPTIONS")
13303-
13304-PIGLIT_TESTS=$(printf "%s" "$PIGLIT_TESTS")
13305-
13306-PIGLIT_CMD="./piglit run -l verbose --timeout 300 -j${FDO_CI_CONCURRENT:-4} $PIGLIT_OPTIONS $PIGLIT_TESTS replay "$(/usr/bin/printf "%q" "$RESULTS_DIR")
13307-
13308-RUN_CMD="export LD_LIBRARY_PATH=$__LD_LIBRARY_PATH; $SANITY_MESA_VERSION_CMD && $HANG_DETECTION_CMD $PIGLIT_CMD"
13309-
13310-# The replayer doesn't do any size or checksum verification for the traces in
13311-# the replayer db, so if we had to restart the system due to intermittent device
13312-# errors (or tried to cache replayer-db between runs, which would be nice to
13313-# have), you could get a corrupted local trace that would spuriously fail the
13314-# run.
13315-rm -rf replayer-db
13316-
13317-# ANGLE: download compiled ANGLE runtime and the compiled restricted traces (all-in-one package)
13318-if [ -n "$PIGLIT_REPLAY_ANGLE_ARCH" ]; then
13319- FILE="angle-bin-${PIGLIT_REPLAY_ANGLE_ARCH}-${ANGLE_TRACE_FILES_TAG}.tar.zst"
13320- curl --location --fail --retry-all-errors --retry 4 --retry-delay 60 \
13321- --header "Authorization: Bearer $(cat "${S3_JWT_FILE}")" \
13322- "https://s3.freedesktop.org/mesa-tracie-private/${FILE}" --output "${FILE}"
13323- mkdir -p replayer-db/angle
13324- tar --zstd -xf ${FILE} -C replayer-db/angle/
13325-fi
13326-
13327-PIGLIT_RESULTS="${PIGLIT_RESULTS:-replay}"
13328-RESULTSFILE="$RESULTS_DIR/$PIGLIT_RESULTS.txt"
13329-mkdir -p .gitlab-ci/piglit
13330-
13331-uncollapsed_section_switch traces "traces: run traces"
13332-
13333-if ! eval $RUN_CMD;
13334-then
13335- error "Found $(cat /tmp/version.txt), expected $MESA_VERSION"
13336-fi
13337-
13338-
13339-./piglit summary aggregate "$RESULTS_DIR" -o junit.xml
13340-
13341-{ set +x; } 2>/dev/null
13342-./piglit summary console "$RESULTS_DIR"/results.json.bz2 \
13343- | tee ".gitlab-ci/piglit/$PIGLIT_RESULTS.txt.orig" \
13344- | head -n -1 | grep -v ": pass" \
13345- | sed '/^summary:/Q' \
13346- > $RESULTSFILE
13347-
13348-if [ -s $RESULTSFILE ]; then
13349- error "Failures in traces:"
13350- cat $RESULTSFILE
13351- echo "Review the image changes and get the new checksums at: ${ARTIFACTS_BASE_URL}/results/summary/problems.html"
13352- echo "If the new traces look correct to you, you can update the checksums"
13353- echo "locally by running:"
13354- echo " ./bin/ci/update_traces_checksum.sh"
13355- echo "and resubmit this merge request."
13356-fi
13357-
13358-section_switch test_post_process "traces: post-processing test results"
13359-
13360-__PREFIX="trace/$PIGLIT_REPLAY_DEVICE_NAME"
13361-__S3_PATH="$PIGLIT_REPLAY_ARTIFACTS_BASE_URL"
13362-__S3_TRACES_PREFIX="traces"
13363-
13364-set -x
13365-
13366-if [ "$PIGLIT_REPLAY_SUBCOMMAND" != "profile" ]; then
13367- quiet replay_s3_upload_images
13368-fi
13369-
13370-
13371-if [ ! -s $RESULTSFILE ]; then
13372- rm -rf "${RESULTS_DIR:?}/${__PREFIX}"
13373- { set +x; } 2>/dev/null
13374- section_end test_post_process
13375- exit 0
13376-fi
13377-
13378-./piglit summary html --exclude-details=pass \
13379-"$RESULTS_DIR"/summary "$RESULTS_DIR"/results.json.bz2
13380-
13381-find "$RESULTS_DIR"/summary -type f -name "*.html" -print0 \
13382- | xargs -0 sed -i 's%<img src="file://'"${RESULTS}"'.*-\([0-9a-f]*\)\.png%<img src="https://'"${JOB_ARTIFACTS_BASE}"'/traces/\1.png%g'
13383-find "$RESULTS_DIR"/summary -type f -name "*.html" -print0 \
13384- | xargs -0 sed -i 's%<img src="file://%<img src="https://'"${PIGLIT_REPLAY_REFERENCE_IMAGES_BASE}"'/%g'
13385-
13386-section_end test_post_process
13387-
13388-exit 1
13389diff --git a/.gitlab-ci/prepare-artifacts.sh b/.gitlab-ci/prepare-artifacts.sh
13390deleted file mode 100755
13391index f17d253..0000000
13392--- a/.gitlab-ci/prepare-artifacts.sh
13393+++ /dev/null
13394@@ -1,90 +0,0 @@
13395-#!/usr/bin/env bash
13396-# shellcheck disable=SC2086 # we want word splitting
13397-# shellcheck disable=SC1091 # paths only become valid at runtime
13398-
13399-. "${SCRIPTS_DIR}/setup-test-env.sh"
13400-
13401-section_switch prepare-artifacts "artifacts: prepare"
13402-
13403-set -e
13404-set -o xtrace
13405-
13406-CROSS_FILE=/cross_file-"$CROSS".txt
13407-
13408-if [ -d install/bin ]; then
13409- # Keep pps-producer binary for tests that need it.
13410- # Remove all other binaries to save space.
13411- find install/bin -type f -not -name 'pps-producer' -delete
13412-fi
13413-
13414-# Delete unused includes from artifacts to save space.
13415-rm -rf install/include
13416-rm -f install/lib/*.a
13417-
13418-# Strip the drivers and binaries in the artifacts to cut 80% of the artifacts size.
13419-if [ -n "$CROSS" ]; then
13420- STRIP=$(sed -n -E "s/strip\s*=\s*\[?'(.*)'\]?/\1/p" "$CROSS_FILE")
13421- if [ -z "$STRIP" ]; then
13422- echo "Failed to find strip command in cross file"
13423- exit 1
13424- fi
13425-else
13426- STRIP="strip"
13427-fi
13428-if [ -z "$ARTIFACTS_DEBUG_SYMBOLS" ]; then
13429- find install -type f -executable -exec $STRIP --strip-debug {} \;
13430-fi
13431-
13432-git_sha=$(git rev-parse --short=10 HEAD)
13433-echo "$(cat VERSION) (git-$git_sha)" > install/VERSION
13434-
13435-# Test runs don't pull down the git tree, so put the dEQP helper
13436-# script and associated bits there.
13437-for f in \
13438- .gitlab-ci/bare-metal \
13439- .gitlab-ci/common \
13440- .gitlab-ci/piglit \
13441- .gitlab-ci/fossils.yml \
13442- .gitlab-ci/fossils \
13443- .gitlab-ci/crosvm-init.sh \
13444- .gitlab-ci/*.txt \
13445- .gitlab-ci/report-flakes.py \
13446- .gitlab-ci/setup-test-env.sh \
13447- .gitlab-ci/*-runner.sh \
13448- .gitlab-ci/bin/structured_logger.py \
13449- .gitlab-ci/bin/custom_logger.py \
13450-; do
13451- cp -Rp "$f" install/
13452-done
13453-
13454-mapfile -t duplicate_files < <(
13455- find src/ -path '*/ci/*' \
13456- \( \
13457- -name '*.txt' \
13458- -o -name '*.toml' \
13459- -o -name '*traces*.yml' \
13460- \) \
13461- -exec basename -a {} + | sort | uniq -d
13462-)
13463-if [ ${#duplicate_files[@]} -gt 0 ]; then
13464- echo 'Several files with the same name in various ci/ folders:'
13465- printf -- ' %s\n' "${duplicate_files[@]}"
13466- exit 1
13467-fi
13468-
13469-find src/ -path '*/ci/*' \
13470- \( \
13471- -name '*.txt' \
13472- -o -name '*.toml' \
13473- -o -name '*traces*.yml' \
13474- \) \
13475- -exec cp -p {} install/ \;
13476-
13477-if [ -n "$S3_ARTIFACT_NAME" ]; then
13478- # Pass needed files to the test stage
13479- S3_ARTIFACT_TAR="$S3_ARTIFACT_NAME.tar.zst"
13480- tar -c install | zstd --quiet --threads ${FDO_CI_CONCURRENT:-0} -o ${S3_ARTIFACT_TAR}
13481- ci-fairy s3cp --token-file "${S3_JWT_FILE}" ${S3_ARTIFACT_TAR} https://${PIPELINE_ARTIFACTS_BASE}/${S3_ARTIFACT_TAR}
13482-fi
13483-
13484-section_end prepare-artifacts
13485diff --git a/.gitlab-ci/report-flakes.py b/.gitlab-ci/report-flakes.py
13486deleted file mode 100644
13487index 6aada5b..0000000
13488--- a/.gitlab-ci/report-flakes.py
13489+++ /dev/null
13490@@ -1,150 +0,0 @@
13491-#!/usr/bin/env python3
13492-#
13493-# Copyright © 2021 Google LLC
13494-#
13495-# Permission is hereby granted, free of charge, to any person obtaining a
13496-# copy of this software and associated documentation files (the "Software"),
13497-# to deal in the Software without restriction, including without limitation
13498-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
13499-# and/or sell copies of the Software, and to permit persons to whom the
13500-# Software is furnished to do so, subject to the following conditions:
13501-#
13502-# The above copyright notice and this permission notice (including the next
13503-# paragraph) shall be included in all copies or substantial portions of the
13504-# Software.
13505-#
13506-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13507-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13508-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
13509-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
13510-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
13511-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
13512-# IN THE SOFTWARE.
13513-
13514-import argparse
13515-import io
13516-import re
13517-import socket
13518-import time
13519-
13520-
13521-class Connection:
13522- def __init__(self, host, port, verbose):
13523- self.s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
13524- self.s.connect((host, port))
13525- self.s.setblocking(0)
13526- self.verbose = verbose
13527-
13528- def send_line(self, line):
13529- if self.verbose:
13530- print(f"IRC: sending {line}")
13531- self.s.sendall((line + '\n').encode())
13532-
13533- def wait(self, secs):
13534- for i in range(secs):
13535- if self.verbose:
13536- while True:
13537- try:
13538- data = self.s.recv(1024)
13539- except io.BlockingIOError:
13540- break
13541- if data == "":
13542- break
13543- for line in data.decode().split('\n'):
13544- print(f"IRC: received {line}")
13545- time.sleep(1)
13546-
13547- def quit(self):
13548- self.send_line("QUIT")
13549- self.s.shutdown(socket.SHUT_WR)
13550- self.s.close()
13551-
13552-
13553-def read_flakes(results):
13554- flakes = []
13555- csv = re.compile("(.*),(.*),(.*)")
13556- for line in open(results, 'r').readlines():
13557- match = csv.match(line)
13558- if match.group(2) == "Flake":
13559- flakes.append(match.group(1))
13560- return flakes
13561-
13562-def main():
13563- parser = argparse.ArgumentParser()
13564- parser.add_argument('--host', type=str,
13565- help='IRC server hostname', required=True)
13566- parser.add_argument('--port', type=int,
13567- help='IRC server port', required=True)
13568- parser.add_argument('--results', type=str,
13569- help='results.csv file from deqp-runner or piglit-runner', required=True)
13570- parser.add_argument('--known-flakes', type=str,
13571- help='*-flakes.txt file passed to deqp-runner or piglit-runner', required=True)
13572- parser.add_argument('--channel', type=str,
13573- help='Known flakes report channel', required=True)
13574- parser.add_argument('--url', type=str,
13575- help='$CI_JOB_URL', required=True)
13576- parser.add_argument('--runner', type=str,
13577- help='$CI_RUNNER_DESCRIPTION', required=True)
13578- parser.add_argument('--branch', type=str,
13579- help='optional branch name')
13580- parser.add_argument('--branch-title', type=str,
13581- help='optional branch title')
13582- parser.add_argument('--job', type=str,
13583- help='$CI_JOB_ID', required=True)
13584- parser.add_argument('--verbose', "-v", action="store_true",
13585- help='log IRC interactions')
13586- args = parser.parse_args()
13587-
13588- flakes = read_flakes(args.results)
13589- if not flakes:
13590- exit(0)
13591-
13592- known_flakes = []
13593- for line in open(args.known_flakes).readlines():
13594- line = line.strip()
13595- if not line or line.startswith("#"):
13596- continue
13597- known_flakes.append(re.compile(line))
13598-
13599- irc = Connection(args.host, args.port, args.verbose)
13600-
13601- # The nick needs to be something unique so that multiple runners
13602- # connecting at the same time don't race for one nick and get blocked.
13603- # freenode has a 16-char limit on nicks (9 is the IETF standard, but
13604- # various servers extend that). So, trim off the common prefixes of the
13605- # runner name, and append the job ID so that software runners with more
13606- # than one concurrent job (think swrast) don't collide. For freedreno,
13607- # that gives us a nick as long as db410c-N-JJJJJJJJ, and it'll be a while
13608- # before we make it to 9-digit jobs (we're at 7 so far).
13609- nick = args.runner
13610- nick = nick.replace('mesa-', '')
13611- nick += f'-{args.job}'
13612- irc.send_line(f"NICK {nick}")
13613- irc.send_line(f"USER {nick} unused unused: Gitlab CI Notifier")
13614- irc.wait(10)
13615- irc.send_line(f"JOIN {args.channel}")
13616- irc.wait(1)
13617-
13618- branchinfo = ""
13619- if args.branch:
13620- branchinfo = f" on branch {args.branch} ({args.branch_title})"
13621- irc.send_line(
13622- f"PRIVMSG {args.channel} :Flakes detected in job {args.url} on {args.runner}{branchinfo}:")
13623-
13624- for flake in flakes:
13625- status = "NEW "
13626- for known in known_flakes:
13627- if known.match(flake):
13628- status = ""
13629- break
13630-
13631- irc.send_line(f"PRIVMSG {args.channel} :{status}{flake}")
13632-
13633- irc.send_line(
13634- f"PRIVMSG {args.channel} :See {args.url}/artifacts/browse/results/")
13635-
13636- irc.quit()
13637-
13638-
13639-if __name__ == '__main__':
13640- main()
13641diff --git a/.gitlab-ci/run-pytest.sh b/.gitlab-ci/run-pytest.sh
13642deleted file mode 100755
13643index 100bbdb..0000000
13644--- a/.gitlab-ci/run-pytest.sh
13645+++ /dev/null
13646@@ -1,56 +0,0 @@
13647-#!/usr/bin/env bash
13648-# SPDX-License-Identifier: MIT
13649-# © Collabora Limited
13650-# Author: Guilherme Gallo <guilherme.gallo@collabora.com>
13651-
13652-# This script runs unit/integration tests for CI tools
13653-# shellcheck disable=SC1091 # The relative paths in this file only become valid at runtime.
13654-# shellcheck disable=SC2086 # quoting PYTEST_VERBOSE makes us pass an empty path
13655-
13656-set -eu
13657-
13658-PYTHON_BIN="python3.13"
13659-
13660-if [ -z "${SCRIPTS_DIR:-}" ]; then
13661- SCRIPTS_DIR="$(dirname "${0}")"
13662-fi
13663-
13664-if [ -z "${CI_JOB_STARTED_AT:-}" ]; then
13665- CI_JOB_STARTED_AT=$(date -u +%Y-%m-%dT%H:%M:%SZ) # isoformat
13666-fi
13667-
13668-source "${SCRIPTS_DIR}/setup-test-env.sh"
13669-
13670-if [ -z "${CI_PROJECT_DIR:-}" ]; then
13671- CI_PROJECT_DIR="$(dirname "${0}")/../"
13672-fi
13673-
13674-# If running outside of the debian/arm64_build container,
13675-# run in a virtual environment for isolation
13676-# e.g. USE_VENV=true ./.gitlab-ci/run-pytest.sh
13677-if [ "${USE_VENV:-}" == true ]; then
13678- echo "Setting up virtual environment for local testing."
13679- MESA_PYTEST_VENV="${CI_PROJECT_DIR}/.venv-pytest"
13680- ${PYTHON_BIN} -m venv "${MESA_PYTEST_VENV}"
13681- source "${MESA_PYTEST_VENV}"/bin/activate
13682- ${PYTHON_BIN} -m pip install --break-system-packages -r "${CI_PROJECT_DIR}/bin/ci/test/requirements.txt"
13683-fi
13684-
13685-SCRIPT_TEST_DIR=${CI_PROJECT_DIR}/bin/ci
13686-
13687-uncollapsed_section_start pytest "Running pytest"
13688-
13689-PYTHONPATH="${SCRIPT_TEST_DIR}:${PYTHONPATH:-}" ${PYTHON_BIN} -m \
13690- pytest "${SCRIPT_TEST_DIR}" \
13691- -W ignore::DeprecationWarning \
13692- --junitxml=artifacts/ci_scripts_report.xml \
13693- -m 'not slow' \
13694- ${PYTEST_VERBOSE:-}
13695-
13696-section_end pytest
13697-
13698-section_start flake8 "flake8"
13699-${PYTHON_BIN} -m flake8 \
13700---config "${CI_PROJECT_DIR}/.gitlab-ci/.flake8" \
13701-"${SCRIPT_TEST_DIR}"
13702-section_end flake8
13703diff --git a/.gitlab-ci/run-shader-db.sh b/.gitlab-ci/run-shader-db.sh
13704deleted file mode 100755
13705index 738df0d..0000000
13706--- a/.gitlab-ci/run-shader-db.sh
13707+++ /dev/null
13708@@ -1,63 +0,0 @@
13709-#!/usr/bin/env bash
13710-# shellcheck disable=SC1091 # paths only become valid at runtime
13711-
13712-set -e
13713-
13714-. "${SCRIPTS_DIR}/setup-test-env.sh"
13715-
13716-ARTIFACTSDIR=$(pwd)/shader-db
13717-mkdir -p "$ARTIFACTSDIR"
13718-export DRM_SHIM_DEBUG=true
13719-
13720-LIBDIR=$(pwd)/install/lib
13721-export LD_LIBRARY_PATH=$LIBDIR
13722-
13723-cd /usr/local/shader-db
13724-
13725-for driver in freedreno lima v3d vc4; do
13726- section_start shader-db-${driver} "Running shader-db for $driver"
13727- env LD_PRELOAD="$LIBDIR/lib${driver}_noop_drm_shim.so" \
13728- ./run -j"${FDO_CI_CONCURRENT:-4}" ./shaders \
13729- > "$ARTIFACTSDIR/${driver}-shader-db.txt"
13730- section_end shader-db-${driver}
13731-done
13732-
13733-# Run shader-db over a number of supported platforms for crocus/iris
13734-for platform in hsw bdw skl mtl lnl ptl; do
13735- section_start "shader-db-intel-${platform}" "Running shader-db for intel - ${platform}"
13736- env LD_PRELOAD="$LIBDIR/libintel_noop_drm_shim.so" \
13737- INTEL_STUB_GPU_PLATFORM="${platform}" \
13738- ./run -j"${FDO_CI_CONCURRENT:-4}" ./shaders \
13739- > "$ARTIFACTSDIR/intel-${platform}-shader-db.txt"
13740- section_end "shader-db-intel-${platform}"
13741-done
13742-
13743-# Run shader-db over a number of supported chipsets for nouveau
13744-for chipset in 40 a3 c0 e4 f0 134 162; do
13745- section_start shader-db-nouveau-${chipset} "Running shader-db for nouveau - ${chipset}"
13746- env LD_PRELOAD="$LIBDIR/libnouveau_noop_drm_shim.so" \
13747- NOUVEAU_CHIPSET=${chipset} \
13748- ./run -j"${FDO_CI_CONCURRENT:-4}" ./shaders \
13749- > "$ARTIFACTSDIR/nouveau-${chipset}-shader-db.txt"
13750- section_end shader-db-nouveau-${chipset}
13751-done
13752-
13753-# Run shader-db for r300 (RV370 and RV515)
13754-for chipset in 0x5460 0x7140; do
13755- section_start shader-db-r300-${chipset} "Running shader-db for r300 - ${chipset}"
13756- env LD_PRELOAD="$LIBDIR/libradeon_noop_drm_shim.so" \
13757- RADEON_GPU_ID=${chipset} \
13758- ./run -j"${FDO_CI_CONCURRENT:-4}" -o r300 ./shaders \
13759- > "$ARTIFACTSDIR/r300-${chipset}-shader-db.txt"
13760- section_end shader-db-r300-${chipset}
13761-done
13762-
13763-# Run shader-db for radeonsi
13764-for device in pitcairn bonaire navi21 navi31 gfx1150 gfx1201; do
13765- section_start shader-db-radeonsi-${device} "Running shader-db for radeonsi - ${device}"
13766- env LD_PRELOAD="$LIBDIR/libamdgpu_noop_drm_shim.so" \
13767- RADEON_GPU_ID=${device} \
13768- ./run -j"${FDO_CI_CONCURRENT:-4}" -o radeonsi ./shaders \
13769- > "$ARTIFACTSDIR/radeonsi-${device}-shader-db.txt"
13770- section_end shader-db-radeonsi-${device}
13771-done
13772diff --git a/.gitlab-ci/run-shellcheck.sh b/.gitlab-ci/run-shellcheck.sh
13773deleted file mode 100755
13774index 76dea93..0000000
13775--- a/.gitlab-ci/run-shellcheck.sh
13776+++ /dev/null
13777@@ -1,22 +0,0 @@
13778-#!/usr/bin/env bash
13779-
13780-SCRIPTS_DIR="$(realpath "$(dirname "$0")")"
13781-
13782-is_bash() {
13783- [[ $1 == *.sh ]] && return 0
13784- [[ $1 == */bash-completion/* ]] && return 0
13785- [[ $(file -b --mime-type "$1") == text/x-shellscript ]] && return 0
13786- return 1
13787-}
13788-
13789-anyfailed=0
13790-
13791-while IFS= read -r -d $'' file; do
13792- if is_bash "$file" ; then
13793- if ! shellcheck "$file"; then
13794- anyfailed=1
13795- fi
13796- fi
13797-done < <(find "$SCRIPTS_DIR" -type f \! -path "./.git/*" -print0)
13798-
13799-exit "$anyfailed"
13800diff --git a/.gitlab-ci/run-yamllint.sh b/.gitlab-ci/run-yamllint.sh
13801deleted file mode 100755
13802index 2825083..0000000
13803--- a/.gitlab-ci/run-yamllint.sh
13804+++ /dev/null
13805@@ -1,5 +0,0 @@
13806-#!/usr/bin/env bash
13807-set -e
13808-
13809-# Run yamllint against all traces files.
13810-find . -name '*traces*yml' -print0 | xargs -0 yamllint -d "{rules: {line-length: {max: 1000}}}"
13811diff --git a/.gitlab-ci/setup-test-env.sh b/.gitlab-ci/setup-test-env.sh
13812deleted file mode 100755
13813index aac2b0e..0000000
13814--- a/.gitlab-ci/setup-test-env.sh
13815+++ /dev/null
13816@@ -1,382 +0,0 @@
13817-#!/usr/bin/env bash
13818-# shellcheck disable=SC2048
13819-# shellcheck disable=SC2086 # we want word splitting
13820-# shellcheck disable=SC2155 # mktemp usually not failing
13821-
13822-shopt -s expand_aliases
13823-
13824-function _x_store_state {
13825- if [[ "$-" == *"x"* ]]; then
13826- previous_state_x=1
13827- else
13828- previous_state_x=0
13829- fi
13830-}
13831-_x_store_state
13832-alias x_store_state='{ _x_store_state; } >/dev/null 2>/dev/null'
13833-
13834-function _x_off {
13835- x_store_state
13836- set +x
13837-}
13838-alias x_off='{ _x_off; } >/dev/null 2>/dev/null'
13839-
13840-function _x_restore {
13841- [ $previous_state_x -eq 0 ] || set -x
13842-}
13843-alias x_restore='{ _x_restore; } >/dev/null 2>/dev/null'
13844-
13845-function _error_msg() (
13846- x_off
13847- RED="\e[0;31m"
13848- ENDCOLOR="\e[0m"
13849- echo -e "${RED}$*${ENDCOLOR}"
13850-)
13851-
13852-# Some date binaries (like the BusyBox one) use -D instead of -d for date parsing.
13853-# This fallback handles both cases: try GNU coreutils-style first, then fallback to BusyBox if it fails.
13854-# The BusyBox fallback needs '|| true' because it returns an error status even when it outputs the time.
13855-export JOB_START_S=$(
13856- date -u +"%s" -d "$CI_JOB_STARTED_AT" 2>/dev/null ||
13857- { date -u +"%s" -D "%Y-%m-%dT%H:%M:%SZ" "$CI_JOB_STARTED_AT" 2>/dev/null || true; }
13858-)
13859-
13860-function get_job_seconds {
13861- DATE_S=$(date -u +"%s")
13862- echo $((DATE_S-JOB_START_S))
13863-}
13864-
13865-function get_current_minsec {
13866- CURR_TIME=$(get_job_seconds)
13867- printf "%02d:%02d" $((CURR_TIME/60)) $((CURR_TIME%60))
13868-}
13869-
13870-function _build_section_start {
13871- local section_params=$1
13872- shift
13873- local section_name=$1
13874- CURRENT_SECTION=$section_name
13875- shift
13876- CYAN="\e[0;36m"
13877- ENDCOLOR="\e[0m"
13878-
13879- CURR_MINSEC=$(get_current_minsec)
13880- echo -e "\n\e[0Ksection_start:$(date +%s):$section_name$section_params\r\e[0K${CYAN}[${CURR_MINSEC}] $*${ENDCOLOR}\n"
13881- x_restore
13882-}
13883-alias build_section_start="x_off; _build_section_start"
13884-
13885-function _section_start {
13886- build_section_start "[collapsed=true]" $*
13887- x_restore
13888-}
13889-alias section_start="x_off; _section_start"
13890-
13891-function _uncollapsed_section_start {
13892- build_section_start "" $*
13893- x_restore
13894-}
13895-alias uncollapsed_section_start="x_off; _uncollapsed_section_start"
13896-
13897-function _build_section_end {
13898- echo -e "\e[0Ksection_end:$(date +%s):$1\r\e[0K"
13899- CURRENT_SECTION=""
13900- x_restore
13901-}
13902-alias build_section_end="x_off; _build_section_end"
13903-
13904-function _section_end {
13905- build_section_end $*
13906- x_restore
13907-}
13908-alias section_end="x_off; _section_end"
13909-
13910-function _section_switch {
13911- if [ -n "${CURRENT_SECTION:-}" ]
13912- then
13913- build_section_end $CURRENT_SECTION
13914- x_off
13915- fi
13916- build_section_start "[collapsed=true]" $*
13917- x_restore
13918-}
13919-alias section_switch="x_off; _section_switch"
13920-
13921-function _uncollapsed_section_switch {
13922- if [ -n "${CURRENT_SECTION:-}" ]
13923- then
13924- build_section_end $CURRENT_SECTION
13925- x_off
13926- fi
13927- build_section_start "" $*
13928- x_restore
13929-}
13930-alias uncollapsed_section_switch="x_off; _uncollapsed_section_switch"
13931-
13932-export -f _x_store_state
13933-export -f _x_off
13934-export -f _x_restore
13935-export -f get_current_minsec
13936-export -f _build_section_start
13937-export -f _section_start
13938-export -f _build_section_end
13939-export -f _section_end
13940-export -f _section_switch
13941-export -f _uncollapsed_section_switch
13942-export -f _error_msg
13943-
13944-# Freedesktop requirement (needed for Wayland)
13945-[ -n "${XDG_RUNTIME_DIR:-}" ] || export XDG_RUNTIME_DIR="$(mktemp --tmpdir -d xdg-runtime-XXXXXX)"
13946-
13947-if [ -z "${RESULTS_DIR:-}" ]; then
13948- export RESULTS_DIR="${PWD%/}/results"
13949- if [ "${GIT_STRATEGY:-}" = none ]; then
13950- rm -rf "${RESULTS_DIR}"
13951- fi
13952-fi
13953-mkdir -p "${RESULTS_DIR}"
13954-
13955-function error {
13956- # we force the following to be not in a section
13957- if [ -n "${CURRENT_SECTION:-}" ]; then
13958- section_end $CURRENT_SECTION
13959- x_off
13960- fi
13961-
13962- CURR_MINSEC=$(get_current_minsec)
13963- echo -e "\n"
13964- _error_msg "[$CURR_MINSEC] ERROR: $*"
13965- x_restore
13966-}
13967-
13968-function trap_err {
13969- x_off
13970- error ${CURRENT_SECTION:-'unknown-section'}: ret code: $*
13971-}
13972-
13973-# ------ Structured tagging
13974-export _CI_TAG_CHECK_DIR="/mesa-ci-build-tag"
13975-
13976-_ci_tag_from_name_to_var() {
13977- # Transforms MY_COMPONENT_TAG to my-component
13978- echo "${1%_TAG}" | tr '[:upper:]' '[:lower:]' | tr '_' '-'
13979-}
13980-
13981-_ci_tag_check() (
13982- x_off
13983- _declared_name="${1}"
13984- declare -n _declared="${_declared_name}"
13985- _calculated="${2}"
13986- local component_lower=$(_ci_tag_from_name_to_var "${_declared_name}")
13987-
13988- if [ -z "${_declared:-}" ]; then
13989- # Close the section
13990- error "Fatal error"
13991- _error_msg "Structured tag is not set: ${_declared_name}"
13992- _error_msg ""
13993- echo "If you are adding a new component, please run:"
13994- echo "bin/ci/update_tag.py --include ${component_lower}"
13995- echo "This will automatically update the YAML file for you."
13996- echo "Or manually edit .gitlab-ci/conditional-build-image-tags.yml to add the new"
13997- echo "component."
13998- error ""
13999- exit 2
14000- fi
14001-
14002- if [ "${_declared}" != "${_calculated}" ]; then
14003- # Close the section
14004- error "Fatal error"
14005- _error_msg "Mismatch in declared and calculated tags:"
14006- _error_msg " ${_declared_name} from the YAML is \"${_declared}\""
14007- _error_msg " ... but I think it should be \"${_calculated}\""
14008- _error_msg ""
14009- echo "Usually this happens when you change what you want to be built without also"
14010- echo "changing the YAML declaration. For example, you've bumped SKQP to version"
14011- echo "1.2.3, but you still have 'SKQP_VER: 1.2.2' in"
14012- echo ".gitlab-ci/conditional-build-image-tags.yml."
14013- echo ""
14014- echo "If you meant to change the component I'm talking about, please change the"
14015- echo "tag and resubmit. You can also run:"
14016- echo "bin/ci/update_tag.py --include ${component_lower}"
14017- echo "to update the tag automatically."
14018- echo ""
14019- echo "If you didn't mean to change the component, please ping @mesa/ci-helpers and we"
14020- echo "can help you figure out what's gone wrong."
14021- echo ""
14022- echo "But for now, I've got to fail this build. Sorry."
14023- exit 2
14024- fi
14025- x_restore
14026-)
14027-
14028-_ci_tag_check_build() {
14029- x_off
14030- if [ -n "${NEW_TAG_DRY_RUN:-}" ]; then
14031- echo "${2}"
14032- exit 0
14033- fi
14034-
14035- _ci_tag_check "${1}" "${2}"
14036-
14037- if [ -n "${CI_NOT_BUILDING_ANYTHING:-}" ]; then
14038- exit 0
14039- fi
14040- x_restore
14041-}
14042-
14043-get_tag_file() {
14044- x_off
14045- # If no tag name is provided, return the directory
14046- echo "${_CI_TAG_CHECK_DIR}/${1:-}"
14047- x_restore
14048-}
14049-
14050-_ci_tag_write() (
14051- set +x
14052- local tag_name="${1}"
14053- local tag_value="${2}"
14054-
14055- mkdir -p "${_CI_TAG_CHECK_DIR}"
14056- echo -n "${tag_value}" > "$(get_tag_file "${tag_name}")"
14057-)
14058-
14059-_ci_calculate_tag() {
14060- x_off
14061- # the args are files that can affect the build output
14062- mapfile -t extra_files < <(printf '%s\n' "$@")
14063- (
14064- for extra_file in "${extra_files[@]}"; do
14065- if [ ! -f "${extra_file}" ]; then
14066- error "File '${extra_file}' does not exist"
14067- exit 1
14068- fi
14069- cat "${extra_file}"
14070- done
14071- ) | md5sum | cut -d' ' -f1
14072- x_restore
14073-}
14074-
14075-ci_tag_build_time_check() {
14076- # Get the caller script and hash its contents plus the extra files
14077- x_off
14078- local tag_name="${1}"
14079- local build_script_file="build-$(_ci_tag_from_name_to_var "${tag_name}").sh"
14080- local build_script=".gitlab-ci/container/${build_script_file}"
14081- shift
14082- # now $@ has the extra files
14083- local calculated_tag=$(_ci_calculate_tag "${build_script}" "$@")
14084-
14085- _ci_tag_check_build "${tag_name}" "${calculated_tag}"
14086- _ci_tag_write "${tag_name}" "${calculated_tag}"
14087- x_restore
14088-}
14089-
14090-ci_tag_test_time_check() {
14091- x_off
14092- local tag_file=$(get_tag_file "${1}")
14093- if [ ! -f "${tag_file}" ]; then
14094- _error_msg "Structured tag file ${tag_file} does not exist"
14095- _error_msg "Please run the ci_tag_build_time_check first and rebuild the image/rootfs"
14096- exit 2
14097- fi
14098- _ci_tag_check "${1}" "$(cat "${tag_file}")"
14099- x_restore
14100-}
14101-
14102-# Export all functions
14103-export -f _ci_calculate_tag
14104-export -f _ci_tag_check
14105-export -f _ci_tag_check_build
14106-export -f _ci_tag_from_name_to_var
14107-export -f _ci_tag_write
14108-export -f ci_tag_build_time_check
14109-export -f ci_tag_test_time_check
14110-export -f get_tag_file
14111-
14112-# Structured tagging ------
14113-
14114-curl-with-retry() {
14115- curl --fail --location --retry-connrefused --retry 4 --retry-delay 15 "$@"
14116-}
14117-export -f curl-with-retry
14118-
14119-function find_s3_project_artifact() {
14120- x_off
14121- local artifact_path="$1"
14122-
14123- for project in "${FDO_UPSTREAM_REPO}" "${CI_PROJECT_PATH}"; do
14124- local full_path="${FDO_HTTP_CACHE_URI:-}${S3_BASE_PATH}/${project}/${artifact_path}"
14125- if curl-with-retry -s --head "https://${full_path}" >/dev/null; then
14126- echo "https://${full_path}"
14127- x_restore
14128- return 0
14129- fi
14130- done
14131-
14132- x_restore
14133- return 1
14134-}
14135-export -f find_s3_project_artifact
14136-
14137-export -f error
14138-export -f trap_err
14139-
14140-function filter_env_vars() {
14141- x_off
14142- if [[ -n "${S3_JWT:-}" ]]; then
14143- echo >&2 "Fatal: S3_JWT is set. This should have been cleared at this point."
14144- return 1
14145- fi
14146-
14147- local exclude_vars=(
14148- # GitLab tokens/passwords
14149- CI_JOB_TOKEN
14150- CI_DEPLOY_USER
14151- CI_DEPLOY_PASSWORD
14152- CI_DEPENDENCY_PROXY_PASSWORD
14153- CI_REGISTRY_PASSWORD
14154- CI_REPOSITORY_URL
14155-
14156- # Too long and unnecessary GitLab variables
14157- CI_COMMIT_DESCRIPTION
14158- CI_COMMIT_MESSAGE
14159- CI_MERGE_REQUEST_DESCRIPTION
14160-
14161- # Shell-managed variables
14162- _
14163- HOME
14164- HOSTNAME
14165- OLDPWD
14166- PATH
14167- PWD
14168- TERM
14169- XDG_RUNTIME_DIR
14170- )
14171-
14172- env -0 | sort -z | while IFS= read -r -d '' line; do
14173- [[ "$line" == *=* ]] || continue
14174- local varname="${line%%=*}"
14175-
14176- # Skip certain Mesa-specific variables
14177- if echo "$varname" | grep -qxE "$CI_EXCLUDE_ENV_VAR_REGEX"; then
14178- echo >&2 "${FUNCNAME[0]}: $varname is not passed to the DUT as it matches the pattern in CI_EXCLUDE_ENV_VAR_REGEX"
14179- continue
14180- fi
14181- # Skip excluded or invalid names
14182- if printf '%s\n' "${exclude_vars[@]}" | grep -qxF "$varname"; then
14183- echo >&2 "${FUNCNAME[0]}: $varname is not passed to the DUT as it is a variable listed for exclusion in ${FUNCNAME[0]}"
14184- continue
14185- fi
14186- # Skip shell function exports
14187- if [[ "$varname" == BASH_FUNC_* ]] || [[ ! "$varname" =~ ^[a-zA-Z_][a-zA-Z0-9_]*$ ]]; then
14188- continue
14189- fi
14190-
14191- echo "${!varname@A}"
14192- done
14193- x_restore
14194-}
14195-export -f filter_env_vars
14196-
14197-set -E
14198-trap 'trap_err $?' ERR
14199diff --git a/.gitlab-ci/test-source-dep.yml b/.gitlab-ci/test-source-dep.yml
14200deleted file mode 100644
14201index ce82d61..0000000
14202--- a/.gitlab-ci/test-source-dep.yml
14203+++ /dev/null
14204@@ -1,245 +0,0 @@
14205-# This file list source dependencies to avoid creating/running jobs
14206-# those outcome cannot be changed by the modifications from a branch.
14207-
14208-# Rule to filter for only scheduled pipelines.
14209-.scheduled_pipeline-rules:
14210- rules:
14211- - if: &is-scheduled-pipeline '$CI_PIPELINE_SOURCE == "schedule"'
14212- when: on_success
14213-
14214-# Override of the `default: retry:` settings, which automatically retries jobs
14215-# if one of the tests result didn't match its expectation; this override
14216-# disables that, but keeps the auto-retry for infrastructure failures.
14217-.no-auto-retry:
14218- retry:
14219- max: 1
14220- # Don't retry on script_failure, job_execution_timeout, runner_unsupported,
14221- # stale_schedule, archived_failure, or unmet_prerequisites
14222- when:
14223- - api_failure
14224- - runner_system_failure
14225- - scheduler_failure
14226- - data_integrity_failure
14227- - unknown_failure
14228-
14229-
14230-# Generic rule to not run the job during scheduled pipelines. Jobs that aren't
14231-# something like a nightly run should include this rule.
14232-.no_scheduled_pipelines-rules:
14233- rules:
14234- - if: *is-scheduled-pipeline
14235- when: never
14236-
14237-# Rule for restricted traces jobs to only run for users with access to those
14238-# traces (both https://gitlab.freedesktop.org/gfx-ci/tracie/traces-db-private
14239-# for trace access, and minio bucket access for viewing result images from CI).
14240-#
14241-# This is a compromise, allowing some marked developers to have their MRs
14242-# blocked on regressions to non-redistributable traces, while not blocking
14243-# merges for other devs who would be unable to debug changes to them.
14244-.restricted-rules:
14245- rules:
14246- # If the triggerer has access to the restricted traces and if it is pre-merge
14247- - if: '($GITLAB_USER_LOGIN !~ "/^(robclark|anholt|flto|cwabbott0|Danil|tomeu|okias|gallo|kwg|llanderwelin|zmike|vigneshraman|Valentine|daniels)$/") &&
14248- ($GITLAB_USER_LOGIN != "marge-bot" || $CI_COMMIT_BRANCH)'
14249- when: never
14250-
14251-# Mesa core source file dependencies that may impact any test job
14252-# ---------------------------------------------------------------
14253-.core-rules:
14254- rules:
14255- - !reference [.common-rules, rules]
14256- - !reference [.no_scheduled_pipelines-rules, rules]
14257- - changes: &core_file_list
14258- - .gitlab-ci.yml
14259- - .gitlab-ci/**/*
14260- - include/**/*
14261- - meson.build
14262- - meson.options
14263- - build-support/**/*
14264- - subprojects/**/*
14265- - .gitattributes
14266- - src/*
14267- - src/android_stub/**/*
14268- - src/c11/**/*
14269- - src/compiler/**/*
14270- - src/drm-shim/**/*
14271- - src/gtest/**/*
14272- # Some src/util and src/compiler files use headers from mesa/ (e.g.
14273- # mtypes.h). We should clean that up.
14274- - src/mesa/**/*.h
14275- - src/tool/**/*
14276- - src/util/**/*
14277- - src/x11/**/*
14278- when: on_success
14279-
14280-# Same core dependencies for doing manual runs.
14281-.core-manual-rules:
14282- extends: .no-auto-retry
14283- rules:
14284- - !reference [.common-rules, rules]
14285- # We only want manual jobs to show up when it's not marge's pre-merge CI
14286- # run, otherwise she'll wait until her timeout. The exception is
14287- # performance jobs, see below.
14288- - if: '($GITLAB_USER_LOGIN == "marge-bot" &&
14289- $CI_PIPELINE_SOURCE == "merge_request_event" &&
14290- $CI_JOB_NAME !~ "/performance$/")'
14291- when: never
14292- - !reference [.scheduled_pipeline-rules, rules]
14293- - changes:
14294- *core_file_list
14295- when: manual
14296-
14297-# Rules for performance jobs tracking. We want perf jobs to run as code is
14298-# merged to main, but we don't want them to block marge. So, they need to have
14299-# only when: never or when: manual, and a separate script maintained by
14300-# Collabora triggers the manual job after merge to main. These "never" filters
14301-# need to come before any paths with "manual".
14302-.performance-rules:
14303- stage: performance
14304- rules:
14305- - !reference [.no_scheduled_pipelines-rules, rules]
14306- # Run only on pre-merge pipelines from Marge
14307- - if: $MESA_CI_PERFORMANCE_ENABLED == null
14308- when: never
14309- # Allow the merge to complete even before the job completes (since it won't
14310- # even start until the separate script triggers on it).
14311- allow_failure: true
14312-
14313-.piglit-performance-base:
14314- extends:
14315- - .performance-rules
14316- variables:
14317- JOB_PRIORITY: 40
14318- PIGLIT_REPLAY_SUBCOMMAND: "profile"
14319- PIGLIT_REPLAY_EXTRA_ARGS: "--db-path ${CI_PROJECT_DIR}/replayer-db/"
14320- # More than this can hit OOM due to BOs leaked during the replay of the last frame
14321- PIGLIT_REPLAY_LOOP_TIMES: 150
14322- # We don't want for more than one workload to be submitted to the GPU at a time
14323- FDO_CI_CONCURRENT: 1
14324- # Piglit is very sparse in its status output and downloads of big traces can take a while
14325- DEVICE_HANGING_TIMEOUT_SEC: 600
14326- # So we aren't capped by VSync by the X server
14327- EGL_PLATFORM: surfaceless
14328- GIT_STRATEGY: none
14329- HWCI_FREQ_MAX: "true"
14330- # Always use the same device
14331- LAVA_TAGS: "cbg-0"
14332- # Ensure that we are using the release build artifact
14333- S3_ARTIFACT_NAME: mesa-${ARCH}-default-release
14334- # Reset dependencies in performance jobs to enforce the release build artifact
14335- dependencies: null
14336- # Don't run in parallel. It is okay to performance jobs to take a little
14337- # longer to finish, as they don't block marge from merging an MR.
14338- parallel: null
14339- artifacts:
14340- name: "${CI_PROJECT_NAME}_${CI_JOB_NAME_SLUG}"
14341- when: always
14342- paths:
14343- - results/
14344- exclude:
14345- - results/*.shader_cache
14346- reports:
14347- junit:
14348- - results/junit.xml
14349-
14350-# Mesa source file dependencies that may impact any GL driver test job.
14351-.gallium-core-rules:
14352- rules:
14353- - !reference [.core-rules, rules]
14354- - changes: &gallium_core_file_list
14355- - src/gallium/*
14356- - src/gallium/auxiliary/**/*
14357- - src/gallium/drivers/*
14358- - src/gallium/include/**/*
14359- - src/gallium/frontends/dri/*
14360- - src/gallium/frontends/glx/**/*
14361- - src/gallium/targets/**/*
14362- - src/gallium/winsys/*
14363- when: on_success
14364-
14365-.gl-rules:
14366- rules:
14367- - !reference [.core-rules, rules]
14368- - changes: &mesa_core_file_list
14369- - src/egl/**/*
14370- - src/gbm/**/*
14371- - src/glx/**/*
14372- - src/loader/**/*
14373- - src/mesa/*
14374- - src/mesa/glapi/**/*
14375- - src/mesa/main/**/*
14376- - src/mesa/math/**/*
14377- - src/mesa/program/**/*
14378- - src/mesa/state_tracker/**/*
14379- - src/mesa/vbo/**/*
14380- when: on_success
14381- - !reference [.gallium-core-rules, rules]
14382-
14383-.gl-manual-rules:
14384- extends: .no-auto-retry
14385- rules:
14386- - !reference [.core-manual-rules, rules]
14387- - changes:
14388- *mesa_core_file_list
14389- when: manual
14390- - changes:
14391- *gallium_core_file_list
14392- when: manual
14393-
14394-# Source file dependencies that may impact any Vulkan driver build or test
14395-.vulkan-rules:
14396- rules:
14397- - !reference [.core-rules, rules]
14398- - changes: &vulkan_file_list
14399- - src/vulkan/**/*
14400- when: on_success
14401-
14402-.vulkan-manual-rules:
14403- extends: .no-auto-retry
14404- rules:
14405- - !reference [.core-manual-rules, rules]
14406- - changes:
14407- *vulkan_file_list
14408- when: manual
14409-
14410-# Rules for linters
14411-.lint-rustfmt-rules:
14412- rules:
14413- - !reference [.never-post-merge-rules, rules]
14414- - !reference [.no_scheduled_pipelines-rules, rules]
14415- # pre-merge: must succeed if changing Rust, skip if not
14416- - if: &is-merge-attempt $GITLAB_USER_LOGIN == "marge-bot" && $CI_PIPELINE_SOURCE == "merge_request_event"
14417- changes: &rustfmt_files
14418- - .gitlab-ci.yml
14419- - .gitlab-ci/**/*
14420- - src/**/*.rs
14421- when: on_success
14422- allow_failure: false
14423- - if: *is-merge-attempt
14424- when: never
14425- - if: &is-merge-request $CI_PIPELINE_SOURCE == "merge_request_event"
14426- changes:
14427- *rustfmt_files
14428- when: manual
14429- allow_failure: false
14430- - if: *is-merge-request
14431- when: never
14432- # non-pre-merge: run but only advisory
14433- - if: $CI_PROJECT_NAMESPACE == "mesa"
14434- changes: *rustfmt_files
14435- allow_failure: true
14436- - if: $CI_PROJECT_NAMESPACE == "mesa"
14437- when: never
14438- - when: manual
14439- allow_failure: true
14440-
14441-# Rules for .mr-label-maker.yml
14442-.mr-label-maker-rules:
14443- rules:
14444- - !reference [.never-post-merge-rules, rules]
14445- - !reference [.no_scheduled_pipelines-rules, rules]
14446- - if: $CI_PIPELINE_SOURCE == "merge_request_event"
14447- changes:
14448- - .mr-label-maker.yml
14449- when: on_success
14450diff --git a/.gitlab-ci/test/gitlab-ci-inc.yml b/.gitlab-ci/test/gitlab-ci-inc.yml
14451deleted file mode 100644
14452index c808c59..0000000
14453--- a/.gitlab-ci/test/gitlab-ci-inc.yml
14454+++ /dev/null
14455@@ -1,180 +0,0 @@
14456-.test:
14457- # Cancel job if a newer commit is pushed to the same branch
14458- interruptible: true
14459- variables:
14460- GIT_STRATEGY: none # testing doesn't build anything from source
14461- # `before_script:` is only used by test jobs on generic fdo runners
14462- # it's overwritten by hardware test jobs
14463- before_script:
14464- - !reference [.download_s3, before_script]
14465- - section_start ldd_section "Checking ldd on driver build"
14466- - LD_LIBRARY_PATH=install/lib find install/lib -name "*.so" -print -exec ldd {} \;
14467- - section_end ldd_section
14468- artifacts:
14469- when: always
14470- name: "${CI_PROJECT_NAME}_${CI_JOB_NAME_SLUG}"
14471- paths:
14472- - results/
14473- rules:
14474- - !reference [.common-rules, rules]
14475- - !reference [.never-post-merge-rules, rules]
14476-
14477-.formatting-check:
14478- # Cancel job if a newer commit is pushed to the same branch
14479- interruptible: true
14480- stage: code-validation
14481- extends:
14482- - .use-debian/arm64_build
14483- variables:
14484- GIT_STRATEGY: fetch
14485- timeout: 10m
14486- script:
14487- - git diff --color=always --exit-code # Fails if there are diffs
14488- tags:
14489- - $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
14490-
14491-.test-gl:
14492- extends:
14493- - .test
14494- - .use-debian/x86_64_test-gl
14495- needs:
14496- - job: debian/x86_64_test-gl
14497- optional: true
14498- - job: debian-x86_64
14499- variables:
14500- DEBIAN_ARCH: amd64
14501- S3_ARTIFACT_NAME: mesa-x86_64-default-debugoptimized
14502-
14503-.test-vk:
14504- extends:
14505- - .test
14506- - .use-debian/x86_64_test-vk
14507- needs:
14508- - job: debian-x86_64
14509- - job: debian/x86_64_test-vk
14510- optional: true
14511- variables:
14512- DEBIAN_ARCH: amd64
14513- S3_ARTIFACT_NAME: mesa-x86_64-default-debugoptimized
14514-
14515-.test-cl:
14516- extends:
14517- - .test
14518- - .use-debian/x86_64_test-gl
14519- needs:
14520- - job: debian/x86_64_test-gl
14521- optional: true
14522- variables:
14523- S3_ARTIFACT_NAME: mesa-x86_64-default-debugoptimized
14524-
14525-.test-android:
14526- extends:
14527- - .test
14528- - .use-debian/x86_64_test-android
14529- variables:
14530- # This is for the guest artifacts from debian-android which will be
14531- # downloaded explicitly by cuttlefish-runner.sh
14532- S3_ANDROID_ARTIFACT_NAME: mesa-x86_64-android-debug
14533- S3_ARTIFACT_NAME: mesa-x86_64-default-debugoptimized
14534- # Set the default Vulkan driver to lavapipe for some preliminary checks
14535- # that Cuttlefish always performs before starting the VM. This can be
14536- # overwritten depending on the physical machine running the job.
14537- VK_DRIVER: "lvp"
14538- needs:
14539- - job: debian-x86_64
14540- artifacts: true # On the host we want the Linux build
14541- - job: debian-android
14542- artifacts: false # The Android build will be downloaded later
14543- - job: debian/x86_64_test-android
14544- artifacts: false
14545- optional: true
14546- timeout: 20m
14547- script:
14548- - ./install/cuttlefish-runner.sh
14549- artifacts:
14550- paths:
14551- - results/
14552-
14553-.test-android-cts:
14554- variables:
14555- ANDROID_CTS_TAG: ${CONDITIONAL_BUILD_ANDROID_CTS_TAG}
14556-
14557-.test-angle:
14558- variables:
14559- ANGLE_TAG: ${CONDITIONAL_BUILD_ANGLE_TAG}
14560-
14561-.test-crosvm:
14562- variables:
14563- CROSVM_TAG: ${CONDITIONAL_BUILD_CROSVM_TAG}
14564-
14565-.test-fluster:
14566- variables:
14567- FLUSTER_TAG: ${CONDITIONAL_BUILD_FLUSTER_TAG}
14568-
14569-.test-piglit:
14570- variables:
14571- PIGLIT_TAG: ${CONDITIONAL_BUILD_PIGLIT_TAG}
14572-
14573-.test-vkd3d-proton:
14574- variables:
14575- VKD3D_PROTON_TAG: ${CONDITIONAL_BUILD_VKD3D_PROTON_TAG}
14576- HWCI_TEST_SCRIPT: install/vkd3d-runner.sh
14577-
14578-.piglit-traces-test:
14579- artifacts:
14580- when: on_failure
14581- name: "${CI_PROJECT_NAME}_${CI_JOB_NAME_SLUG}"
14582- reports:
14583- junit: results/junit.xml
14584- paths:
14585- - results/
14586- exclude:
14587- - results/*.shader_cache
14588- extends:
14589- - .test-piglit
14590- variables:
14591- PIGLIT_CACHE_DIR: $CI_PROJECT_DIR
14592- PIGLIT_REPLAY_EXTRA_ARGS: --db-path ${PIGLIT_CACHE_DIR}/replayer-db/ --minio_bucket=${S3_TRACIE_PUBLIC_BUCKET} --jwt-file=${S3_JWT_FILE}
14593- PIGLIT_REPLAY_DEVICE_NAME: $GPU_VERSION
14594- PIGLIT_RESULTS: "${GPU_VERSION}-replay"
14595- PIGLIT_NO_WINDOW: 1
14596- HWCI_TEST_SCRIPT: "install/piglit/piglit-traces.sh"
14597- # For downloading traces:
14598- CI_TRON_HTTP_ARTIFACT__TRACIE_PUBLIC__PATH: /caching_proxy/https://s3.freedesktop.org/mesa-tracie-public/(.*)
14599- CI_TRON_HTTP_ARTIFACT__TRACIE_PUBLIC__URL: https://s3.freedesktop.org/mesa-tracie-public/\1
14600- # For uploading renders:
14601- # s3.fd.o redirects to hetzner, so we need that too
14602- CI_TRON_PROXY__ALLOWED_ENDPOINTS_CATEGORY__S3__FDO: s3.freedesktop.org:443
14603- CI_TRON_PROXY__ALLOWED_ENDPOINTS_CATEGORY__S3__BACKEND: fsn1.your-objectstorage.com:443
14604-
14605-.deqp-test:
14606- script:
14607- - if [ "${GIT_STRATEGY:-}" = none ]; then rm -rf results; fi # Clear out old results if the docker container was cached
14608- - ./install/deqp-runner.sh
14609- artifacts:
14610- exclude:
14611- - results/*.shader_cache
14612- reports:
14613- junit: results/junit.xml
14614-
14615-.fossilize-test:
14616- script:
14617- - ./install/fossilize-runner.sh
14618- artifacts:
14619- when: on_failure
14620- name: "${CI_PROJECT_NAME}_${CI_JOB_NAME_SLUG}"
14621- paths:
14622- - results/
14623-
14624-.download_s3:
14625- before_script:
14626- - !reference [default, before_script]
14627- # Use this instead of gitlab's artifacts download because it hits packet.net
14628- # instead of fd.o. Set FDO_HTTP_CACHE_URI to an http cache for your test lab to
14629- # improve it even more (see https://docs.mesa3d.org/ci/bare-metal.html for
14630- # setup).
14631- - section_start artifacts_download "Downloading artifacts from s3"
14632- # Note: Build dir (and thus install) may be dirty due to GIT_STRATEGY
14633- - if [ "${GIT_STRATEGY:-}" = none ]; then rm -rf install; fi
14634- - (set -x; curl -L --retry 4 -f --retry-all-errors --retry-delay 60 ${FDO_HTTP_CACHE_URI:-}https://${PIPELINE_ARTIFACTS_BASE}/${S3_ARTIFACT_NAME}.tar.zst | tar --zstd -x)
14635- - section_end artifacts_download
14636diff --git a/.gitlab-ci/test/gitlab-ci.yml b/.gitlab-ci/test/gitlab-ci.yml
14637deleted file mode 100644
14638index 66f5a9a..0000000
14639--- a/.gitlab-ci/test/gitlab-ci.yml
14640+++ /dev/null
14641@@ -1,105 +0,0 @@
14642-include:
14643- - local: '.gitlab-ci/test/gitlab-ci-inc.yml'
14644-
14645-mr-label-maker-test:
14646- extends:
14647- - .fdo.ci-fairy
14648- stage: sanity
14649- tags:
14650- - placeholder-job
14651- rules:
14652- - !reference [.mr-label-maker-rules, rules]
14653- variables:
14654- GIT_STRATEGY: fetch
14655- timeout: 10m
14656- script:
14657- - set -eu
14658- - python3 -m venv .venv
14659- - source .venv/bin/activate
14660- - pip install git+https://gitlab.freedesktop.org/freedesktop/mr-label-maker
14661- - mr-label-maker --dry-run --mr $CI_MERGE_REQUEST_IID
14662-
14663-rustfmt:
14664- extends:
14665- - .formatting-check
14666- - .lint-rustfmt-rules
14667- before_script:
14668- - shopt -s globstar
14669- - source "$HOME/.cargo/env"
14670- - rustfmt --version
14671- - rustfmt --verbose src/**/*.rs
14672-
14673-shader-db:
14674- stage: code-validation
14675- extends:
14676- - .use-debian/x86_64_build
14677- rules:
14678- - !reference [.never-post-merge-rules, rules]
14679- - !reference [.core-rules, rules]
14680- # Keep this list in sync with the drivers tested in run-shader-db.sh
14681- - !reference [.freedreno-common-rules, rules]
14682- - !reference [.intel-common-rules, rules]
14683- - !reference [.lima-rules, rules]
14684- - !reference [.v3d-rules, rules]
14685- - !reference [.vc4-rules, rules]
14686- - !reference [.nouveau-rules, rules]
14687- - !reference [.r300-rules, rules]
14688- - !reference [.radeonsi-collabora-rules, rules]
14689- # Also run if this job's own config or script changes
14690- - changes:
14691- - .gitlab-ci/build/gitlab-ci.yml
14692- - .gitlab-ci/run-shader-db.sh
14693- needs:
14694- - debian-build-x86_64
14695- variables:
14696- S3_ARTIFACT_NAME: debian-build-x86_64
14697- before_script:
14698- - !reference [.download_s3, before_script]
14699- script: |
14700- .gitlab-ci/run-shader-db.sh
14701- artifacts:
14702- paths:
14703- - shader-db
14704- timeout: 15m
14705-
14706-yaml-toml-shell-py-test:
14707- extends:
14708- - .use-debian/arm64_build
14709- - .no-auto-retry # this job can't be flaky
14710- stage: code-validation
14711- script:
14712- - uncollapsed_section_start tomllint "tomllint"
14713- - echo "If your change looks right but this script rejects it, contact @eric (GitLab) / eric_engestrom (IRC)."
14714- - python3 bin/toml_lint.py
14715- - uncollapsed_section_switch yamllint "yamllint"
14716- - .gitlab-ci/run-yamllint.sh
14717- - uncollapsed_section_switch shellcheck "shellcheck"
14718- - .gitlab-ci/run-shellcheck.sh
14719- - section_end shellcheck
14720- - .gitlab-ci/run-pytest.sh
14721- rules:
14722- - !reference [.never-post-merge-rules, rules]
14723- - !reference [.no_scheduled_pipelines-rules, rules]
14724- # merge pipeline
14725- - if: $GITLAB_USER_LOGIN == "marge-bot" && $CI_PIPELINE_SOURCE == "merge_request_event"
14726- changes: &lint_files
14727- - .gitlab-ci/test/gitlab-ci.yml
14728- - .gitlab-ci/**/*.sh
14729- - .shellcheckrc
14730- - bin/toml_lint.py
14731- - src/**/ci/*.toml
14732- - .gitlab-ci/lava/tests/**/*
14733- - bin/ci/**/*
14734- when: on_success
14735- # direct pushes that bypassed the CI
14736- - if: $CI_PROJECT_NAMESPACE == "mesa" && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
14737- changes: *lint_files
14738- when: on_success
14739- # direct pushes from release manager
14740- - if: $CI_PROJECT_NAMESPACE == "mesa" && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_REF_NAME =~ /^staging\//
14741- changes: *lint_files
14742- when: on_success
14743- - changes: *lint_files
14744- when: manual
14745- tags:
14746- - $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
14747diff --git a/.gitlab-ci/vkd3d-runner.sh b/.gitlab-ci/vkd3d-runner.sh
14748deleted file mode 100755
14749index f30c587..0000000
14750--- a/.gitlab-ci/vkd3d-runner.sh
14751+++ /dev/null
14752@@ -1,177 +0,0 @@
14753-#!/usr/bin/env bash
14754-# shellcheck disable=SC1091 # paths only become valid at runtime
14755-
14756-. "${SCRIPTS_DIR}/setup-test-env.sh"
14757-
14758-set -eu -o pipefail
14759-
14760-comma_separated() {
14761- local IFS=,
14762- echo "$*"
14763-}
14764-
14765-if [[ -z "$VK_DRIVER" ]]; then
14766- printf "VK_DRIVER is not defined\n"
14767- exit 1
14768-fi
14769-
14770-if [ -z "$VKD3D_PROTON_TAG" ]; then
14771- echo "VKD3D_PROTON_TAG must be set to the conditional build tag"
14772- exit 1
14773-fi
14774-
14775-# Are we using the right vkd3d-proton version?
14776-ci_tag_test_time_check "VKD3D_PROTON_TAG"
14777-
14778-INSTALL=$(realpath -s "$PWD"/install)
14779-
14780-# Set up the driver environment.
14781-# Modifiying here directly LD_LIBRARY_PATH may cause problems when
14782-# using a command wrapper. Hence, we will just set it when running the
14783-# command.
14784-export LD_LIBRARY_PATH="${LD_LIBRARY_PATH:-}:$INSTALL/lib/"
14785-
14786-
14787-# Set the Vulkan driver to use.
14788-ARCH=$(uname -m)
14789-export VK_DRIVER_FILES="$INSTALL/share/vulkan/icd.d/${VK_DRIVER}_icd.$ARCH.json"
14790-
14791-# Set environment for Wine.
14792-export WINEDEBUG="-all"
14793-export WINEPREFIX="/vkd3d-proton-wine64"
14794-export WINEESYNC=1
14795-
14796-if [ -f "$INSTALL/$GPU_VERSION-vkd3d-skips.txt" ]; then
14797- mapfile -t skips < <(grep -vE '^#|^$' "$INSTALL/$GPU_VERSION-vkd3d-skips.txt")
14798- VKD3D_TEST_EXCLUDE=$(comma_separated "${skips[@]}")
14799- printf 'VKD3D_TEST_EXCLUDE=%s\n' "$VKD3D_TEST_EXCLUDE"
14800- export VKD3D_TEST_EXCLUDE
14801-fi
14802-
14803-# Sanity check to ensure that our environment is sufficient to make our tests
14804-# run against the Mesa built by CI, rather than any installed distro version.
14805-MESA_VERSION=$(cat "$INSTALL/VERSION")
14806-if ! vulkaninfo | grep driverInfo | tee /tmp/version.txt | grep -qF "Mesa $MESA_VERSION"; then
14807- printf "%s\n" "Found $(cat /tmp/version.txt), expected $MESA_VERSION"
14808- exit 1
14809-fi
14810-
14811-# Gather the list expected failures
14812-EXPECTATIONFILE="$RESULTS_DIR/$GPU_VERSION-vkd3d-fails.txt"
14813-if [ -f "$INSTALL/$GPU_VERSION-vkd3d-fails.txt" ]; then
14814- # Ignore the grep "failure" if the file exists but contains only comments
14815- # or empty lines; the expectation file used will be empty in this case,
14816- # which is not a problem.
14817- grep -vE '^(#|$)' "$INSTALL/$GPU_VERSION-vkd3d-fails.txt" | sort > "$EXPECTATIONFILE" || true
14818-else
14819- printf "%s\n" "$GPU_VERSION-vkd3d-fails.txt not found, assuming a \"no failures\" baseline."
14820- touch "$EXPECTATIONFILE"
14821-fi
14822-
14823-if [ -f "$INSTALL/$GPU_VERSION-vkd3d-flakes.txt" ]; then
14824- mapfile -t flakes < <(grep -vE '^#|^$' "$INSTALL/$GPU_VERSION-vkd3d-flakes.txt")
14825-else
14826- flakes=()
14827-fi
14828-
14829-# Some sanity checks before we start
14830-mapfile -t flakes_dups < <(
14831- [ ${#flakes[@]} -eq 0 ] ||
14832- printf '%s\n' "${flakes[@]}" | sort | uniq -d
14833-)
14834-if [ ${#flakes_dups[@]} -gt 0 ]; then
14835- printf >&2 'Duplicate flakes lines:\n'
14836- printf >&2 ' %s\n' "${flakes_dups[@]}"
14837- exit 1
14838-fi
14839-
14840-flakes_in_baseline=()
14841-for flake in "${flakes[@]}"; do
14842- if grep -qF "$flake" "$EXPECTATIONFILE"; then
14843- flakes_in_baseline+=("$flake")
14844- fi
14845-done
14846-if [ ${#flakes_in_baseline[@]} -gt 0 ]; then
14847- printf >&2 "Flakes found in %s:\n" "$EXPECTATIONFILE"
14848- printf >&2 ' %s\n' "${flakes_in_baseline[@]}"
14849- exit 1
14850-fi
14851-
14852-printf "%s\n" "Running vkd3d-proton testsuite..."
14853-
14854-LOGFILE="$RESULTS_DIR/vkd3d-proton-log.txt"
14855-TEST_LOGS="/test-logs"
14856-pushd /vkd3d-proton-tests
14857-tests/test-runner.sh tests/d3d12 --jobs "${FDO_CI_CONCURRENT:-4}" --output-dir "$TEST_LOGS" | tee "$LOGFILE" || true
14858-popd
14859-
14860-printf '\n\n'
14861-
14862-# Print list of flakes seen this time
14863-flakes_seen=()
14864-for flake in "${flakes[@]}"; do
14865- if grep -qF "FAILED $flake" "$LOGFILE"; then
14866- flakes_seen+=("$flake")
14867- fi
14868-done
14869-if [ ${#flakes_seen[@]} -gt 0 ]; then
14870- # Keep this string and output format in line with the corresponding
14871- # deqp-runner message
14872- printf >&2 '\nSome known flakes found:\n'
14873- printf >&2 ' %s\n' "${flakes_seen[@]}"
14874-fi
14875-
14876-# Collect all the failures; ignore grep "failure" if there are none
14877-fails_lines=$(grep -oE "^FAILED .+$" "$LOGFILE" | cut -d' ' -f2 | sort) || true
14878-if [ -n "$fails_lines" ]; then
14879- mapfile -t fails < <(echo "$fails_lines")
14880-else
14881- fails=()
14882-fi
14883-
14884-# Save test output for failed tests (before excluding flakes)
14885-for failed_test in "${fails[@]}"; do
14886- cp "$TEST_LOGS/$failed_test.log" "$RESULTS_DIR/$failed_test.log"
14887-done
14888-
14889-# Ignore flakes when comparing
14890-for flake in "${flakes[@]}"; do
14891- for idx in "${!fails[@]}"; do
14892- grep -qF "$flake" <<< "${fails[$idx]}" && unset -v 'fails[$idx]'
14893- done
14894-done
14895-
14896-RESULTSFILE="$RESULTS_DIR/$GPU_VERSION.txt"
14897-for failed_test in "${fails[@]}"; do
14898- if ! grep -qE "$failed_test end" "$RESULTS_DIR/$failed_test.log"; then
14899- test_status=Crash
14900- elif grep -qE "Test failed:" "$RESULTS_DIR/$failed_test.log"; then
14901- test_status=Fail
14902- else
14903- test_status=Unknown
14904- fi
14905- printf '%s,%s\n' "$failed_test" "$test_status"
14906-done > "$RESULTSFILE"
14907-
14908-# Catch tests listed but not executed or not failing
14909-mapfile -t expected_fail_lines < "$EXPECTATIONFILE"
14910-for expected_fail_line in "${expected_fail_lines[@]}"; do
14911- test_name=$(cut -d, -f1 <<< "$expected_fail_line")
14912- if [ ! -f "$TEST_LOGS/$test_name.log" ]; then
14913- test_status='UnexpectedImprovement(Skip)'
14914- elif [ ! -f "$RESULTS_DIR/$test_name.log" ]; then
14915- test_status='UnexpectedImprovement(Pass)'
14916- else
14917- continue
14918- fi
14919- printf '%s,%s\n' "$test_name" "$test_status"
14920-done >> "$RESULTSFILE"
14921-
14922-mapfile -t unexpected_results < <(comm -23 <(sort "$RESULTSFILE") <(sort "$EXPECTATIONFILE"))
14923-if [ ${#unexpected_results[@]} -gt 0 ]; then
14924- printf >&2 '\nUnexpected results:\n'
14925- printf >&2 ' %s\n' "${unexpected_results[@]}"
14926- exit 1
14927-fi
14928-
14929-exit 0
14930diff --git a/.gitlab-ci/windows/Dockerfile_build b/.gitlab-ci/windows/Dockerfile_build
14931deleted file mode 100644
14932index 46b51a7..0000000
14933--- a/.gitlab-ci/windows/Dockerfile_build
14934+++ /dev/null
14935@@ -1,18 +0,0 @@
14936-# escape=`
14937-
14938-ARG base_image
14939-FROM ${base_image}
14940-
14941-COPY mesa_deps_vulkan_sdk.ps1 C:\
14942-RUN C:\mesa_deps_vulkan_sdk.ps1
14943-
14944-COPY mesa_init_msvc.ps1 C:\
14945-
14946-COPY mesa_deps_libva.ps1 C:\
14947-RUN C:\mesa_deps_libva.ps1
14948-
14949-COPY mesa_deps_build.ps1 C:\
14950-RUN C:\mesa_deps_build.ps1
14951-
14952-# When building, `--isolation=process` can leverage all cores and memory
14953-# docker build --isolation=process -f .\Dockerfile_build -t mesa_dep --build-arg base_image=mesa_msvc .
14954diff --git a/.gitlab-ci/windows/Dockerfile_msvc b/.gitlab-ci/windows/Dockerfile_msvc
14955deleted file mode 100644
14956index 751383f..0000000
14957--- a/.gitlab-ci/windows/Dockerfile_msvc
14958+++ /dev/null
14959@@ -1,34 +0,0 @@
14960-# escape=`
14961-
14962-ARG base_image
14963-FROM ${base_image}
14964-
14965-# https://www.thomasmaurer.ch/2019/07/how-to-install-and-update-powershell-7/
14966-# Wrapping the following command in cmd.exe
14967-# iex "& { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI -Quiet"
14968-RUN powershell -ExecutionPolicy RemoteSigned -Command "$ErrorActionPreference = 'Stop'; iex ""& { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI -Quiet"""
14969-
14970-# Make sure any failure in PowerShell scripts is fatal
14971-SHELL ["pwsh", "-ExecutionPolicy", "RemoteSigned", "-Command", "$ErrorActionPreference = 'Stop';"]
14972-RUN Write-Output $PSVersionTable $ErrorActionPreference
14973-
14974-COPY mesa_deps_msvc.ps1 C:\
14975-RUN C:\mesa_deps_msvc.ps1
14976-
14977-COPY mesa_deps_winget.ps1 C:\
14978-RUN C:\mesa_deps_winget.ps1
14979-COPY mesa_deps_winget_settings.json C:\Users\ContainerAdministrator\AppData\Local\Microsoft\WinGet\Settings\defaultState\settings.json
14980-
14981-COPY mesa_deps_packages.ps1 C:\
14982-RUN C:\mesa_deps_packages.ps1
14983-
14984-# Example usage:
14985-# `base_image` should use windows image that can be run with `--isolation=process` option,
14986-# since the resulting container will want to be used that way be later containers in the build process.
14987-# Only --isolation=hyperv can succeed building this container locally,
14988-# --isolation=process have network issue when installing Visual Studio and choco will crash
14989-# docker build --isolation=hyperv -f .\Dockerfile_msvc -t mesa_msvc --build-arg base_image="mcr.microsoft.com/windows:10.0.19041.1415" .
14990-
14991-# Example run:
14992-# docker run --isolation=hyperv -it --rm -v ${PWD}:${PWD} mesa_msvc pwsh -ExecutionPolicy RemoteSigned
14993-# docker run --isolation=process -it --rm -v ${PWD}:${PWD} mesa_msvc pwsh -ExecutionPolicy RemoteSigned
14994diff --git a/.gitlab-ci/windows/Dockerfile_test b/.gitlab-ci/windows/Dockerfile_test
14995deleted file mode 100644
14996index d75e2a8..0000000
14997--- a/.gitlab-ci/windows/Dockerfile_test
14998+++ /dev/null
14999@@ -1,25 +0,0 @@
15000-# escape=`
15001-
15002-ARG base_image
15003-FROM ${base_image}
15004-
15005-COPY mesa_deps_vulkan_sdk.ps1 C:\
15006-RUN C:\mesa_deps_vulkan_sdk.ps1
15007-
15008-COPY mesa_deps_d3d.ps1 C:\
15009-RUN C:\mesa_deps_d3d.ps1
15010-
15011-COPY mesa_deps_rust.ps1 C:\
15012-RUN C:\mesa_deps_rust.ps1
15013-
15014-COPY mesa_init_msvc.ps1 C:\
15015-
15016-COPY mesa_deps_libva.ps1 C:\
15017-RUN C:\mesa_deps_libva.ps1
15018-
15019-COPY mesa_deps_test_piglit.ps1 C:\
15020-RUN C:\mesa_deps_test_piglit.ps1
15021-COPY mesa_deps_test_deqp.ps1 c:\
15022-RUN C:\mesa_deps_test_deqp.ps1
15023-COPY mesa_deps_test.ps1 C:\
15024-RUN C:\mesa_deps_test.ps1
15025diff --git a/.gitlab-ci/windows/README.md b/.gitlab-ci/windows/README.md
15026deleted file mode 100644
15027index 8c8780a..0000000
15028--- a/.gitlab-ci/windows/README.md
15029+++ /dev/null
15030@@ -1,36 +0,0 @@
15031-# Native Windows GitLab CI builds
15032-
15033-Unlike Linux, Windows cannot reuse the freedesktop ci-templates as they exist
15034-as we do not have Podman, Skopeo, or even Docker-in-Docker builds available
15035-under Windows.
15036-
15037-We still reuse the same model: build a base container with the core operating
15038-system and infrequently-changed build dependencies, then execute Mesa builds
15039-only inside that base container. This is open-coded in PowerShell scripts.
15040-
15041-## Base container build
15042-
15043-The base container build job executes the `mesa_container.ps1` script which
15044-reproduces the ci-templates behaviour. It looks for the registry image in
15045-the user's namespace, and exits if found. If not found, it tries to copy
15046-the same image tag from the upstream Mesa repository. If that is not found,
15047-the image is rebuilt inside the user's namespace.
15048-
15049-The rebuild executes `docker build` which calls `mesa_deps.ps1` inside the
15050-container to fetch and install all build dependencies. This includes Visual
15051-Studio Community Edition (downloaded from Microsoft, under the license which
15052-allows use by open-source projects), other build tools from winget, and
15053-finally Meson and Python dependencies from PyPI.
15054-
15055-This job is executed inside a Windows shell environment directly inside the
15056-host, without Docker.
15057-
15058-## Mesa build
15059-
15060-The Mesa build runs inside the base container, executing `mesa_build.ps1`.
15061-This simply compiles Mesa using Meson and Ninja, executing the build and
15062-unit tests. Currently, no build artifacts are captured.
15063-
15064-## Using build scripts locally
15065-
15066-`*.ps1` scripts for building dockers are using PowerShell 7 to run
15067diff --git a/.gitlab-ci/windows/deqp_runner_run.ps1 b/.gitlab-ci/windows/deqp_runner_run.ps1
15068deleted file mode 100644
15069index 53d708e..0000000
15070--- a/.gitlab-ci/windows/deqp_runner_run.ps1
15071+++ /dev/null
15072@@ -1,38 +0,0 @@
15073-# VK_DRIVER_FILES environment variable is not used when running with
15074-# elevated privileges. Add a key to the registry instead.
15075-$hkey_path = "HKLM:\SOFTWARE\Khronos\Vulkan\Drivers\"
15076-$hkey_name = Join-Path -Path $pwd -ChildPath "_install\share\vulkan\icd.d\dzn_icd.x86_64.json"
15077-New-Item -Path $hkey_path -force
15078-New-ItemProperty -Path $hkey_path -Name $hkey_name -Value 0 -PropertyType DWORD
15079-
15080-$results = New-Item -ItemType Directory results
15081-$baseline = ".\_install\warp-fails.txt"
15082-$suite = ".\_install\deqp-dozen.toml"
15083-
15084-$jobs = ""
15085-if ($null -ne $env:FDO_CI_CONCURRENT) {
15086- $jobs = "--jobs", "$($env:FDO_CI_CONCURRENT)"
15087-}
15088-if ($env:DEQP_FRACTION -eq $null) {
15089- $env:DEQP_FRACTION = 1
15090-}
15091-
15092-$env:DZN_DEBUG = "warp"
15093-$env:MESA_VK_IGNORE_CONFORMANCE_WARNING = "true"
15094-deqp-runner suite --suite $($suite) `
15095---output $($results) `
15096---baseline $($baseline) `
15097---testlog-to-xml C:\deqp\executor\testlog-to-xml.exe `
15098---fraction $env:DEQP_FRACTION `
15099-$jobs
15100-$deqpstatus = $?
15101-
15102-$template = "See $($env:ARTIFACTS_BASE_URL)/results/{{testcase}}.xml"
15103-deqp-runner junit --testsuite dEQP --results "$($results)/failures.csv" --output "$($results)/junit.xml" --limit 50 --template $template
15104-Copy-Item -Path "C:\deqp\testlog.css" -Destination $($results)
15105-Copy-Item -Path "C:\deqp\testlog.xsl" -Destination $($results)
15106-Remove-Item -Path "$($results)/*.shader_cache"
15107-
15108-if (!$deqpstatus) {
15109- Exit 1
15110-}
15111diff --git a/.gitlab-ci/windows/mesa_build.ps1 b/.gitlab-ci/windows/mesa_build.ps1
15112deleted file mode 100644
15113index 88bbd89..0000000
15114--- a/.gitlab-ci/windows/mesa_build.ps1
15115+++ /dev/null
15116@@ -1,93 +0,0 @@
15117-# Clear CI_COMMIT_MESSAGE and CI_COMMIT_DESCRIPTION for please meson
15118-# when the commit message is complicated
15119-$env:CI_COMMIT_MESSAGE=""
15120-$env:CI_COMMIT_DESCRIPTION=""
15121-
15122-# force the CA cert cache to be rebuilt, in case Meson tries to access anything
15123-Write-Host "Refreshing Windows TLS CA cache"
15124-(New-Object System.Net.WebClient).DownloadString("https://github.com") >$null
15125-
15126-$env:PYTHONUTF8=1
15127-
15128-Get-Date
15129-Write-Host "Compiling Mesa"
15130-$builddir = New-Item -Force -ItemType Directory -Name "_build"
15131-$installdir = New-Item -Force -ItemType Directory -Name "_install"
15132-$builddir=$builddir.FullName
15133-$installdir=$installdir.FullName
15134-$sourcedir=$PWD
15135-
15136-Remove-Item -Recurse -Force $builddir
15137-Remove-Item -Recurse -Force $installdir
15138-New-Item -ItemType Directory -Path $builddir
15139-New-Item -ItemType Directory -Path $installdir
15140-
15141-Write-Output "*" > $builddir\.gitignore
15142-Write-Output "*" > $installdir\.gitignore
15143-
15144-Write-Output builddir:$builddir
15145-Write-Output installdir:$installdir
15146-Write-Output sourcedir:$sourcedir
15147-
15148-$vcvars_ver_arg="$args"
15149-$MyPath = $MyInvocation.MyCommand.Path | Split-Path -Parent
15150-. "$MyPath\mesa_init_msvc.ps1" "$vcvars_ver_arg"
15151-
15152-$depsInstallPath="C:\mesa-deps"
15153-
15154-Push-Location $builddir
15155-
15156-meson setup `
15157---default-library=shared `
15158---buildtype=release `
15159---wrap-mode=nodownload `
15160--Db_ndebug=false `
15161--Db_vscrt=mt `
15162---cmake-prefix-path="$depsInstallPath" `
15163---pkg-config-path="$depsInstallPath\lib\pkgconfig;$depsInstallPath\share\pkgconfig" `
15164---prefix="$installdir" `
15165--Dllvm=enabled `
15166--Dshared-llvm=disabled `
15167--Dvulkan-drivers="swrast,amd,microsoft-experimental" `
15168--Dgallium-drivers="llvmpipe,softpipe,d3d12,zink,virgl" `
15169--Dgallium-va=enabled `
15170--Dgallium-d3d10umd=true `
15171--Dgallium-mediafoundation=enabled `
15172--Dvideo-codecs="all" `
15173--Dmediafoundation-codecs="all" `
15174--Dmediafoundation-store-dll=false `
15175--Dgallium-mediafoundation-test=false `
15176--Dgles1=enabled `
15177--Dgles2=enabled `
15178--Dgallium-rusticl=false `
15179--Dmicrosoft-clc=enabled `
15180--Dstatic-libclc=all `
15181--Dspirv-to-dxil=true `
15182--Dbuild-tests=true `
15183--Dwerror=true `
15184--Dwarning_level=2 `
15185-$env:EXTRA_MESON_ARGS `
15186-$sourcedir && `
15187-meson install && `
15188-meson test --num-processes 32 --print-errorlogs
15189-
15190-$buildstatus = $?
15191-Pop-Location
15192-
15193-Get-Date
15194-
15195-if (!$buildstatus) {
15196- Write-Host "Mesa build or test failed"
15197- Exit 1
15198-}
15199-
15200-Copy-Item ".\.gitlab-ci\windows\piglit_run.ps1" -Destination $installdir
15201-
15202-Copy-Item ".\.gitlab-ci\windows\spirv2dxil_check.ps1" -Destination $installdir
15203-Copy-Item ".\.gitlab-ci\windows\spirv2dxil_run.ps1" -Destination $installdir
15204-
15205-Copy-Item ".\.gitlab-ci\windows\deqp_runner_run.ps1" -Destination $installdir
15206-
15207-Copy-Item ".\.gitlab-ci\windows\vainfo_run.ps1" -Destination $installdir
15208-
15209-Get-ChildItem -Recurse -Filter "ci" | Get-ChildItem -Include "*.txt","*.toml" | Copy-Item -Destination $installdir
15210diff --git a/.gitlab-ci/windows/mesa_container.ps1 b/.gitlab-ci/windows/mesa_container.ps1
15211deleted file mode 100644
15212index cbb9e22..0000000
15213--- a/.gitlab-ci/windows/mesa_container.ps1
15214+++ /dev/null
15215@@ -1,58 +0,0 @@
15216-# Implements the equivalent of ci-templates container-ifnot-exists, using
15217-# Docker directly as we don't have buildah/podman/skopeo available under
15218-# Windows, nor can we execute Docker-in-Docker
15219-$registry_uri = $args[0]
15220-$registry_username = $args[1]
15221-$registry_password = $args[2]
15222-$registry_user_image = $args[3]
15223-$registry_central_image = $args[4]
15224-$build_dockerfile = $args[5]
15225-$registry_base_image = $args[6]
15226-
15227-Set-Location -Path ".\.gitlab-ci\windows"
15228-
15229-docker --config "windows-docker.conf" login -u "$registry_username" -p "$registry_password" "$registry_uri"
15230-if (!$?) {
15231- Write-Host "docker login failed to $registry_uri"
15232- Exit 1
15233-}
15234-
15235-# if the image already exists, don't rebuild it
15236-docker --config "windows-docker.conf" pull "$registry_user_image"
15237-if ($?) {
15238- Write-Host "User image $registry_user_image already exists; not rebuilding"
15239- docker --config "windows-docker.conf" logout "$registry_uri"
15240- Exit 0
15241-}
15242-
15243-# if the image already exists upstream, copy it
15244-docker --config "windows-docker.conf" pull "$registry_central_image"
15245-if ($?) {
15246- Write-Host "Copying central image $registry_central_image to user image $registry_user_image"
15247- docker --config "windows-docker.conf" tag "$registry_central_image" "$registry_user_image"
15248- docker --config "windows-docker.conf" push "$registry_user_image"
15249- $pushstatus = $?
15250- docker --config "windows-docker.conf" logout "$registry_uri"
15251- if (!$pushstatus) {
15252- Write-Host "Pushing image to $registry_user_image failed"
15253- Exit 1
15254- }
15255- Exit 0
15256-}
15257-
15258-Write-Host "No image found at $registry_user_image or $registry_central_image; rebuilding"
15259-docker --config "windows-docker.conf" build --no-cache -t "$registry_user_image" -f "$build_dockerfile" --build-arg base_image="$registry_base_image" .
15260-if (!$?) {
15261- Write-Host "Container build failed"
15262- docker --config "windows-docker.conf" logout "$registry_uri"
15263- Exit 1
15264-}
15265-Get-Date
15266-
15267-docker --config "windows-docker.conf" push "$registry_user_image"
15268-$pushstatus = $?
15269-docker --config "windows-docker.conf" logout "$registry_uri"
15270-if (!$pushstatus) {
15271- Write-Host "Pushing image to $registry_user_image failed"
15272- Exit 1
15273-}
15274diff --git a/.gitlab-ci/windows/mesa_deps_build.ps1 b/.gitlab-ci/windows/mesa_deps_build.ps1
15275deleted file mode 100644
15276index d4dfff7..0000000
15277--- a/.gitlab-ci/windows/mesa_deps_build.ps1
15278+++ /dev/null
15279@@ -1,171 +0,0 @@
15280-
15281-$MyPath = $MyInvocation.MyCommand.Path | Split-Path -Parent
15282-. "$MyPath\mesa_init_msvc.ps1" "-vcvars_ver=14.29"
15283-
15284-# we want more secure TLS 1.2 for most things, but it breaks SourceForge
15285-# downloads so must be done after winget use
15286-[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 -bor [Net.SecurityProtocolType]::Tls13;
15287-
15288-Remove-Item -Recurse -Force -ErrorAction SilentlyContinue "deps" | Out-Null
15289-
15290-$depsInstallPath="C:\mesa-deps"
15291-
15292-Get-Date
15293-Write-Host "Cloning DirectX-Headers"
15294-git clone -b v1.619.1 --depth=1 https://github.com/microsoft/DirectX-Headers deps/DirectX-Headers
15295-if (!$?) {
15296- Write-Host "Failed to clone DirectX-Headers repository"
15297- Exit 1
15298-}
15299-Write-Host "Building DirectX-Headers"
15300-$dxheaders_build = New-Item -ItemType Directory -Path ".\deps\DirectX-Headers" -Name "build"
15301-Push-Location -Path $dxheaders_build.FullName
15302-meson setup .. --backend=ninja -Dprefix="$depsInstallPath" --buildtype=release -Db_vscrt=mt && `
15303-ninja -j32 install
15304-$buildstatus = $?
15305-Pop-Location
15306-Remove-Item -Recurse -Force -ErrorAction SilentlyContinue -Path $dxheaders_build
15307-if (!$buildstatus) {
15308- Write-Host "Failed to compile DirectX-Headers"
15309- Exit 1
15310-}
15311-
15312-Get-Date
15313-Write-Host "Cloning zlib"
15314-git clone -b v1.3.1 --depth=1 https://github.com/madler/zlib deps/zlib
15315-if (!$?) {
15316- Write-Host "Failed to clone zlib repository"
15317- Exit 1
15318-}
15319-Write-Host "Downloading zlib meson build files"
15320-Invoke-WebRequest -Uri "https://wrapdb.mesonbuild.com/v2/zlib_1.3.1-1/get_patch" -OutFile deps/zlib.zip
15321-Expand-Archive -Path deps/zlib.zip -Destination deps/zlib
15322-# Wrap archive puts build files in a version subdir
15323-robocopy deps/zlib/zlib-1.3.1 deps/zlib /E
15324-Remove-Item -Recurse -Force -ErrorAction SilentlyContinue -Path deps/zlib/zlib-1.3.1
15325-$zlib_build = New-Item -ItemType Directory -Path ".\deps\zlib" -Name "build"
15326-Push-Location -Path $zlib_build.FullName
15327-meson setup .. --backend=ninja -Dprefix="$depsInstallPath" --default-library=static --buildtype=release -Db_vscrt=mt && `
15328-ninja -j32 install
15329-$buildstatus = $?
15330-Pop-Location
15331-Remove-Item -Recurse -Force -ErrorAction SilentlyContinue -Path $zlib_build
15332-if (!$buildstatus) {
15333- Write-Host "Failed to compile zlib"
15334- Exit 1
15335-}
15336-
15337-Get-Date
15338-Write-Host "Cloning LLVM"
15339-git clone -b llvmorg-19.1.7 --depth=1 https://github.com/llvm/llvm-project deps/llvm-project
15340-if (!$?) {
15341- Write-Host "Failed to clone LLVM repository"
15342- Exit 1
15343-}
15344-
15345-Get-Date
15346-Write-Host "Cloning SPIRV-LLVM-Translator"
15347-git clone -b v19.1.10 https://github.com/KhronosGroup/SPIRV-LLVM-Translator deps/llvm-project/llvm/projects/SPIRV-LLVM-Translator
15348-if (!$?) {
15349- Write-Host "Failed to clone SPIRV-LLVM-Translator repository"
15350- Exit 1
15351-}
15352-
15353-Get-Date
15354-# slightly convoluted syntax but avoids the CWD being under the PS filesystem meta-path
15355-$llvm_build = New-Item -ItemType Directory -ErrorAction SilentlyContinue -Force -Path ".\deps\llvm-project" -Name "build"
15356-Push-Location -Path $llvm_build.FullName
15357-Write-Host "Compiling LLVM and Clang"
15358-cmake ../llvm `
15359--GNinja `
15360--DCMAKE_BUILD_TYPE=Release `
15361--DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded `
15362--DCMAKE_PREFIX_PATH="$depsInstallPath" `
15363--DCMAKE_INSTALL_PREFIX="$depsInstallPath" `
15364--DCMAKE_CXX_FLAGS="/utf-8" `
15365--DLLVM_ENABLE_PROJECTS="clang" `
15366--DLLVM_TARGETS_TO_BUILD="AMDGPU;X86" `
15367--DLLVM_OPTIMIZED_TABLEGEN=TRUE `
15368--DLLVM_ENABLE_ASSERTIONS=TRUE `
15369--DLLVM_INCLUDE_UTILS=OFF `
15370--DLLVM_INCLUDE_RUNTIMES=OFF `
15371--DLLVM_INCLUDE_TESTS=OFF `
15372--DLLVM_INCLUDE_EXAMPLES=OFF `
15373--DLLVM_INCLUDE_GO_TESTS=OFF `
15374--DLLVM_INCLUDE_BENCHMARKS=OFF `
15375--DLLVM_BUILD_LLVM_C_DYLIB=OFF `
15376--DLLVM_ENABLE_DIA_SDK=OFF `
15377--DCLANG_BUILD_TOOLS=ON `
15378--DLLVM_SPIRV_INCLUDE_TESTS=OFF `
15379--DLLVM_ENABLE_ZLIB=OFF `
15380--Wno-dev && `
15381-ninja -j32 install
15382-$buildstatus = $?
15383-Pop-Location
15384-if (!$buildstatus) {
15385- Write-Host "Failed to compile LLVM"
15386- Exit 1
15387-}
15388-
15389-Get-Date
15390-$libclc_build = New-Item -ItemType Directory -Path ".\deps\llvm-project" -Name "build-libclc"
15391-Push-Location -Path $libclc_build.FullName
15392-Write-Host "Compiling libclc"
15393-# libclc can only be built with Ninja, because CMake's VS backend doesn't know how to compile new language types
15394-cmake ../libclc `
15395--GNinja `
15396--DCMAKE_BUILD_TYPE=Release `
15397--DCMAKE_CXX_FLAGS="-m64" `
15398--DCMAKE_POLICY_DEFAULT_CMP0091=NEW `
15399--DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded `
15400--DCMAKE_INSTALL_PREFIX="$depsInstallPath" `
15401--DLIBCLC_TARGETS_TO_BUILD="spirv-mesa3d-;spirv64-mesa3d-" && `
15402-ninja -j32 install
15403-$buildstatus = $?
15404-Pop-Location
15405-Remove-Item -Recurse -Force -ErrorAction SilentlyContinue -Path $libclc_build
15406-if (!$buildstatus) {
15407- Write-Host "Failed to compile libclc"
15408- Exit 1
15409-}
15410-Remove-Item -Recurse -Force -ErrorAction SilentlyContinue -Path $llvm_build
15411-
15412-Get-Date
15413-Write-Host "Cloning SPIRV-Tools"
15414-git clone -b "vulkan-sdk-$env:VULKAN_SDK_VERSION" --depth=1 https://github.com/KhronosGroup/SPIRV-Tools deps/SPIRV-Tools
15415-if (!$?) {
15416- Write-Host "Failed to clone SPIRV-Tools repository"
15417- Exit 1
15418-}
15419-git clone -b "vulkan-sdk-$env:VULKAN_SDK_VERSION" --depth=1 https://github.com/KhronosGroup/SPIRV-Headers deps/SPIRV-Tools/external/SPIRV-Headers
15420-if (!$?) {
15421- Write-Host "Failed to clone SPIRV-Headers repository"
15422- Exit 1
15423-}
15424-Write-Host "Building SPIRV-Tools"
15425-$spv_build = New-Item -ItemType Directory -Path ".\deps\SPIRV-Tools" -Name "build"
15426-Push-Location -Path $spv_build.FullName
15427-# SPIRV-Tools doesn't use multi-threaded MSVCRT, but we need it to
15428-cmake .. `
15429--GNinja `
15430--DCMAKE_BUILD_TYPE=Release `
15431--DCMAKE_POLICY_DEFAULT_CMP0091=NEW `
15432--DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded `
15433--DCMAKE_INSTALL_PREFIX="$depsInstallPath" && `
15434-ninja -j32 install
15435-$buildstatus = $?
15436-Pop-Location
15437-Remove-Item -Recurse -Force -ErrorAction SilentlyContinue -Path $spv_build
15438-if (!$buildstatus) {
15439- Write-Host "Failed to compile SPIRV-Tools"
15440- Exit 1
15441-}
15442-
15443-function Remove-Symlinks {
15444- Get-ChildItem -Force -ErrorAction SilentlyContinue @Args | Where-Object { if($_.Attributes -match "ReparsePoint"){$_.Delete()} }
15445-}
15446-Remove-Symlinks -Path "deps" -Recurse
15447-Remove-Item -Recurse -Force -ErrorAction SilentlyContinue -Path "deps" | Out-Null
15448-
15449-Get-Date
15450-Write-Host "Complete"
15451diff --git a/.gitlab-ci/windows/mesa_deps_d3d.ps1 b/.gitlab-ci/windows/mesa_deps_d3d.ps1
15452deleted file mode 100644
15453index a224e2a..0000000
15454--- a/.gitlab-ci/windows/mesa_deps_d3d.ps1
15455+++ /dev/null
15456@@ -1,49 +0,0 @@
15457-# Downloading specified D3D runtime
15458-# Touch this file needs update both WINDOWS_X64_BUILD_TAG WINDOWS_X64_TEST_TAG
15459-# This file needs run in administrator mode
15460-
15461-$ProgressPreference = "SilentlyContinue"
15462-
15463-$depsInstallPath="C:\mesa-deps"
15464-
15465-Write-Host "Downloading DirectX 12 Agility SDK at:"
15466-Get-Date
15467-Invoke-WebRequest -Uri https://www.nuget.org/api/v2/package/Microsoft.Direct3D.D3D12/1.619.1 -OutFile 'agility.zip'
15468-Expand-Archive -Path 'agility.zip' -DestinationPath 'C:\agility'
15469-# Copy Agility SDK into mesa-deps\bin\D3D12
15470-New-Item -ErrorAction SilentlyContinue -ItemType Directory -Path $depsInstallPath\bin -Name 'D3D12'
15471-Copy-Item 'C:\agility\build\native\bin\x64\*.dll' -Destination $depsInstallPath\bin\D3D12
15472-Remove-Item 'agility.zip'
15473-Remove-Item -Recurse 'C:\agility'
15474-
15475-Write-Host "Downloading Updated WARP at:"
15476-Get-Date
15477-Invoke-WebRequest -Uri https://www.nuget.org/api/v2/package/Microsoft.Direct3D.WARP/1.0.11 -OutFile 'warp.zip'
15478-Expand-Archive -Path 'warp.zip' -DestinationPath 'C:\warp'
15479-# Copy WARP into mesa-deps\bin
15480-Copy-Item 'C:\warp\build\native\amd64\d3d10warp.dll' -Destination $depsInstallPath\bin
15481-Remove-Item 'warp.zip'
15482-Remove-Item -Recurse 'C:\warp'
15483-
15484-Write-Host "Downloading DirectXShaderCompiler release at:"
15485-Get-Date
15486-Invoke-WebRequest -Uri https://github.com/microsoft/DirectXShaderCompiler/releases/download/v1.8.2403/dxc_2024_03_07.zip -OutFile 'DXC.zip'
15487-Expand-Archive -Path 'DXC.zip' -DestinationPath 'C:\DXC'
15488-# No more need to get dxil.dll from the VS install
15489-Copy-Item 'C:\DXC\bin\x64\*.dll' -Destination 'C:\Windows\System32'
15490-Remove-Item -Recurse 'DXC.zip'
15491-Remove-Item -Recurse 'C:\DXC'
15492-
15493-Write-Host "Enabling developer mode at:"
15494-Get-Date
15495-# Create AppModelUnlock if it doesn't exist, required for enabling Developer Mode
15496-$RegistryKeyPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock"
15497-if (-not(Test-Path -Path $RegistryKeyPath)) {
15498- New-Item -Path $RegistryKeyPath -ItemType Directory -Force
15499-}
15500-
15501-# Add registry value to enable Developer Mode
15502-New-ItemProperty -Path $RegistryKeyPath -Name AllowDevelopmentWithoutDevLicense -PropertyType DWORD -Value 1 -Force
15503-
15504-Write-Host "Complete download D3D at:"
15505-Get-Date
15506diff --git a/.gitlab-ci/windows/mesa_deps_libva.ps1 b/.gitlab-ci/windows/mesa_deps_libva.ps1
15507deleted file mode 100644
15508index 1fb201d..0000000
15509--- a/.gitlab-ci/windows/mesa_deps_libva.ps1
15510+++ /dev/null
15511@@ -1,85 +0,0 @@
15512-# Compiling libva/libva-utils deps
15513-
15514-$ProgressPreference = "SilentlyContinue"
15515-$MyPath = $MyInvocation.MyCommand.Path | Split-Path -Parent
15516-. "$MyPath\mesa_init_msvc.ps1" "-vcvars_ver=14.29"
15517-
15518-Remove-Item -Recurse -Force -ErrorAction SilentlyContinue "deps" | Out-Null
15519-$depsInstallPath="C:\mesa-deps"
15520-
15521-Write-Host "Cloning libva at:"
15522-Get-Date
15523-git clone https://github.com/intel/libva.git deps/libva
15524-if (!$?) {
15525- Write-Host "Failed to clone libva repository"
15526- Exit 1
15527-}
15528-
15529-Write-Host "Cloning libva finished at:"
15530-Get-Date
15531-
15532-Write-Host "Building libva at:"
15533-Get-Date
15534-
15535-Push-Location -Path ".\deps\libva"
15536-Write-Host "Checking out libva..."
15537-git checkout 2.21.0
15538-Pop-Location
15539-
15540-# libva already has a build dir in their repo, use builddir instead
15541-$libva_build = New-Item -ItemType Directory -Path ".\deps\libva" -Name "builddir"
15542-Push-Location -Path $libva_build.FullName
15543-meson setup .. -Dprefix="$depsInstallPath"
15544-ninja -j32 install
15545-$buildstatus = $?
15546-Pop-Location
15547-Remove-Item -Recurse -Force -ErrorAction SilentlyContinue -Path $libva_build
15548-if (!$buildstatus) {
15549- Write-Host "Failed to compile libva"
15550- Exit 1
15551-}
15552-
15553-Write-Host "Building libva finished at:"
15554-Get-Date
15555-
15556-Write-Host "Cloning libva-utils at:"
15557-Get-Date
15558-git clone https://github.com/intel/libva-utils.git deps/libva-utils
15559-if (!$?) {
15560- Write-Host "Failed to clone libva-utils repository"
15561- Exit 1
15562-}
15563-
15564-Write-Host "Cloning libva-utils finished at:"
15565-Get-Date
15566-
15567-Write-Host "Building libva-utils at:"
15568-Get-Date
15569-
15570-Push-Location -Path ".\deps\libva-utils"
15571-Write-Host "Checking out libva-utils..."
15572-git checkout 2.21.0
15573-Pop-Location
15574-
15575-Write-Host "Building libva-utils"
15576-# libva-utils already has a build dir in their repo, use builddir instead
15577-$libva_utils_build = New-Item -ItemType Directory -Path ".\deps\libva-utils" -Name "builddir"
15578-Push-Location -Path $libva_utils_build.FullName
15579-meson setup .. -Dprefix="$depsInstallPath" --pkg-config-path="$depsInstallPath\lib\pkgconfig;$depsInstallPath\share\pkgconfig"
15580-ninja -j32 install
15581-$buildstatus = $?
15582-Pop-Location
15583-Remove-Item -Recurse -Force -ErrorAction SilentlyContinue -Path $libva_utils_build
15584-if (!$buildstatus) {
15585- Write-Host "Failed to compile libva-utils"
15586- Exit 1
15587-}
15588-
15589-function Remove-Symlinks {
15590- Get-ChildItem -Force -ErrorAction SilentlyContinue @Args | Where-Object { if($_.Attributes -match "ReparsePoint"){$_.Delete()} }
15591-}
15592-Remove-Symlinks -Path "deps" -Recurse
15593-Remove-Item -Recurse -Force -ErrorAction SilentlyContinue -Path "deps" | Out-Null
15594-
15595-Write-Host "Building libva-utils finished at:"
15596-Get-Date
15597diff --git a/.gitlab-ci/windows/mesa_deps_msvc.ps1 b/.gitlab-ci/windows/mesa_deps_msvc.ps1
15598deleted file mode 100644
15599index 5f2a410..0000000
15600--- a/.gitlab-ci/windows/mesa_deps_msvc.ps1
15601+++ /dev/null
15602@@ -1,45 +0,0 @@
15603-# we want more secure TLS 1.2 for most things
15604-[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;
15605-
15606-# VS17.x is 2022
15607-$msvc_url = 'https://aka.ms/vs/17/release/vs_buildtools.exe'
15608-
15609-Write-Host "Downloading Visual Studio 2022 build tools at:"
15610-Get-Date
15611-Invoke-WebRequest -Uri $msvc_url -OutFile C:\vs_buildtools.exe
15612-
15613-Write-Host "Installing Visual Studio 2022 at:"
15614-Get-Date
15615-# Command line
15616-# https://docs.microsoft.com/en-us/visualstudio/install/command-line-parameter-examples?view=vs-2022
15617-# Component ids
15618-# https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-build-tools?view=vs-2022
15619-# https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-community?view=vs-2022
15620-Start-Process -NoNewWindow -Wait -FilePath C:\vs_buildtools.exe `
15621--ArgumentList `
15622-"--wait", `
15623-"--quiet", `
15624-"--norestart", `
15625-"--nocache", `
15626-"--installPath", "C:\BuildTools", `
15627-"--add", "Microsoft.VisualStudio.Component.VC.Redist.14.Latest", `
15628-"--add", "Microsoft.VisualStudio.Component.VC.ASAN", ` # MSVC 2022
15629-"--add", "Microsoft.VisualStudio.Component.VC.ATL", `
15630-"--add", "Microsoft.VisualStudio.Component.VC.ATLMFC", `
15631-"--add", "Microsoft.VisualStudio.Component.VC.Tools.x86.x64", `
15632-"--add", "Microsoft.VisualStudio.ComponentGroup.VC.Tools.142.x86.x64", `
15633-"--add", "Microsoft.VisualStudio.Component.VC.Llvm.Clang", `
15634-"--add", "Microsoft.VisualStudio.Component.Graphics.Tools", `
15635-"--add", "Microsoft.VisualStudio.Component.Windows10SDK.20348", `
15636-"--add", "Microsoft.VisualStudio.Component.Windows11SDK.26100"
15637-
15638-if (!$?) {
15639- Write-Host "Failed to install Visual Studio tools"
15640- Exit 1
15641-}
15642-Remove-Item C:\vs_buildtools.exe -Force
15643-
15644-Write-Host "Installing Visual Studio 2022 finished at:"
15645-Get-Date
15646-
15647-Exit 0
15648diff --git a/.gitlab-ci/windows/mesa_deps_packages.ps1 b/.gitlab-ci/windows/mesa_deps_packages.ps1
15649deleted file mode 100644
15650index 566735e..0000000
15651--- a/.gitlab-ci/windows/mesa_deps_packages.ps1
15652+++ /dev/null
15653@@ -1,96 +0,0 @@
15654-# Download new TLS certs from Windows Update
15655-Write-Host "Updating TLS certificate store at:"
15656-Get-Date
15657-Remove-Item -Recurse -Force -ErrorAction SilentlyContinue "_tlscerts" | Out-Null
15658-$certdir = (New-Item -ItemType Directory -Name "_tlscerts")
15659-certutil -syncwithWU "$certdir"
15660-Foreach ($file in (Get-ChildItem -Path "$certdir\*" -Include "*.crt")) {
15661- Import-Certificate -FilePath $file -CertStoreLocation Cert:\LocalMachine\Root | Out-Null
15662-}
15663-Remove-Item -Recurse -Path $certdir
15664-
15665-Write-Host "Installing graphics tools (DirectX debug layer) at:"
15666-Get-Date
15667-Set-Service -Name wuauserv -StartupType Manual
15668-if (!$?) {
15669- Write-Host "Failed to enable Windows Update"
15670- Exit 1
15671-}
15672-
15673-For ($i = 0; $i -lt 5; $i++) {
15674- Dism /online /quiet /add-capability /capabilityname:Tools.Graphics.DirectX~~~~0.0.1.0
15675- $graphics_tools_installed = $?
15676- if ($graphics_tools_installed) {
15677- Break
15678- }
15679-}
15680-
15681-if (!$graphics_tools_installed) {
15682- Write-Host "Failed to install graphics tools"
15683- Get-Content C:\Windows\Logs\DISM\dism.log
15684- Exit 1
15685-}
15686-
15687-$USER_PATH=[System.Environment]::GetEnvironmentVariable('PATH', [System.EnvironmentVariableTarget]::User)
15688-$MACHINE_PATH=[System.Environment]::GetEnvironmentVariable('PATH', [System.EnvironmentVariableTarget]::Machine)
15689-Write-Output "Before winget install USER_PATH:$USER_PATH MACHINE_PATH:$MACHINE_PATH"
15690-
15691-$Packages = @(
15692- 'Microsoft.WindowsWDK.10.0.26100,10.1.26100.6584',
15693- 'Python.Python.3.13,3.13.9',
15694- 'Ninja-build.Ninja,1.13.1',
15695- 'Kitware.CMake,4.1.3',
15696- 'Git.Git,2.52.0',
15697- 'WinFlexBison.win_flex_bison,2.5.24',
15698- 'bloodrock.pkg-config-lite,0.28-1'
15699-)
15700-
15701-$ProgressPreference = "SilentlyContinue"
15702-New-Item -Force -ItemType 'directory' -Name 'flexbison' -Path 'C:\temp'
15703-foreach ($package in $Packages)
15704-{
15705- $package_id, $package_version = $package -split ',', 2
15706- Write-Output "Installing $package_id with version $package_version by winget"
15707- For ($i = 0; $i -lt 5; $i++) {
15708- winget install --verbose --silent --accept-package-agreements --source winget --exact --id $package_id --version $package_version --log C:\temp\wdk-install.log
15709- $packages_installed = $?
15710- if ($packages_installed) {
15711- Break
15712- }
15713- }
15714- if (!$packages_installed) {
15715- Write-Host "Couldn't install $package with winget"
15716- Exit 1
15717- } else {
15718- Write-Output "Installed $package with winget"
15719- }
15720-}
15721-
15722-# The win_flex.exe should be directly accessed than use symbolic link https://github.com/lexxmark/winflexbison/issues/97
15723-$win_flex_target=((Get-ChildItem -Path (Get-Command win_flex).Path -Force | Select-Object Target).Target | Split-Path -Parent)
15724-$NEW_USER_PATH="$win_flex_target;"
15725-[Environment]::SetEnvironmentVariable('PATH', $NEW_USER_PATH + [Environment]::GetEnvironmentVariable('PATH', "User"), 'User')
15726-
15727-$USER_PATH=[System.Environment]::GetEnvironmentVariable('PATH', [System.EnvironmentVariableTarget]::User)
15728-$MACHINE_PATH=[System.Environment]::GetEnvironmentVariable('PATH', [System.EnvironmentVariableTarget]::Machine)
15729-Write-Output "After winget install USER_PATH:$USER_PATH MACHINE_PATH:$MACHINE_PATH"
15730-
15731-# Setup tmp path for git and python
15732-$env:PATH="$env:LOCALAPPDATA\Programs\Python\Python313\Scripts\;$env:LOCALAPPDATA\Programs\Python\Python313\;$env:ProgramFiles\Git\cmd;$env:PATH"
15733-
15734-Start-Process -NoNewWindow -Wait git -ArgumentList 'config --global core.autocrlf false'
15735-
15736-New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
15737-
15738-Write-Host "Upgrading pip at:"
15739-Get-Date
15740-python -m pip install --upgrade pip --progress-bar off
15741-Write-Host "Installing python packages at:"
15742-Get-Date
15743-pip3 install packaging meson mako "numpy < 2.0" pyyaml --progress-bar off
15744-if (!$?) {
15745- Write-Host "Failed to install dependencies from pip"
15746- Exit 1
15747-}
15748-Write-Host "Installing python packages finished at:"
15749-Get-Date
15750diff --git a/.gitlab-ci/windows/mesa_deps_rust.ps1 b/.gitlab-ci/windows/mesa_deps_rust.ps1
15751deleted file mode 100644
15752index 0545d2e..0000000
15753--- a/.gitlab-ci/windows/mesa_deps_rust.ps1
15754+++ /dev/null
15755@@ -1,17 +0,0 @@
15756-# Installing rust compiler
15757-# Touch this file needs update both WINDOWS_X64_BUILD_TAG WINDOWS_X64_TEST_TAG
15758-# This file needs run in administrator mode
15759-
15760-$ProgressPreference = "SilentlyContinue"
15761-
15762-Write-Host "Installing rust at:"
15763-Get-Date
15764-$url = 'https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-msvc/rustup-init.exe';
15765-Write-Host ('Downloading {0} ...' -f $url);
15766-Invoke-WebRequest -Uri $url -OutFile 'rustup-init.exe';
15767-Write-Host "Installing rust toolchain"
15768-.\rustup-init.exe -y;
15769-Remove-Item rustup-init.exe;
15770-
15771-Write-Host "Installing rust finished at:"
15772-Get-Date
15773diff --git a/.gitlab-ci/windows/mesa_deps_test.ps1 b/.gitlab-ci/windows/mesa_deps_test.ps1
15774deleted file mode 100644
15775index d53157c..0000000
15776--- a/.gitlab-ci/windows/mesa_deps_test.ps1
15777+++ /dev/null
15778@@ -1,29 +0,0 @@
15779-# Compiling tests deps
15780-
15781-$ProgressPreference = "SilentlyContinue"
15782-$MyPath = $MyInvocation.MyCommand.Path | Split-Path -Parent
15783-. "$MyPath\mesa_init_msvc.ps1"
15784-
15785-$spirv_samples_source = Join-Path -Path "$PWD" -ChildPath "spirv-samples"
15786-
15787-Write-Host "Cloning spirv-samples at:"
15788-Get-Date
15789-New-Item -ItemType Directory -Path "$spirv_samples_source" | Out-Null
15790-Push-Location -Path $spirv_samples_source
15791-git init
15792-git remote add origin https://github.com/dneto0/spirv-samples.git
15793-git fetch --depth 1 origin 36372636df06a24c4e2de1551beee055db01b91d # of branch main
15794-if (!$?) {
15795- Write-Host "Failed to fetch spirv-samples repository"
15796- Pop-Location
15797- Exit 1
15798-}
15799-git checkout FETCH_HEAD
15800-Pop-Location
15801-Remove-Item -Recurse -Force -ErrorAction SilentlyContinue -Path "$spirv_samples_source\.git" | Out-Null
15802-
15803-Write-Host "Cloning spirv-samples finished at:"
15804-Get-Date
15805-
15806-Write-Host "Complete Dockerfile_test at:"
15807-Get-Date
15808diff --git a/.gitlab-ci/windows/mesa_deps_test_deqp.ps1 b/.gitlab-ci/windows/mesa_deps_test_deqp.ps1
15809deleted file mode 100644
15810index 8ee434a..0000000
15811--- a/.gitlab-ci/windows/mesa_deps_test_deqp.ps1
15812+++ /dev/null
15813@@ -1,90 +0,0 @@
15814-# Compiling deqp
15815-
15816-$ProgressPreference = "SilentlyContinue"
15817-$MyPath = $MyInvocation.MyCommand.Path | Split-Path -Parent
15818-. "$MyPath\mesa_init_msvc.ps1"
15819-
15820-$source_dir = Join-Path -Path "$PWD" -ChildPath "src"
15821-$deqp_source = Join-Path -Path "$source_dir" -ChildPath "VK-GL-CTS"
15822-$deqp_build = Join-Path -Path "$PWD" -ChildPath "deqp"
15823-
15824-Write-Host "Cloning Vulkan and GL Conformance Tests at:"
15825-Get-Date
15826-New-Item -ItemType Directory -Path "$deqp_source" | Out-Null
15827-Push-Location -Path $deqp_source
15828-git init
15829-git remote add origin https://github.com/KhronosGroup/VK-GL-CTS.git
15830-git fetch --depth 1 origin d48899f85b486a70d090af59a1453763458611d9 # of branch vulkan-cts-1.3.8
15831-if (!$?) {
15832- Write-Host "Failed to fetch deqp repository"
15833- Pop-Location
15834- Exit 1
15835-}
15836-git checkout FETCH_HEAD
15837-
15838-Write-Host "Fetch sources inside $deqp_source at:"
15839-Get-Date
15840-# --insecure is due to SSL cert failures hitting sourceforge for zlib and
15841-# libpng (sigh). The archives get their checksums checked anyway, and git
15842-# always goes through ssh or https.
15843-py .\external\fetch_sources.py --insecure
15844-Pop-Location
15845-
15846-Write-Host "Compiling deqp at:"
15847-Get-Date
15848-New-Item -ItemType Directory -Path "$deqp_build" | Out-Null
15849-Push-Location -Path $deqp_build
15850-cmake -S $($deqp_source) `
15851--B . `
15852--GNinja `
15853--DCMAKE_BUILD_TYPE=Release `
15854--DCMAKE_POLICY_VERSION_MINIMUM="3.5" `
15855--DCMAKE_SYSTEM_VERSION="10.0.20348.0" `
15856--DDEQP_TARGET=default && `
15857-ninja -j32
15858-if (!$?) {
15859- Write-Host "Failed to compile deqp"
15860- Pop-Location
15861- Exit 1
15862-}
15863-Pop-Location
15864-
15865-# Copy test result templates
15866-Copy-Item -Path "$($deqp_source)\doc\testlog-stylesheet\testlog.css" -Destination $deqp_build
15867-Copy-Item -Path "$($deqp_source)\doc\testlog-stylesheet\testlog.xsl" -Destination $deqp_build
15868-
15869-# Copy Vulkan must-pass list
15870-$deqp_mustpass = New-Item -ItemType Directory -Path $deqp_build -Name "mustpass"
15871-$root_mustpass = Join-Path -Path $deqp_source -ChildPath "external\vulkancts\mustpass\main"
15872-$files = Get-Content "$($root_mustpass)\vk-default.txt"
15873-foreach($file in $files) {
15874- Get-Content "$($root_mustpass)\$($file)" | Add-Content -Path "$($deqp_mustpass)\vk-main.txt"
15875-}
15876-
15877-Write-Host "Installing deqp-runner at:"
15878-Get-Date
15879-$env:Path += ";$($env:USERPROFILE)\.cargo\bin"
15880-cargo install --git https://gitlab.freedesktop.org/anholt/deqp-runner.git --tag v0.16.1
15881-
15882-$depsInstallPath="C:\mesa-deps"
15883-$vk_cts_bin = "$deqp_build\external\vulkancts\modules\vulkan"
15884-
15885-# Hard link Agility SDK into subfolder of Vulkan CTS
15886-$agility_dest = New-Item -ItemType Directory -Path $vk_cts_bin -Name 'D3D12'
15887-New-Item -ItemType HardLink -path $agility_dest\D3D12Core.dll -Value $depsInstallPath\bin\D3D12\D3D12Core.dll
15888-New-Item -ItemType HardLink -path $agility_dest\d3d12SDKLayers.dll -Value $depsInstallPath\bin\D3D12\d3d12SDKLayers.dll
15889-
15890-# Hard link WARP next to Vulkan CTS
15891-New-Item -ItemType HardLink -path $vk_cts_bin\d3d10warp.dll -Value $depsInstallPath\bin\d3d10warp.dll
15892-
15893-Remove-Item -Recurse -Force -ErrorAction SilentlyContinue -Path "$source_dir" | Out-Null
15894-
15895-# Cleanup deqp intermediate files
15896-Get-ChildItem -Force -ErrorAction SilentlyContinue -Recurse "$deqp_build" | Where-Object {
15897- if($_.FullName -match "CMake|.git|.lib"){
15898- Remove-Item -Recurse -Force -ErrorAction SilentlyContinue -Path $_.FullName | Out-Null
15899- }
15900-}
15901-
15902-Write-Host "Compiling deqp finished at:"
15903-Get-Date
15904diff --git a/.gitlab-ci/windows/mesa_deps_test_piglit.ps1 b/.gitlab-ci/windows/mesa_deps_test_piglit.ps1
15905deleted file mode 100644
15906index 9909719..0000000
15907--- a/.gitlab-ci/windows/mesa_deps_test_piglit.ps1
15908+++ /dev/null
15909@@ -1,105 +0,0 @@
15910-# Compiling Piglit
15911-
15912-$ProgressPreference = "SilentlyContinue"
15913-$MyPath = $MyInvocation.MyCommand.Path | Split-Path -Parent
15914-. "$MyPath\mesa_init_msvc.ps1"
15915-
15916-$source_dir = Join-Path -Path "$PWD" -ChildPath "src"
15917-$waffle_source = Join-Path -Path "$source_dir" -ChildPath "waffle"
15918-$waffle_install = Join-Path -Path "$PWD" -ChildPath "waffle"
15919-$piglit_source = Join-Path -Path "$PWD" -ChildPath "Piglit"
15920-
15921-Write-Host "Cloning Waffle at:"
15922-Get-Date
15923-New-Item -ItemType Directory -Path "$waffle_source" | Out-Null
15924-Push-Location -Path $waffle_source
15925-git init
15926-git remote add origin https://gitlab.freedesktop.org/mesa/waffle.git
15927-git fetch --depth 1 origin 950a1f35a718bc2a8e1dda75845e52651bb331a7 # of branch master
15928-if (!$?) {
15929- Write-Host "Failed to fetch Waffle repository"
15930- Pop-Location
15931- Exit 1
15932-}
15933-git checkout FETCH_HEAD
15934-Pop-Location
15935-
15936-Write-Host "Compiling Waffle at:"
15937-Get-Date
15938-$waffle_build = Join-Path -Path "$source_dir" -ChildPath "waffle\build"
15939-New-Item -ItemType Directory -Path "$waffle_build" | Out-Null
15940-Push-Location -Path $waffle_build
15941-meson setup `
15942---buildtype=release `
15943---default-library=static `
15944---prefix="$waffle_install" && `
15945-ninja -j32 install
15946-if (!$?) {
15947- Write-Host "Failed to compile or install Waffle"
15948- Pop-Location
15949- Exit 1
15950-}
15951-Pop-Location
15952-Remove-Item -Recurse -Force -ErrorAction SilentlyContinue -Path "$waffle_build" | Out-Null
15953-
15954-Write-Host "Downloading glext.h at:"
15955-Get-Date
15956-New-Item -ItemType Directory -Path "$source_dir\glext\GL" | Out-Null
15957-Invoke-WebRequest -Uri 'https://github.com/KhronosGroup/OpenGL-Registry/raw/main/api/GL/glext.h' -OutFile "$source_dir\glext\GL\glext.h" | Out-Null
15958-
15959-Write-Host "Cloning Piglit at:"
15960-Get-Date
15961-New-Item -ItemType Directory -Path "$piglit_source" | Out-Null
15962-Push-Location -Path $piglit_source
15963-git init
15964-git remote add origin https://gitlab.freedesktop.org/mesa/piglit.git
15965-git fetch --depth 1 origin 814046fe6942eac660ee4a6cc5fcc54011a49945 # of branch main
15966-if (!$?) {
15967- Write-Host "Failed to fetch Piglit repository"
15968- Pop-Location
15969- Exit 1
15970-}
15971-git checkout FETCH_HEAD
15972-
15973-Write-Host "Compiling Piglit at:"
15974-Get-Date
15975-cmake -S . -B . `
15976--GNinja `
15977--DCMAKE_BUILD_TYPE=Release `
15978--DPIGLIT_USE_WAFFLE=ON `
15979--DWaffle_INCLUDE_DIRS="$waffle_install\include\waffle-1" `
15980--DWaffle_LDFLAGS="$waffle_install\lib\libwaffle-1.a" `
15981--DCMAKE_POLICY_VERSION_MINIMUM="3.5" `
15982--DCMAKE_C_FLAGS="-D_UCRT_NOISY_NAN=1" `
15983--DGLEXT_INCLUDE_DIR="$source_dir\glext" && `
15984-ninja -j32
15985-if (!$?) {
15986- Write-Host "Failed to compile Piglit"
15987- Pop-Location
15988- Exit 1
15989-}
15990-Pop-Location
15991-
15992-$depsInstallPath="C:\mesa-deps"
15993-$piglit_bin = "$piglit_source\bin"
15994-
15995-# Hard link Agility SDK into subfolder of piglit
15996-$agility_dest = New-Item -ItemType Directory -Path $piglit_bin -Name 'D3D12'
15997-New-Item -ItemType HardLink -path $agility_dest\D3D12Core.dll -Value $depsInstallPath\bin\D3D12\D3D12Core.dll
15998-New-Item -ItemType HardLink -path $agility_dest\d3d12SDKLayers.dll -Value $depsInstallPath\bin\D3D12\d3d12SDKLayers.dll
15999-
16000-# Hard link WARP next to piglit
16001-New-Item -ItemType HardLink -path $piglit_bin\d3d10warp.dll -Value $depsInstallPath\bin\d3d10warp.dll
16002-
16003-Remove-Item -Recurse -Force -ErrorAction SilentlyContinue -Path "$source_dir" | Out-Null
16004-Remove-Item -Recurse -Force -ErrorAction SilentlyContinue -Path "$waffle_install" | Out-Null
16005-
16006-# Cleanup piglit intermediate files
16007-Get-ChildItem -Force -ErrorAction SilentlyContinue -Recurse "$piglit_source" | Where-Object {
16008- if($_.FullName -match "CMake|.git|.lib"){
16009- Remove-Item -Recurse -Force -ErrorAction SilentlyContinue -Path $_.FullName | Out-Null
16010- }
16011-}
16012-
16013-Write-Host "Compiling Piglit finished at:"
16014-Get-Date
16015diff --git a/.gitlab-ci/windows/mesa_deps_vulkan_sdk.ps1 b/.gitlab-ci/windows/mesa_deps_vulkan_sdk.ps1
16016deleted file mode 100644
16017index 74e0b13..0000000
16018--- a/.gitlab-ci/windows/mesa_deps_vulkan_sdk.ps1
16019+++ /dev/null
16020@@ -1,26 +0,0 @@
16021-# Downloading specified vulkan sdk and vulkan runtime
16022-# Touch this file needs update both WINDOWS_X64_BUILD_TAG WINDOWS_X64_TEST_TAG
16023-# This file needs run in administrator mode
16024-
16025-$env:VULKAN_SDK_VERSION="1.4.304.0"
16026-
16027-$ProgressPreference = "SilentlyContinue"
16028-
16029-# Save environment VULKAN_SDK_VERSION to system
16030-[System.Environment]::SetEnvironmentVariable('VULKAN_SDK_VERSION', "$env:VULKAN_SDK_VERSION", [System.EnvironmentVariableTarget]::Machine)
16031-
16032-$VULKAN_SDK_URL="https://sdk.lunarg.com/sdk/download/$env:VULKAN_SDK_VERSION/windows/VulkanSDK-$env:VULKAN_SDK_VERSION-Installer.exe"
16033-Write-Host "Downloading Vulkan-SDK $VULKAN_SDK_URL at:"
16034-Get-Date
16035-Invoke-WebRequest -Uri "$VULKAN_SDK_URL" -OutFile "${env:TMP}\vulkan_sdk.exe" | Out-Null
16036-Write-Host "Installing Vulkan-SDK at:"
16037-Get-Date
16038-Start-Process -NoNewWindow -Wait "${env:TMP}\vulkan_sdk.exe" -ArgumentList "--am --al -c in"
16039-if (!$?) {
16040- Write-Host "Failed to install Vulkan SDK"
16041- Exit 1
16042-}
16043-Remove-Item "${env:TMP}\vulkan_sdk.exe" -Force
16044-
16045-Write-Host "Installing Vulkan-Runtime finished at:"
16046-Get-Date
16047diff --git a/.gitlab-ci/windows/mesa_deps_winget.ps1 b/.gitlab-ci/windows/mesa_deps_winget.ps1
16048deleted file mode 100644
16049index 1d62fbc..0000000
16050--- a/.gitlab-ci/windows/mesa_deps_winget.ps1
16051+++ /dev/null
16052@@ -1,21 +0,0 @@
16053-# According to https://github.com/microsoft/winget-cli/issues/3037#issuecomment-2155167046
16054-Write-Host "Install winget"
16055-New-Item -Force -ItemType 'directory' -Name 'winget-cli' -Path 'C:/temp'
16056-Invoke-WebRequest 'https://aka.ms/vs/16/release/vc_redist.x64.exe' -OutFile 'C:/temp/vc_redist.x64.exe' -UseBasicParsing
16057-powershell -c C:/temp/vc_redist.x64.exe /install /quiet /norestart
16058-Invoke-WebRequest 'https://aka.ms/getwinget' -OutFile 'C:/temp/winget-cli/winget.zip' -UseBasicParsing
16059-Expand-Archive -LiteralPath 'C:/temp/winget-cli/winget.zip' -DestinationPath 'C:/temp/winget-cli' -Force
16060-Move-Item -Path 'C:/temp/winget-cli/AppInstaller_x64.msix' -Destination 'C:/temp/winget-cli/AppInstaller_x64.zip'
16061-Expand-Archive -LiteralPath 'C:/temp/winget-cli/AppInstaller_x64.zip' -DestinationPath 'C:/temp/winget-cli' -Force
16062-New-Item -Force -ItemType 'directory' -Name 'winget-cli' -Path 'C:/'
16063-Move-Item -Path 'C:/temp/winget-cli/winget.exe' -Destination 'C:/winget-cli/winget.exe'
16064-Move-Item -Path 'C:/temp/winget-cli/WindowsPackageManager.dll' -Destination 'C:/winget-cli/WindowsPackageManager.dll'
16065-Move-Item -Path 'C:/temp/winget-cli/resources.pri' -Destination 'C:/winget-cli'
16066-
16067-$env:PATH="C:/winget-cli;$env:PATH"
16068-winget settings export
16069-
16070-$NEW_USER_PATH="$env:LOCALAPPDATA\Microsoft\WinGet\Links;C:\winget-cli;"
16071-[Environment]::SetEnvironmentVariable('PATH', $NEW_USER_PATH + [Environment]::GetEnvironmentVariable('PATH', "User"), 'User')
16072-Remove-Item -Recurse -Path "C:/temp"
16073-Write-Host "Install winget done"
16074diff --git a/.gitlab-ci/windows/mesa_deps_winget_settings.json b/.gitlab-ci/windows/mesa_deps_winget_settings.json
16075deleted file mode 100644
16076index 01f7d93..0000000
16077--- a/.gitlab-ci/windows/mesa_deps_winget_settings.json
16078+++ /dev/null
16079@@ -1,6 +0,0 @@
16080-{
16081- "$schema": "https://aka.ms/winget-settings.schema.json",
16082- "installBehavior": {
16083- "archiveExtractionMethod": "tar"
16084- }
16085-}
16086diff --git a/.gitlab-ci/windows/mesa_init_msvc.ps1 b/.gitlab-ci/windows/mesa_init_msvc.ps1
16087deleted file mode 100644
16088index 63934c9..0000000
16089--- a/.gitlab-ci/windows/mesa_init_msvc.ps1
16090+++ /dev/null
16091@@ -1,17 +0,0 @@
16092-$vsInstallPath=& "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -version 16.0 -property installationpath
16093-Write-Output "vswhere.exe installPath: $vsInstallPath"
16094-$vsInstallPath = if ("$vsInstallPath" -eq "" ) { "C:\BuildTools" } else { "$vsInstallPath" }
16095-Write-Output "Final installPath: $vsInstallPath"
16096-Import-Module (Join-Path $vsInstallPath "Common7\Tools\Microsoft.VisualStudio.DevShell.dll")
16097-# https://en.wikipedia.org/wiki/Microsoft_Visual_C%2B%2B
16098-# VS2015 14.0 use -vcvars_ver=14.0
16099-# VS2017 14.1 to 14.16 use -vcvars_ver=14.16
16100-# VS2019 14.20 to 14.29 use -vcvars_ver=14.29
16101-# VS2022 14.30 to 14.38 (not finished yet) use -vcvars_ver=14 to choose the newest version
16102-
16103-$vcvars_ver_arg="$args"
16104-if ($null -eq $vcvars_ver_arg[0]) {
16105- $vcvars_ver_arg="-vcvars_ver=14"
16106-}
16107-
16108-Enter-VsDevShell -VsInstallPath $vsInstallPath -SkipAutomaticLocation -DevCmdArguments "$vcvars_ver_arg -arch=x64 -no_logo -host_arch=amd64"
16109diff --git a/.gitlab-ci/windows/piglit_run.ps1 b/.gitlab-ci/windows/piglit_run.ps1
16110deleted file mode 100644
16111index c51138c..0000000
16112--- a/.gitlab-ci/windows/piglit_run.ps1
16113+++ /dev/null
16114@@ -1,19 +0,0 @@
16115-$env:PIGLIT_NO_FAST_SKIP = 1
16116-$env:PIGLIT_SPIRV_AS_BINARY = "C:\VulkanSDK\$env:VULKAN_SDK_VERSION\Bin\spirv-as.exe"
16117-
16118-Copy-Item -Path _install\bin\opengl32.dll -Destination C:\Piglit\bin\opengl32.dll
16119-Copy-Item -Path _install\bin\libgallium_wgl.dll -Destination C:\Piglit\bin\libgallium_wgl.dll
16120-
16121-$jobs = ""
16122-if ($null -ne $env:FDO_CI_CONCURRENT) {
16123- $jobs = "--jobs", "$($env:FDO_CI_CONCURRENT)"
16124-}
16125-
16126-deqp-runner suite --output .\logs --suite "_install/$env:PIGLIT_SUITE" `
16127- --skips "_install/$env:PIGLIT_SKIPS" `
16128- --baseline "_install/$env:PIGLIT_BASELINE" `
16129- --flakes "_install/$env:PIGLIT_FLAKES" `
16130- $jobs
16131-if (!$?) {
16132- Exit 1
16133-}
16134diff --git a/.gitlab-ci/windows/spirv2dxil_check.ps1 b/.gitlab-ci/windows/spirv2dxil_check.ps1
16135deleted file mode 100644
16136index 94735c9..0000000
16137--- a/.gitlab-ci/windows/spirv2dxil_check.ps1
16138+++ /dev/null
16139@@ -1,46 +0,0 @@
16140-$exec_mode_to_stage = @{ Fragment = "fragment"; Vertex = "vertex"; GLCompute = "compute" }
16141-
16142-$spvasm_files = (Get-ChildItem C:\spirv-samples\spvasm\*.spvasm) | Sort-Object Name
16143-foreach ($spvasm in $spvasm_files) {
16144- $test_name = "Test:$($spvasm.Name):"
16145- $spvfile = ($spvasm -replace '\.spvasm$', '.spv')
16146- $content = Get-Content $spvasm
16147- $spv_version = "1.0"
16148- if ($content | Where-Object { $_ -match 'Version:\s(\d+\.\d+)' }) {
16149- $spv_version = $Matches[1]
16150- }
16151-
16152- $as_output = . "$env:VULKAN_SDK\Bin\spirv-as.exe" --target-env spv$spv_version --preserve-numeric-ids -o $spvfile $spvasm 2>&1 | % { if ($_ -is [System.Management.Automation.ErrorRecord]) { $_.Exception.Message } else { $_ } } | Out-String
16153- if ($LASTEXITCODE -ne 0) {
16154- Write-Output "$test_name Skip: Unable to assemble shader"
16155- Write-Output "$as_output`n"
16156- continue
16157- }
16158-
16159- $entry_points = $content | Select-String -Pattern '^OpEntryPoint\s(\w+)[^"]+"(\w+)"' | Select-Object -ExpandProperty Matches -First 1
16160- if ($entry_points.Count -eq 0) {
16161- Write-Output "$test_name Skip"
16162- Write-Output "No OpEntryPoint not found`n"
16163- continue
16164- }
16165-
16166- foreach ($match in $entry_points) {
16167- $exec_mode, $entry_point = $match.Groups[1].Value, $match.Groups[2].Value
16168- $subtest = "$test_name$entry_point|${exec_mode}:"
16169- $stage = $exec_mode_to_stage[$exec_mode]
16170- if ($stage -eq '') {
16171- Write-Output "$subtest Fail: Unknown shader type ($exec_mode)"
16172- continue
16173- }
16174-
16175- $s2d_output = .\_install\bin\spirv2dxil.exe -v -e "$entry_point" -s "$stage" -o NUL $spvfile 2>&1 | ForEach-Object { if ($_ -is [System.Management.Automation.ErrorRecord]) { $_.Exception.Message } else { $_ } } | Out-String
16176- if ($LASTEXITCODE -eq 0) {
16177- Write-Output "$subtest Pass"
16178- }
16179- else {
16180- Write-Output "$subtest Fail"
16181- $sanitized_output = $s2d_output -replace ', file .+, line \d+' -replace ' In file .+:\d+'
16182- Write-Output "$sanitized_output`n"
16183- }
16184- }
16185-}
16186diff --git a/.gitlab-ci/windows/spirv2dxil_run.ps1 b/.gitlab-ci/windows/spirv2dxil_run.ps1
16187deleted file mode 100644
16188index ae6c1c2..0000000
16189--- a/.gitlab-ci/windows/spirv2dxil_run.ps1
16190+++ /dev/null
16191@@ -1,16 +0,0 @@
16192-. .\_install\spirv2dxil_check.ps1 2>&1 | Set-Content -Path .\spirv2dxil_results.txt
16193-$reference = Get-Content .\_install\spirv2dxil_reference.txt
16194-$result = Get-Content .\spirv2dxil_results.txt
16195-if (-Not ($reference -And $result)) {
16196- Exit 1
16197-}
16198-
16199-$diff = Compare-Object -ReferenceObject $reference -DifferenceObject $result
16200-if (-Not $diff) {
16201- Exit 0
16202-}
16203-
16204-Write-Host "Unexpected change in results:"
16205-Write-Output $diff | Format-Table -Property SideIndicator, InputObject -Wrap
16206-
16207-Exit 1
16208diff --git a/.gitlab-ci/windows/vainfo_run.ps1 b/.gitlab-ci/windows/vainfo_run.ps1
16209deleted file mode 100644
16210index a02e6c5..0000000
16211--- a/.gitlab-ci/windows/vainfo_run.ps1
16212+++ /dev/null
16213@@ -1,99 +0,0 @@
16214-
16215-function Deploy-Dependencies {
16216- param (
16217- [string] $deploy_directory
16218- )
16219-
16220- Write-Host "Copying libva runtime and driver at:"
16221- Get-Date
16222-
16223- # Copy the VA runtime binaries from the mesa built dependencies so the versions match with the built mesa VA driver binary
16224- $depsInstallPath="C:\mesa-deps"
16225- Copy-Item "$depsInstallPath\bin\vainfo.exe" -Destination "$deploy_directory\vainfo.exe"
16226- Copy-Item "$depsInstallPath\bin\va_win32.dll" -Destination "$deploy_directory\va_win32.dll"
16227- Copy-Item "$depsInstallPath\bin\va.dll" -Destination "$deploy_directory\va.dll"
16228-
16229- # Copy Agility SDK into D3D12 subfolder of vainfo
16230- New-Item -ItemType Directory -Force -Path "$deploy_directory\D3D12" | Out-Null
16231- Copy-Item "$depsInstallPath\bin\D3D12\D3D12Core.dll" -Destination "$deploy_directory\D3D12\D3D12Core.dll"
16232- Copy-Item "$depsInstallPath\bin\D3D12\d3d12SDKLayers.dll" -Destination "$deploy_directory\D3D12\d3d12SDKLayers.dll"
16233-
16234- # Copy WARP next to vainfo
16235- Copy-Item "$depsInstallPath\bin\d3d10warp.dll" -Destination "$deploy_directory\d3d10warp.dll"
16236-
16237- Write-Host "Copying libva runtime and driver finished at:"
16238- Get-Date
16239-}
16240-
16241-function Check-VAInfo-Entrypoint {
16242- param (
16243- [string] $vainfo_app_path,
16244- [string] $entrypoint
16245- )
16246-
16247- $vainfo_run_cmd = "$vainfo_app_path --display win32 --device 0 2>&1 | Select-String $entrypoint -Quiet"
16248- Write-Host "Running: $vainfo_run_cmd"
16249- $vainfo_ret_code= Invoke-Expression $vainfo_run_cmd
16250- if (-not($vainfo_ret_code)) {
16251- return 0
16252- }
16253- return 1
16254-}
16255-
16256-# Set testing environment variables
16257-$successful_run=1
16258-$testing_dir="$PWD\_install\bin" # vaon12_drv_video.dll is placed on this directory by the build
16259-$vainfo_app_path = "$testing_dir\vainfo.exe"
16260-
16261-# Deploy vainfo and dependencies
16262-Deploy-Dependencies -deploy_directory $testing_dir
16263-
16264-# Set VA runtime environment variables
16265-$env:LIBVA_DRIVER_NAME="vaon12"
16266-$env:LIBVA_DRIVERS_PATH="$testing_dir"
16267-
16268-Write-Host "LIBVA_DRIVER_NAME: $env:LIBVA_DRIVER_NAME"
16269-Write-Host "LIBVA_DRIVERS_PATH: $env:LIBVA_DRIVERS_PATH"
16270-
16271-# Check video processing entrypoint is supported
16272-# Inbox WARP/D3D12 supports this entrypoint with VA frontend shaders support (e.g no video APIs support required)
16273-$entrypoint = "VAEntrypointVideoProc"
16274-
16275-# First run without app verifier
16276-Write-Host "Disabling appverifier for $vainfo_app_path and checking for the presence of $entrypoint supported..."
16277-appverif.exe /disable * -for "$vainfo_app_path"
16278-$result_without_appverifier = Check-VAInfo-Entrypoint -vainfo_app_path $vainfo_app_path -entrypoint $entrypoint
16279-if ($result_without_appverifier -eq 1) {
16280- Write-Host "Process exited successfully."
16281-} else {
16282- $successful_run=0
16283- Write-Error "Process exit not successful for $vainfo_run_cmd. Please see vainfo verbose output below for diagnostics..."
16284- # verbose run to print more info on error (helpful to investigate issues from the CI output)
16285- Invoke-Expression "$vainfo_app_path -a --display win32 --device help"
16286- Invoke-Expression "$vainfo_app_path -a --display win32 --device 0"
16287-}
16288-
16289-# Enable appverif and run again
16290-Write-Host "Enabling appverifier for $vainfo_app_path and checking for the presence of $entrypoint supported..."
16291-appverif.exe /logtofile enable
16292-appverif.exe /verify "$vainfo_app_path"
16293-appverif.exe /enable "Leak" -for "$vainfo_app_path"
16294-$verifier_log_path="$testing_dir\vainfo_appverif_log.xml"
16295-$result_with_appverifier = Check-VAInfo-Entrypoint -vainfo_app_path $vainfo_app_path -entrypoint $entrypoint
16296-if ($result_with_appverifier -eq 1) {
16297- Write-Host "Process exited successfully."
16298- appverif.exe /logtofile disable
16299-} else {
16300- Write-Host "Process failed. Please see Application Verifier log contents below."
16301- # Need to wait for appverif to exit before gathering log
16302- Start-Process -Wait -FilePath "appverif.exe" -ArgumentList "-export", "log", "-for", "$vainfo_app_path", "-with", "to=$verifier_log_path"
16303- Get-Content $verifier_log_path
16304- Write-Error "Process exit not successful for $vainfo_run_cmd."
16305- appverif.exe /logtofile disable
16306- $successful_run=0
16307-}
16308-
16309-if ($successful_run -ne 1) {
16310- Exit 1
16311-}
16312-
16313diff --git a/.gitlab/issue_templates/Bug Report - AMD Radeon Vulkan.md b/.gitlab/issue_templates/Bug Report - AMD Radeon Vulkan.md
16314deleted file mode 100644
16315index 3a6b12c..0000000
16316--- a/.gitlab/issue_templates/Bug Report - AMD Radeon Vulkan.md
16317+++ /dev/null
16318@@ -1,75 +0,0 @@
16319-### Before submitting your bug report:
16320-- Check if a new version of Mesa is available which might have fixed the problem.
16321-- If you can, check if the latest development version (git main) works better.
16322-- Check if your bug has already been reported here.
16323-- For any logs, backtraces, etc - use [code blocks](https://docs.gitlab.com/user/markdown/#code-spans-and-blocks), GitLab removes line breaks without this.
16324- - Do not paste long logs directly into the description. Use https://gitlab.freedesktop.org/-/snippets/new, attachments, or a pastebin with a long expiration instead.
16325-- As examples of good bug reports you may review one of these - #2598, #2615, #2608
16326-
16327-
16328-Otherwise, fill the requested information below.
16329-And please remove anything that doesn't apply to keep things readable :)
16330-
16331-
16332-The title should effectively distinguish this bug report from others and be specific to issue you encounter. When writing the title of the bug report, include a short description of the issue, the hardware/driver(s) affected and application(s) affected.
16333-
16334-
16335-### Description
16336-
16337-Describe what you are doing, what you expect and what you're
16338-seeing instead. How frequent is the issue? Is it a one time occurrence? Does it appear multiple times but randomly? Can you easily reproduce it?
16339-
16340-"It doesn't work" usually is not a helpful description of an issue.
16341-The more detail about how things are going wrong, the better.
16342-
16343-### Screenshots/video files
16344-
16345-For rendering errors, attach screenshots of the problem and (if possible) of how it should look. For freezes, it may be useful to provide a screenshot of the affected game scene. Prefer screenshots over videos.
16346-
16347-### Log files (for system lockups / game freezes / crashes)
16348-
16349-- Backtrace (for crashes)
16350-- Output of `dmesg`
16351-- Hang reports: Follow the steps described [here](https://docs.mesa3d.org/drivers/amd/hang-debugging.html#radv-debug-hang) and attach the files created in `$HOME/radv_dumps_*/`.
16352-
16353-### Steps to reproduce
16354-
16355-How can Mesa developers reproduce the issue? When reporting a game issue, start explaining from a fresh save file and don't assume prior knowledge of the game's story.
16356-
16357-Example:
16358-
16359-1. `Start new game and enter second mission (takes about 10 minutes)`
16360-2. `Talk to the NPC called "Frank"`
16361-3. `Observe flickering on Frank's body`
16362-
16363-### System information
16364-
16365-Please post `inxi -GSC -xx` output ([fenced with triple backticks](https://docs.gitlab.com/user/markdown/#code-spans-and-blocks)) OR fill information below manually
16366-
16367-
16368-- OS: (`cat /etc/os-release | grep "NAME"`)
16369-- GPU: (`lspci -nn | grep VGA` or `lshw -C display -numeric`)
16370-- Kernel version: (`uname -a`)
16371-- Mesa version: (`glxinfo -B | grep "OpenGL version string"`)
16372-- Desktop environment: (`env | grep XDG_CURRENT_DESKTOP`)
16373-
16374-#### If applicable
16375-- Xserver version: (`sudo X -version`)
16376-- DXVK version:
16377-- Wine/Proton version:
16378-
16379-
16380-### Regression
16381-
16382-Did it used to work in a previous Mesa version? It can greatly help to know when the issue started.
16383-
16384-
16385-### API captures (if applicable, optional)
16386-
16387-Consider recording a [GFXReconstruct](https://github.com/LunarG/gfxreconstruct/blob/dev/USAGE_desktop_Vulkan.md) (preferred), [RenderDoc](https://renderdoc.org/), or [apitrace](https://github.com/apitrace/apitrace/blob/master/docs/USAGE.markdown) capture of the issue with the RADV driver active. This can tremendously help when debugging issues, but you're still encouraged to report issues if you can't provide a capture file.
16388-
16389-### Further information (optional)
16390-
16391-Does the issue reproduce with the LLVM backend (`RADV_DEBUG=llvm`) or on the AMDGPU-PRO drivers?
16392-
16393-Does your environment set any of the variables `ACO_DEBUG`, `RADV_DEBUG`, `RADV_PERFTEST` and `RADV_EXPERIMENTAL`?
16394diff --git a/.gitlab/issue_templates/Bug Report.md b/.gitlab/issue_templates/Bug Report.md
16395deleted file mode 100644
16396index f4e5824..0000000
16397--- a/.gitlab/issue_templates/Bug Report.md
16398+++ /dev/null
16399@@ -1,58 +0,0 @@
16400-### Before submitting your bug report:
16401-- Check if a new version of Mesa is available which might have fixed the problem.
16402-- If you can, check if the latest development version (git main) works better.
16403-- Check if your bug has already been reported here.
16404-- For any logs, backtraces, etc - use [code blocks](https://docs.gitlab.com/user/markdown/#code-spans-and-blocks), GitLab removes line breaks without this.
16405- - Do not paste long logs directly into the description. Use https://gitlab.freedesktop.org/-/snippets/new, attachments, or a pastebin with a long expiration instead.
16406-- As examples of good bug reports you may review one of these - #2598, #2615, #2608
16407-
16408-
16409-Otherwise, please fill the requested information below.
16410-And please remove anything that doesn't apply to keep things readable :)
16411-
16412-
16413-The title should effectively distinguish this bug report from others and be specific to issue you encounter. When writing the title of the bug report, include a short description of the issue, the hardware/driver(s) affected and application(s) affected.
16414-
16415-
16416-### System information
16417-
16418-Please post `inxi -GSC -xx` output ([fenced with triple backticks](https://docs.gitlab.com/user/markdown/#code-spans-and-blocks)) OR fill information below manually
16419-
16420-
16421-- OS: (`cat /etc/os-release | grep "NAME"`)
16422-- GPU: (`lspci -nn | grep VGA` or `lshw -C display -numeric`)
16423-- Kernel version: (run `uname -a`)
16424-- Mesa version: (`glxinfo -B | grep "OpenGL version string"`)
16425-- Xserver version (if applicable): (`sudo X -version`)
16426-- Desktop manager and compositor:
16427-
16428-#### If applicable
16429-- DXVK version:
16430-- Wine/Proton version:
16431-
16432-
16433-### Describe the issue
16434-
16435-Please describe what you are doing, what you expect and what you're
16436-seeing instead. How frequent is the issue? Is it a one time occurrence? Does it appear multiple times but randomly? Can you easily reproduce it?
16437-
16438-"It doesn't work" usually is not a helpful description of an issue.
16439-The more detail about how things are going wrong, the better.
16440-
16441-
16442-### Regression
16443-
16444-Did it used to work? It can greatly help to know when the issue started.
16445-
16446-
16447-### Log files as attachment
16448-- Output of `dmesg`
16449-- Backtrace
16450-- Gpu hang details
16451-
16452-
16453-### Screenshots/video files (if applicable)
16454-
16455-
16456-
16457-### Any extra information would be greatly appreciated
16458diff --git a/.gitlab/merge_request_templates/Default.md b/.gitlab/merge_request_templates/Default.md
16459deleted file mode 100644
16460index 131e86e..0000000
16461--- a/.gitlab/merge_request_templates/Default.md
16462+++ /dev/null
16463@@ -1,6 +0,0 @@
16464-### What does this MR do and why?
16465-<!-- Describe in detail what your merge request does and why. -->
16466-
16467-```
16468-%{first_multiline_commit}
16469-```