Commit Graph

17 Commits

Author SHA1 Message Date
Eric Engestrom
eb34c059be ci: use quiet alias for commands
And set x_off again when nesting these functions but we're not done and
we have more after.

Fixes: d69bd58365 ("ci: consistently restore `-x` after temporarily disabling it")
(cherry picked from commit e5708ab2b4)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32119>
2024-11-12 09:12:13 -08:00
Eric Engestrom
6965aff4d1 ci: move error handling functions at the end
So that everything is defined by the time we use it in here.

Cc: mesa-stable
(cherry picked from commit 5cd054ebe5)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32119>
2024-11-12 09:12:12 -08:00
Eric Engestrom
b76b53cbbb ci: rename state_x to previous_state_x to be clear about what it contains
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31939>
2024-11-05 20:30:22 +00:00
Eric Engestrom
d69bd58365 ci: consistently restore -x after temporarily disabling it
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31939>
2024-11-05 20:30:22 +00:00
Eric Engestrom
4a19f7d53d ci: initialize state_x (tracking set -x)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31939>
2024-11-05 20:30:21 +00:00
Eric Engestrom
4fa1730cdd ci: only end current section if there is a current section
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31939>
2024-11-05 20:30:21 +00:00
Daniel Stone
ef175ea594 ci: Make section emission really quiet
If you're emitting a section header under set -x, you will see:
+ section_start foo "foo"
+ x_off
[the section header]

This is kind of annoying. Instead of trying to squash it everywhere by
dancing around local set +x management, play some extremely stupid
tricks with shells to make sure we never emit it.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31602>
2024-10-20 11:32:43 +01:00
Daniel Stone
4ae2d97c36 ci: Make setup-test-env safe for set -u
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31281>
2024-10-10 11:05:56 +00:00
Daniel Stone
9b6d14aed1 ci: Always create results dir from init
During init-stage2 (used for hardware jobs) and setup-test-env (used
for running directly on shared runners), make sure we always create a
results directory.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31110>
2024-09-13 10:12:09 +01:00
Daniel Stone
28aafcfaef ci: Bring back yamllint and shellcheck
These have been disabled for a while, but shouldn't have been.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30978>
2024-09-09 16:27:07 +00:00
Eric Engestrom
9be380c6da ci: simplify unnecessarily complex printf
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28344>
2024-03-25 13:04:15 +00:00
Eric Engestrom
ed45e373bf ci: convert the job start date into a timestamp only once
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28344>
2024-03-25 13:04:15 +00:00
Eric Engestrom
775eca9449 ci: deduplicate converting the current job runtime into %M:%S
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28344>
2024-03-25 13:04:15 +00:00
David Heidelberg
5941fc8ccd ci: enable shellcheck on whole .gitlab-ci
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21977>
2023-05-25 16:06:53 +02:00
David Heidelberg
fb3632d24f ci: distribute XDG_RUNTIME_DIR with setup-test-env script
Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8615
Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8646

Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Martin Roukala <martin.roukala@mupuf.org>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22004>
2023-03-19 15:39:12 +01:00
David Heidelberg
d79d62c638 ci: do not exit when an error happens inside the section
Let CI handle that case as it did before. The only thing which needs to be done by the error() function is to get out of the section.

Fixes the issue where a job is not saving artifacts after failure.
Fixes: 4cc0cec473 ("ci: implement unified sections")

Acked-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21715>
2023-03-06 11:59:42 +00:00
David Heidelberg
4cc0cec473 ci: implement unified sections
in after_script, variable $SCRIPTS_DIR is lost

Acked-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20272>
2023-03-01 12:02:24 +00:00