Skip to content

Commit d575979

Browse files
committed
add .gitlab-ci-coverage.yml for a scheduled build
This will be used by the https://gitlab.com/samba-team/samba configuration, while https://gitlab.com/samba-team/devel/samba will still use .gitlab-ci.yml (via the legacy .gitlab-ci-private.yml). The key point is the usage of the more powerful n1-standard-2 runners for testing. Signed-off-by: Stefan Metzmacher <[email protected]> Reviewed-by: Andrew Bartlett <[email protected]> Reviewed-by: Andreas Schneider <[email protected]> Autobuild-User(master): Stefan Metzmacher <[email protected]> Autobuild-Date(master): Tue Apr 13 09:33:14 UTC 2021 on sn-devel-184
1 parent 7387da7 commit d575979

File tree

4 files changed

+38
-3
lines changed

4 files changed

+38
-3
lines changed

.gitlab-ci-coverage-runners.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
include:
2+
- /.gitlab-ci-default-runners.yml
3+
4+
.shared_runner_test:
5+
# We need the more powerful n1-standard-2 runners
6+
# in order to handle the lcov overhead.
7+
#
8+
# See .gitlab-ci-default-runners.yml for more details
9+
tags:
10+
- gitlab-org-docker

.gitlab-ci-coverage.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# This is just used for the scheduled pipelines in the
2+
# https://gitlab.com/samba-team/samba configuration
3+
#
4+
5+
variables:
6+
SAMBA_CI_FLAVOR: "coverage"
7+
# "--enable-coverage" or ""
8+
SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE: "--enable-coverage"
9+
10+
include:
11+
- /.gitlab-ci-coverage-runners.yml
12+
- /.gitlab-ci-main.yml

.gitlab-ci-default.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
variables:
2+
SAMBA_CI_FLAVOR: "default"
3+
# "--enable-coverage" or ""
4+
# See .gitlab-ci-coverage.yml
5+
SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE: ""
6+
17
include:
28
- /.gitlab-ci-default-runners.yml
39
- /.gitlab-ci-main.yml

.gitlab-ci-main.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ variables:
3030
#
3131
GIT_STRATEGY: fetch
3232
GIT_DEPTH: "3"
33-
# "--enable-coverage" or ""
34-
SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE: ""
3533
#
3634
# we run autobuild.py inside a samba CI docker image located on gitlab's registry
3735
# overwrite this variable if you want use your own image registry.
@@ -89,7 +87,7 @@ include:
8987
AUTOBUILD_JOB_NAME: $CI_JOB_NAME
9088
stage: build
9189
cache:
92-
key: ccache.${CI_JOB_NAME}.${SAMBA_CI_JOB_IMAGE}
90+
key: ccache.${CI_JOB_NAME}.${SAMBA_CI_JOB_IMAGE}.${SAMBA_CI_FLAVOR}
9391
paths:
9492
- ccache
9593
before_script:
@@ -191,6 +189,7 @@ others:
191189
# the acls again.
192190
- cp -a /sha1sum.txt /tmp/samba-testbase/image-sha1sum.txt
193191
- cp -a /tmp/commit.txt /tmp/samba-testbase/commit.txt
192+
- ln -s /tmp/samba-testbase/${AUTOBUILD_JOB_NAME}/ /tmp/samba-testbase/build_subdir_link
194193
- pushd /tmp && getfacl -R samba-testbase > samba-testbase.acl.dump && popd
195194
- chmod -R +w /tmp/samba-testbase
196195
- mv /tmp/samba-testbase.acl.dump /tmp/samba-testbase/
@@ -213,6 +212,11 @@ others:
213212
- diff -u /tmp/samba-testbase/commit.txt /tmp/commit.txt
214213
- mv /tmp/samba-testbase/samba-testbase.acl.dump /tmp/samba-testbase.acl.dump
215214
- pushd /tmp && setfacl --restore=/tmp/samba-testbase.acl.dump && popd
215+
- ls -la /tmp/samba-testbase/
216+
- ls -la /tmp/samba-testbase/build_subdir_link
217+
- ls -la /tmp/samba-testbase/build_subdir_link/
218+
- if [ -n "$SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE" ]; then find /tmp/samba-testbase/build_subdir_link/ -type d -printf "'%p'\n" | xargs chmod u+w; fi
219+
- ls -la /tmp/samba-testbase/build_subdir_link/
216220
# gitlab predefines CI_JOB_NAME for each job. The gitlab job usually matches the
217221
# autobuild name, which means we can define a default template that runs most autobuild jobs
218222
- script/autobuild.py $AUTOBUILD_JOB_NAME $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --skip-dependencies --verbose --nocleanup --keeplogs --tail --full-testbase /tmp/samba-testbase
@@ -429,9 +433,12 @@ pages:
429433
- samba-no-opath1
430434
- samba-no-opath2
431435
script:
436+
- ls -la *.info
432437
- ./configure.developer
433438
- make -j
439+
- ls -la *.info
434440
- lcov $(ls *.info | xargs -I{} echo -n "-a {} ") -o all.info
441+
- ls -la *.info
435442
- genhtml all.info --output-directory public --prefix=$(pwd) --title "coverage report for $CI_COMMIT_REF_NAME $CI_COMMIT_SHORT_SHA"
436443
artifacts:
437444
expire_in: 30 days

0 commit comments

Comments
 (0)