Commit Graph

1056 Commits

Author SHA1 Message Date
Eric Engestrom
6331441e24 ci: rename ci-tron priority tag to avoid conflict with the generic fdo runners
Otherwise, ci-tron runners with that tag could pick up jobs meant for the fdo
runners, as happened here:
https://gitlab.freedesktop.org/mesa/mesa/-/jobs/73883719

The inverse (fdo runners picking up a job meant for a ci-tron runner) is not
possible though, as ci-tron jobs always include a `farm:$RUNNER_FARM_LOCATION`
tag, so the problem only exists in the other direction.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34358>
2025-04-03 11:25:12 +00:00
Daniel Stone
3b6a40af53 ci: Make all job timeouts explicit
Enforce a default job timeout of 1 second, to make jobs which don't
explicitly specify a timeout insta-fail, rather than potentially hanging
around for an hour.

Container builds get the full hour as they can run long and are not run
in pre-merge context, and LAVA jobs also get the full hour as they have
multiple internal timeout mechanisms which aim to fast-fail jobs once
they actually start. However, as they just queue jobs to an external
host (shared with other projects like KernelCI), these timeouts aren't
reflected into the GitLab CI definitions.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34280>
2025-04-01 12:21:01 +00:00
Eric Engestrom
359f69ba0c ci: add FDO_RUNNER_JOB_PRIORITY_TAG_* to control priority of generic freedesktop runners
This affects:
- generic jobs (sanity, rustfmt, shader-db, docs, etc.)
- linux image builds
- linux mesa builds
- software renderer tests
- android tests
- virgl & venus tests

Marge pipelines get high priority, nightly pipelines get low priority,
and everything else is in between.

(Hardware test farms have their own mechanisms.)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34264>
2025-03-29 18:17:24 +01:00
Eric Engestrom
76a6ce40e1 ci: drop packet.net tag on git archive job
We are no longer on that infrastructure, and we no longer need to
specify which one we are on.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34271>
2025-03-29 10:38:03 +00:00
Eric Engestrom
89ab8a259c ci: drop placeholder-job tags to allow jobs to run
That tag was supposed to allow these jobs to run faster, but these
runners are currently having disk issues, and the normal runners look
like they're plenty fast enough (at least right now since almost nobody
runs ci jobs ^^).

We might revert this later, but for now let's merge this to unblock CI.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34120>
2025-03-24 20:45:52 +00:00
Eric Engestrom
7178425ccf ci: replace broken s3cp command with a simple curl call
The current `s3cp` implementation does not work anymore after the
migration, and instead of fixing it and propagating the fix down to us,
it's simpler to directly use `curl`.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34120>
2025-03-24 20:45:52 +00:00
Eric Engestrom
d425847793 ci: always abort if the curl download fails
Reported-by: @Valentine
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34120>
2025-03-24 20:45:52 +00:00
Eric Engestrom
a66e227748 ci/build: lower the delay to start build-only jobs
What we need is a way to tell GitLab "queue `build-only` jobs after
`build-for-tests` jobs have started", to make sure that `build-only`
jobs don't start before `build-for-tests` jobs and thus delays test jobs
and the overall pipeline.

The best I had found was "queue `build-only` jobs after *all* the
`build-for-tests` jobs have finished", but this introduces a larger
delay than we want, and causes `build-only` jobs to often be the last
ones to finish in a pipeline, after test jobs that respect the 15min
runtime limit.

Instead, we can tell GitLab "queue `build-only` jobs after the
`build-for-tests` jobs have been queued for X minutes", which is closer
to what we want, and in particular this ensures the correct order of
*starting* jobs as long as the CI is not overwhelmed and doesn't manage
to actually start a queued `build-for-tests` job within 5min, in which
case I'd argue we don't care about job order anymore because we have
bigger problems anyway and likely everything's going to timeout.

This also gets rid of the hard-to-maintain `.build-for-tests-jobs` list
of `needs:`, which also needed to be manually merged in half the jobs.

The trade-off is that we need to make a (shallow) copy of the
`.container+build-rules` list, that replaces all the `when: on_success`
with `when: delayed` + `start_in: 5 minutes`. This means that we'll need
to make sure the two lists of conditions remain identical, but this
seems more manageable; nevertheless, I added a comment to remind us.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33564>
2025-02-22 19:18:08 +00:00
Eric Engestrom
b08f9a2dbd ci: run containers builds on staging branches
Fixes: 7152f343d6 ("ci: only trigger the CI for release managers when pushing to staging branch")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33468>
2025-02-12 07:06:02 +00:00
Eric Engestrom
7152f343d6 ci: only trigger the CI for release managers when pushing to staging branch
The release branch contains only what was on the staging branch first,
so testing it again is a waste of resources.

