summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudio André <claudioandre.br@gmail.com>2018-06-19 14:35:23 -0300
committerClaudio André <claudioandre.br@gmail.com>2018-06-21 13:29:08 -0300
commit38487017b3039f564e62bef3c8ac6fde79b9e34e (patch)
tree811c58b00454d097e76004597363d19ef4d2b64e
parent8fb43047dfb4f74de1d9c107bfbae113b02bd63c (diff)
downloadgnome-control-center-38487017b3039f564e62bef3c8ac6fde79b9e34e.tar.gz
CI: refactor the build process
In order to shrink the file and reuse "code".
-rw-r--r--.gitlab-ci.yml18
1 files changed, 9 insertions, 9 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f4fe41f01..cfa29c9b5 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -23,6 +23,12 @@ stages:
build-aux/ci/ci-helper.sh "INFO" &&
build-aux/ci/ci-helper.sh "GIT_INFO"
+.Build procedure: &build_procedure
+ echo "== Building ==" &&
+ rm -rf _build/ &&
+ meson . _build ${BUILD_OPTS} &&
+ ninja -C _build 2>&1 | tee compilation.log
+
##
# Stage: Build
#
@@ -36,10 +42,7 @@ build:
script:
- *environment_information
-
- - echo "== Building =="
- - meson . _build
- - ninja -C _build 2>&1 | tee compilation.log
+ - *build_procedure
- echo "== Installing =="
- ninja -C _build install
@@ -84,15 +87,12 @@ coverage:
<<: *save_build_logs
stage: test
variables:
+ BUILD_OPTS: "-Db_coverage=true"
coverage: '/^Lines:.\d+.\d+.(\d+\.\d+\%)/'
script:
- *environment_information
-
- - echo "== Building =="
- - rm -rf _build/
- - meson . _build -Db_coverage=true
- - ninja -C _build 2>&1 | tee compilation.log
+ - *build_procedure
- echo "== Testing =="
- ninja -C _build test