1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

.gitlab-ci.yml: Honour AUTOBUILD_SKIP_SAMBA_O3 in GitLab CI

GitLab CI resources are expensive and often rationed so
provide a way to test other things without testing an -O3
build also, as this will save 9 jobs.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14861

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
Andrew Bartlett 2021-10-12 07:55:54 +13:00
parent fc2347be4e
commit 7857e1249b
2 changed files with 13 additions and 4 deletions

View File

@ -3,6 +3,7 @@ variables:
# "--enable-coverage" or "" # "--enable-coverage" or ""
# See .gitlab-ci-coverage.yml # See .gitlab-ci-coverage.yml
SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE: "" SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE: ""
AUTOBUILD_SKIP_SAMBA_O3: "0"
include: include:
- /.gitlab-ci-default-runners.yml - /.gitlab-ci-default-runners.yml

View File

@ -514,16 +514,24 @@ ubuntu1804-samba-o3:
AUTOBUILD_JOB_NAME: samba-o3 AUTOBUILD_JOB_NAME: samba-o3
SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_ubuntu1804} SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_ubuntu1804}
SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE: "--enable-coverage" SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE: "--enable-coverage"
only:
variables:
# do not run o3 builds (which run a lot of VMs) if told not to
# (this uses the same variable as autobuild.py)
- $AUTOBUILD_SKIP_SAMBA_O3 == "0"
# All other jobs do not want code coverage. # All other jobs do not want code coverage.
.samba-o3-template: .samba-o3-template:
extends: .shared_template extends: .shared_template
variables: variables:
AUTOBUILD_JOB_NAME: samba-o3 AUTOBUILD_JOB_NAME: samba-o3
only: rules:
variables: # do not run o3 builds (which run a lot of VMs) if told not to
# do not run o3 for coverage since they are using different images # (this uses the same variable as autobuild.py)
- $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE == "" - if: $AUTOBUILD_SKIP_SAMBA_O3 == "1"
when: never
# do not run o3 for coverage since they are using different images
- if: $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE == ""
ubuntu2004-samba-o3: ubuntu2004-samba-o3:
extends: .samba-o3-template extends: .samba-o3-template