To do this, we split the rule into specifically "default branch" and
"staging branch", and "release branch" gets dropped by virtue of no
longer being caught by any rule.

Cc: mesa-stable
Reviewed-by: Martin Roukala <None>
Reviewed-by: Dylan Baker <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33411>
2025-02-06 21:38:42 +00:00
Eric Engestrom
271bc0727c ci: drop redundant condition
"marge-bot push" is already caught by the `post-merge pipeline` rule above.

Reviewed-by: Martin Roukala <None>
Reviewed-by: Dylan Baker <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33411>
2025-02-06 21:38:42 +00:00
Eric Engestrom
31f0a9be3f ci: don't run on tag pipelines
It's too late to run all the tests by then, the release has been made
based on the staging pipelines results

Cc: mesa-stable
Reviewed-by: Martin Roukala <None>
Reviewed-by: Dylan Baker <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33409>
2025-02-06 21:01:35 +00:00
Martin Roukala (né Peres)
cd7ec5403d ci-templates: update to the latest upstream version
This version brings support for cross-compiling containers, which will
important to build arm32 containers on arm64.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32927>
2025-02-05 04:35:07 +00:00
Martin Roukala (né Peres)
d450d9c70b ci: be explicit about the fact HW jobs do not need linter artifacts
Not sure if it will change anything, but better be safe than sorry.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32927>
2025-02-05 04:35:07 +00:00
Martin Roukala (né Peres)
978c0989eb ci: fix the artifact name
This has probably no incidence on anything else but human-visible names
but let's fix it anyway.

Fixes: ef3091736c ("ci: use CI_PROJECT_NAME for artifacts name")
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32927>
2025-02-05 04:35:07 +00:00
Daniel Stone
28becbb3dc ci: Capture Ninja log
This will give us a better idea of what's taking time during builds.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33287>
2025-01-30 16:56:03 +00:00
Daniel Stone
6d76c4f476 ci: Fix dependency on lint job
The toml-lint job hasn't been around for a little while now, and the
clang-format job got deleted.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33287>
2025-01-30 16:56:02 +00:00
Detlev Casanova
aa11f3d630 ci/fluster/lava: Add fluster in LAVA rootfs
It will be used in next commits to run fluster vaapi tests on AMD
devices on LAVA.

Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
Co-authored-by: Sergi Blanch Torne <sergi@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26113>
2025-01-25 08:48:04 +00:00
Vignesh Raman
ef3091736c ci: use CI_PROJECT_NAME for artifacts name
Since mesa is used in drm-ci, the artifacts in drm-ci jobs have
the 'mesa' prefix. This change replaces the hardcoded 'mesa'
prefix in the artifacts name with the CI_PROJECT_NAME variable.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33154>
2025-01-23 07:18:09 +00:00
Antonio Ospite
88dfda7f0a ci/android: add a script to build LLVM libraries for Android
In order to build the mesa llvmpipe driver for Android, LLVM libraries
for Android are needed, but building them each time a new upstream mesa
is built would be too much overhead.

So add a script to build LLVM libraries for Android and call it from the
debian/android_build job. The actual build will be performed only when
necessary and the resulting artifact will be uploaded to the S3 bucket
to be re-used when building mesa for Android.

The build process follows what has been documented in
docs/drivers/llvmpipe.rst

Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31093>
2024-12-20 04:40:52 +00:00
Guilherme Gallo
742c3846e8 ci/container: set up S3_JWT_FILE also for container jobs
Set up "${S3_JWT_FILE}" also for container jobs, this can be useful in
case some jobs want to save something to S3.

Note that for container jobs setting the file /s3_swt in the
`default:before_script` section would not work: this wold be "too early"
because, when using ci-templates, the cbuild invocation switches the
root filesystem before executing FDO_DISTRIBUTION_EXEC, resulting in the
file becoming unavailable after the switch.

So set up the file exactly in FDO_DISTRIBUTION_EXEC, before launching
the actual container script.

Do this using a new trampoline script
.gitlab-ci/container/container_job_trampoline.sh so that in the future
other tasks common to all container jobs can be added there.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31093>
2024-12-20 04:40:52 +00:00
Deborah Brouwer
3bddf77f61 ci: separate python tests and artifacts
Currently the python-test job runs pytest and then creates python
related artifacts for use by other jobs. But the python-test job isn't
triggered by changes to the python scripts and libraries. Instead, changes
to python scripts and libraries can currently be merged without running
pytest and, if they do generate errors, they will only appear in ci
later when trying to generate the python artifacts.

