gitlab: pull before_script logic into .base_meson_job_template
This ensures that all jobs have the $JOBS env set and capture the packages.txt content (where available) in their logs, and all use the job section headers. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com> Link: https://lore.kernel.org/qemu-devel/20260624124657.2725376-6-berrange@redhat.com Signed-off-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
This commit is contained in:
committed by
Pierrick Bouvier
parent
49cd30eea1
commit
3fbac8fc83
@@ -148,6 +148,15 @@ variables:
|
||||
- build/meson-logs
|
||||
reports:
|
||||
junit: build/meson-logs/*.junit.xml
|
||||
before_script:
|
||||
- source scripts/ci/gitlab-ci-section
|
||||
- section_start setup "Pre-script setup"
|
||||
- JOBS=$(expr $(nproc) + 1)
|
||||
# Prevent logs (if any) from prior build job artifacts
|
||||
# from being duplicated in the new job artifacts
|
||||
- rm -f build/meson-logs/*
|
||||
- test -f /packages.txt && cat /packages.txt
|
||||
- section_end setup
|
||||
|
||||
.base_meson_ccache_job_template:
|
||||
extends: .base_meson_job_template
|
||||
|
||||
@@ -3,12 +3,6 @@
|
||||
extends: .base_meson_ccache_job_template
|
||||
stage: build
|
||||
image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:$QEMU_CI_CONTAINER_TAG
|
||||
before_script:
|
||||
- source scripts/ci/gitlab-ci-section
|
||||
- section_start setup "Pre-script setup"
|
||||
- JOBS=$(expr $(nproc) + 1)
|
||||
- cat /packages.txt
|
||||
- section_end setup
|
||||
script:
|
||||
- !reference [.base_meson_ccache_job_template, script]
|
||||
- du -sh .git
|
||||
@@ -74,11 +68,6 @@
|
||||
|
||||
.native_test_job_template:
|
||||
extends: .common_test_job_template
|
||||
before_script:
|
||||
# Prevent logs from the build job that run earlier
|
||||
# from being duplicated in the test job artifacts
|
||||
- rm -f build/meson-logs/*
|
||||
|
||||
|
||||
.functional_test_job_template:
|
||||
extends: .common_test_job_template
|
||||
@@ -96,27 +85,18 @@
|
||||
- build/tests/functional/*/*/*.log
|
||||
reports:
|
||||
junit: build/meson-logs/*.junit.xml
|
||||
before_script:
|
||||
- export QEMU_TEST_ALLOW_UNTRUSTED_CODE=1
|
||||
- export QEMU_TEST_CACHE_DIR=${CI_PROJECT_DIR}/functional-cache
|
||||
# Prevent logs from the build job that run earlier
|
||||
# from being duplicated in the test job artifacts
|
||||
- rm -f build/meson-logs/*
|
||||
after_script:
|
||||
- cd build
|
||||
- du -chs ${CI_PROJECT_DIR}/*-cache
|
||||
variables:
|
||||
QEMU_JOB_FUNCTIONAL: 1
|
||||
QEMU_TEST_ALLOW_UNTRUSTED_CODE: 1
|
||||
QEMU_TEST_CACHE_DIR: ${CI_PROJECT_DIR}/functional-cache
|
||||
|
||||
.wasm_build_job_template:
|
||||
extends: .base_meson_job_template
|
||||
stage: build
|
||||
image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:$QEMU_CI_CONTAINER_TAG
|
||||
before_script:
|
||||
- source scripts/ci/gitlab-ci-section
|
||||
- section_start setup "Pre-script setup"
|
||||
- JOBS=$(expr $(nproc) + 1)
|
||||
- section_end setup
|
||||
script:
|
||||
- du -sh .git
|
||||
- mkdir build
|
||||
|
||||
@@ -3,12 +3,6 @@
|
||||
stage: build
|
||||
image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:$QEMU_CI_CONTAINER_TAG
|
||||
timeout: 80m
|
||||
before_script:
|
||||
- source scripts/ci/gitlab-ci-section
|
||||
- section_start setup "Pre-script setup"
|
||||
- JOBS=$(expr $(nproc) + 1)
|
||||
- cat /packages.txt
|
||||
- section_end setup
|
||||
script:
|
||||
- !reference [.base_meson_ccache_job_template, script]
|
||||
- mkdir build
|
||||
@@ -48,9 +42,6 @@
|
||||
stage: build
|
||||
image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:$QEMU_CI_CONTAINER_TAG
|
||||
timeout: 60m
|
||||
before_script:
|
||||
- source scripts/ci/gitlab-ci-section
|
||||
- JOBS=$(expr $(nproc) + 1)
|
||||
script:
|
||||
- !reference [.base_meson_ccache_job_template, script]
|
||||
- mkdir build
|
||||
@@ -73,9 +64,6 @@
|
||||
extends: .base_meson_ccache_job_template
|
||||
stage: build
|
||||
image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:$QEMU_CI_CONTAINER_TAG
|
||||
before_script:
|
||||
- source scripts/ci/gitlab-ci-section
|
||||
- JOBS=$(expr $(nproc) + 1)
|
||||
script:
|
||||
- !reference [.base_meson_ccache_job_template, script]
|
||||
- mkdir build
|
||||
|
||||
Reference in New Issue
Block a user