[gnome-control-center] CI: refactor the build process



commit 38487017b3039f564e62bef3c8ac6fde79b9e34e
Author: Claudio André <claudioandre br gmail com>
Date:   Tue Jun 19 14:35:23 2018 -0300

    CI: refactor the build process
    
    In order to shrink the file and reuse "code".

 .gitlab-ci.yml | 18 +++++++++---------
 1 file 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]