Add pytest to the existing linting jobs and expand the rules so that it
will be triggered by changes to python scripts and libraries. Remove
pytest from the job that creates artifacts. This will ensure that the
artifacts are still valid while catching script/library errors before they
are merged.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32340>
2024-12-13 10:04:03 -08:00
Chia-I Wu
c631f1d1b6 ci: update the comment on MESA_VK_ABORT_ON_DEVICE_LOSS
deqp-runner version is 0.20.2 already.  But we would like to keep
MESA_VK_ABORT_ON_DEVICE_LOSS globally because, without it, after the
first VK_ERROR_DEVICE_LOST in a test group, the error is sticky and the
remaining tests will be considered failed as well.

deqp-vk gained --deqp-terminate-on-device-lost since 1.3.8.0 and enabled
it by default since 1.3.10.0.  But let's prefer our own mechanism.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32228>
2024-11-20 00:37:28 +00:00
Eric Engestrom
594b8d9f81 ci: reduce priority of nightly pipeline jobs from 50 to 45
This means the fork jobs now have clear priority over nightly jobs,
although it might not matter much as nightly jobs are mostly
long-running jobs and pre-merge & forks will have to wait regardless of
priority.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32093>
2024-11-13 10:01:32 +00:00
Eric Engestrom
50f9bec3ce ci: raise priority of release manager pipelines
KernelCI jobs have priority 44 and are very long-running jobs (and
there might be an issue with the KernelCI that makes it create hundreds
of jobs, @sergi is looking into that).

While bumping to 45+ would be enough to allow Mesa release staging
pipelines to run despite the KernelCI, during the CI meeting with @sergi
and @mupuf it was determined that the Mesa releases are an important
enough operation to warrant being a higher priority than user forks
pipelines, so priority 70 was picked (still under the 75 of Marge
pipelines).

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32093>
2024-11-13 10:01:31 +00:00
Eric Engestrom
4ec045a533 ci: bump ci-templates
debian/x86_64_build-base was missing the package that provides
LLVMConfig.cmake, breaking cmake builds that need LLVM, like the
SPIRV-LLVM-Translator build.

