summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorJoe Guo <joeg@catalyst.net.nz>2019-05-03 18:35:44 +1200
committerAndrew Bartlett <abartlet@samba.org>2019-05-10 08:19:17 +0000
commit5b2a1a39015b2261d244127e8c604144d49220cf (patch)
treeeb3a74d830ce3307a6e2bd358ff44abfb3393671 /.gitlab-ci.yml
parent1b48d8a9cea8eee16a621359d360877663614627 (diff)
downloadsamba-5b2a1a39015b2261d244127e8c604144d49220cf.tar.gz
.gitlab-ci.yml: add var SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE
keep this var empty by default, since gcov will slow down the build process. set to `--enable-coverage` to enable coverage on demand. Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml22
1 files changed, 13 insertions, 9 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a69db94ff36..5af472bbd6d 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -7,6 +7,8 @@ stages:
variables:
GIT_STRATEGY: fetch
GIT_DEPTH: "3"
+ # "--enable-coverage" or ""
+ SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE: ""
#
# we run autobuild.py inside a samba CI docker image located on gitlab's registry
# overwrite this variable if you want use your own image registry.
@@ -56,6 +58,8 @@ include:
- df -h
- cat /proc/swaps
- free -h
+ # ld will fail if coverage enabled, force link ld to ld.bfd
+ - if [ -n "$SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE" ]; then sudo ln -sf $(which ld.bfd) $(which ld); fi
# See bootstrap/.gitlab-ci.yml how to generate a new image
- echo "SAMBA_CI_CONTAINER_REGISTRY[${SAMBA_CI_CONTAINER_REGISTRY}]"
- echo "SAMBA_CI_CONTAINER_TAG[${SAMBA_CI_CONTAINER_TAG}]"
@@ -71,10 +75,10 @@ include:
- free -h
artifacts:
expire_in: 1 week
- when: on_failure
paths:
- "*.stdout"
- "*.stderr"
+ - "*.info"
- system-info.txt
retry:
max: 2
@@ -84,18 +88,18 @@ include:
script:
# gitlab predefines CI_JOB_NAME for each job. The gitlab job usually matches the
# autobuild name, which means we can define a default template that runs most autobuild jobs
- - echo "Running cmd script/autobuild.py $AUTOBUILD_JOB_NAME --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase"
- - script/autobuild.py $AUTOBUILD_JOB_NAME --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
+ - echo "Running cmd script/autobuild.py $AUTOBUILD_JOB_NAME $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase"
+ - script/autobuild.py $AUTOBUILD_JOB_NAME $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
others:
extends: .shared_template
script:
- - script/autobuild.py ldb --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
- - script/autobuild.py pidl --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
- - script/autobuild.py replace --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
- - script/autobuild.py talloc --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
- - script/autobuild.py tdb --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
- - script/autobuild.py tevent --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
+ - script/autobuild.py ldb $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
+ - script/autobuild.py pidl $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
+ - script/autobuild.py replace $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
+ - script/autobuild.py talloc $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
+ - script/autobuild.py tdb $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
+ - script/autobuild.py tevent $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
samba:
extends: .shared_template