CI: refactor the build process
In order to shrink the file and reuse "code".
This commit is contained in:
parent
8fb43047df
commit
38487017b3
1 changed files with 9 additions and 9 deletions
|
@ -23,6 +23,12 @@ stages:
|
||||||
build-aux/ci/ci-helper.sh "INFO" &&
|
build-aux/ci/ci-helper.sh "INFO" &&
|
||||||
build-aux/ci/ci-helper.sh "GIT_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
|
# Stage: Build
|
||||||
#
|
#
|
||||||
|
@ -36,10 +42,7 @@ build:
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- *environment_information
|
- *environment_information
|
||||||
|
- *build_procedure
|
||||||
- echo "== Building =="
|
|
||||||
- meson . _build
|
|
||||||
- ninja -C _build 2>&1 | tee compilation.log
|
|
||||||
|
|
||||||
- echo "== Installing =="
|
- echo "== Installing =="
|
||||||
- ninja -C _build install
|
- ninja -C _build install
|
||||||
|
@ -84,15 +87,12 @@ coverage:
|
||||||
<<: *save_build_logs
|
<<: *save_build_logs
|
||||||
stage: test
|
stage: test
|
||||||
variables:
|
variables:
|
||||||
|
BUILD_OPTS: "-Db_coverage=true"
|
||||||
coverage: '/^Lines:.\d+.\d+.(\d+\.\d+\%)/'
|
coverage: '/^Lines:.\d+.\d+.(\d+\.\d+\%)/'
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- *environment_information
|
- *environment_information
|
||||||
|
- *build_procedure
|
||||||
- echo "== Building =="
|
|
||||||
- rm -rf _build/
|
|
||||||
- meson . _build -Db_coverage=true
|
|
||||||
- ninja -C _build 2>&1 | tee compilation.log
|
|
||||||
|
|
||||||
- echo "== Testing =="
|
- echo "== Testing =="
|
||||||
- ninja -C _build test
|
- ninja -C _build test
|
||||||
|
|
Loading…
Add table
Reference in a new issue