The cross-builds were missing arch-test to allow dpkg to figure out
which arch it's running on.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31940>
2024-11-06 07:53:21 +00:00
Eric Engestrom
6425b6e3d4 ci/build: handle build timeout ourselves to give more time to nightly LTO builds
GitLab doesn't (yet) support `timeout:` being a variable, so let's put
the real `timeout:` at the max timeout we want, and internally use
another timeout (using coreutils' `timeout`) that we _can_ set using
a variable.

With that, we can set a 1h timeout on nightly LTO builds while keeping
our tighter 30min timeout the rest of the time.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31846>
2024-10-30 16:21:16 +00:00
Vignesh Raman
c3531d5fea ci: rename FORCE_KERNEL_TAG to EXTERNAL_KERNEL_TAG
FORCE_KERNEL_TAG allows testing kernel uprevs without rebuilding
containers by supplying an external kernel directly for booting on
hardware devices. Renaming it to EXTERNAL_KERNEL_TAG clarifies its
purpose, distinguishing it from KERNEL_TAG which rebuilds containers.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31795>
2024-10-28 02:18:27 +00:00
Eric Engestrom
90ad5d3f06 ci: drop dead "load jwt in the environment just before exiting the job" code
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31855>
2024-10-25 21:41:05 +00:00
Eric Engestrom
03f056ea71 ci: skip slow tests on all non-"full" jobs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31828>
2024-10-25 08:26:31 +00:00
Vignesh Raman
68135b620c ci: move rules from rules-anchors to workflow
The workflow is almost self-contained except by two rules that are still in an
old rules-anchors definition. So, we can keep all the rules in the same place.

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31561>
2024-10-22 09:54:59 +00:00
Vignesh Raman
a9e11c2f09 ci: build KERNEL_IMAGE_BASE in before_script
When a job modifies the KERNEL_TAG variable, the url shall be rebuilt. So,
instead of building it in the variables section, do right before the script
when all the environment is set.

But, as we still have the FORCE_KERNEL_TAG that then defines the
KERNEL_IMAGE_BASE in the old style, for backwards compatibility it is not
overwriting the KERNEL_IMAGE_BASE.

The last two rules are now redundant and can be dropped.

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31561>
2024-10-22 09:54:59 +00:00
Eric Engestrom
ce02c9b5ef ci: simplify setting lava job priority
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31755>
2024-10-21 20:18:23 +00:00
Eric Engestrom
e70db26d18 ci: simplify ci-tron priority variable
Set it to low, and only override in merge pipelines.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31755>
2024-10-21 20:18:23 +00:00
Guilherme Gallo
1dc64d0613 ci: Use merge-skips files during merge pipelines
These skip files contain tests that exceed one minute in execution time,
which are better suited for nightly jobs. This change aims to optimize
execution time and prevent delays in merge pipelines under time
constraints.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31699>
2024-10-18 03:27:45 +00:00
Deborah Brouwer
f406595ec7 ci/deqp-runner: implement max-fails
If we get more than 40 unexpected fails/crashes in a merge pipeline,
then stop early to preserve pipeline resources.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31429>
2024-10-16 17:32:53 +00:00
Vignesh Raman
d4fa181f7b ci/image-tags: add DEBIAN_PYUTILS_TAG
Enforce maximum image tag length for DEBIAN_PYUTILS_TAG
and sort the tags in order.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31475>
2024-10-02 13:29:33 +00:00
Eric Engestrom
27fba5ccdf ci: merge build-x86_64 & build-misc
The split doesn't really make sense anymore, and with the next commit,
the build-misc jobs would get delayed until the build-x86_64 jobs are
done, which is undesirable.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30808>
2024-08-29 14:33:15 +00:00
Eric Engestrom
c9e847e51f ci: move build jobs that are used by tests to an earlier stage
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30808>
2024-08-29 14:33:15 +00:00
Eric Engestrom
07202111a6 ci/rules: make every job exist as manual in fork pipelines
In forks, every job exists, but no job is automatically run.

Should help with the problem of users clicking on that tempting "play"
button GitLab offers and that has been causing a lot of issues with
wasted resources.

Downside is, users now have to use the `bin/ci/ci_run_n_monitor.sh`
script to be able to run a bunch of jobs at once.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25252>
2024-08-26 11:49:34 +00:00
Eric Engestrom
84d2401de3 ci: don't run hardware tests if the toml files don't pass validation
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30442>
2024-08-22 20:25:32 +00:00
Daniel Stone
4e56472da2 ci/panfrost: Move manual/nightly jobs to postmerge stage
Create a new stage called arm-postmerge and move the full and manual
jobs over there, to avoid entanglement with the pre-merge jobs.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30784>
2024-08-22 15:35:18 +00:00
Daniel Stone
ca8f6b66a8 ci/etnaviv: Move manual/nightly jobs to postmerge stage
Create a new stage called etnaviv-postmerge and move the full and manual
jobs over there, to avoid entanglement with the pre-merge jobs.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30784>
2024-08-22 15:35:18 +00:00
Daniel Stone
b70ad23bb1 ci/nouveau: Move manual/nightly jobs to postmerge stage
Create a new stage called nouveau-postmerge and move the full and manual
jobs over there, to avoid entanglement with the pre-merge jobs.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30784>
2024-08-22 15:35:18 +00:00
Daniel Stone
337e00aa2d ci/llvmpipe: Move manual/nightly jobs to postmerge stage
Create a new stage called software-backends-postmerge and move the full
and manual jobs for both llvmpipe and lavapipe over there, to avoid
entanglement with the pre-merge jobs.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30784>
2024-08-22 15:35:18 +00:00
Daniel Stone
4752ce7186 ci/zink: Move manual/nightly jobs to postmerge stage
Create a new stage called layered-backends-postmerge and move the full
and manual jobs over there, to avoid entanglement with the pre-merge
jobs.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30784>
2024-08-22 15:35:18 +00:00
Daniel Stone
25c70888a5 ci/broadcom: Move manual/nightly jobs to postmerge stage
Create new stages called broadcom-postmerge and freedreno-postmerge, and
move the full and manual jobs over there, to avoid entanglement with the
pre-merge jobs.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30784>
2024-08-22 15:35:18 +00:00
Daniel Stone
cc507536db ci/intel: Move manual/nightly jobs to postmerge stage
Create a new stage called intel-postmerge and move the full and manual
jobs over there, to avoid entanglement with the pre-merge jobs.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30784>
2024-08-22 15:35:18 +00:00
Daniel Stone
4bcd57b0b5 ci/amd: Move manual/nightly jobs to postmerge stage
Create a new stage called amd-postmerge and move the full and manual
jobs over there, to avoid entanglement with the pre-merge jobs.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30784>
2024-08-22 15:35:18 +00:00
Daniel Stone
f1aab081b5 ci: Create new 'performance' stage
Move all jobs doing performance testing to a separate stage.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30784>
2024-08-22 15:35:18 +00:00