aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gitlab-ci/generic.yml31
1 files changed, 20 insertions, 11 deletions
diff --git a/gitlab-ci/generic.yml b/gitlab-ci/generic.yml
index 8a90d80..ad25c09 100644
--- a/gitlab-ci/generic.yml
+++ b/gitlab-ci/generic.yml
@@ -2,45 +2,54 @@
# SPDX-License-Identifier: CC0-1.0
stages:
+ - prepare
- build
- deploy
variables:
PKG_CONFIG_PATH: "/opt/lv2/lib/pkgconfig:/opt/${CI_BUILD_NAME}/lib/pkgconfig:/usr/lib/${CI_BUILD_NAME}/pkgconfig"
- BUILD_OPTS : ""
+ BUILD_OPTS: ""
+
+vars:
+ stage: prepare
+ script:
+ - echo "VERSION=$( grep version meson_options.txt | cut -d\' -f6 )" > vars.env
+ artifacts:
+ reports:
+ dotenv: vars.env
.native_template: &native_definition
stage: build
script:
- - meson --prefix="${CI_PROJECT_DIR}/${CI_PROJECT_NAME}-$(cat VERSION)/${CI_BUILD_NAME}" -Dlv2libdir="" --cross-file "${CI_BUILD_NAME}" ${BUILD_OPTS} build
+ - meson --prefix="${CI_PROJECT_DIR}/${CI_PROJECT_NAME}-${VERSION}/${CI_BUILD_NAME}" -Dlv2libdir="" --cross-file "${CI_BUILD_NAME}" ${BUILD_OPTS} build
- ninja -C build
- ninja -C build test
- meson test -C build --wrap="valgrind --leak-check=full --error-exitcode=1"
- ninja -C build install
- - meson --prefix="${CI_PROJECT_DIR}/${CI_PROJECT_NAME}-$(cat VERSION)/${CI_BUILD_NAME}" -Dlv2libdir="" --cross-file "${CI_BUILD_NAME}" ${BUILD_OPTS} -Db_sanitize=address sanitize
+ - meson --prefix="${CI_PROJECT_DIR}/${CI_PROJECT_NAME}-${VERSION}/${CI_BUILD_NAME}" -Dlv2libdir="" --cross-file "${CI_BUILD_NAME}" ${BUILD_OPTS} -Db_sanitize=address sanitize
- ninja -C sanitize
- ninja -C sanitize test
- - scan-build --status-bugs meson --prefix="${CI_PROJECT_DIR}/${CI_PROJECT_NAME}-$(cat VERSION)/${CI_BUILD_NAME}" -Dlv2libdir="" --cross-file "${CI_BUILD_NAME}" ${BUILD_OPTS} scanbuild
+ - scan-build --status-bugs meson --prefix="${CI_PROJECT_DIR}/${CI_PROJECT_NAME}-${VERSION}/${CI_BUILD_NAME}" -Dlv2libdir="" --cross-file "${CI_BUILD_NAME}" ${BUILD_OPTS} scanbuild
- scan-build --status-bugs ninja -C scanbuild
- scan-build --status-bugs ninja -C scanbuild test
artifacts:
- name: "${CI_PROJECT_NAME}-$(cat VERSION)-${CI_BUILD_NAME}"
+ name: "${CI_PROJECT_NAME}-${VERSION}-${CI_BUILD_NAME}"
paths:
- - "${CI_PROJECT_NAME}-$(cat VERSION)/${CI_BUILD_NAME}/"
+ - "${CI_PROJECT_NAME}-${VERSION}/${CI_BUILD_NAME}/"
.cross_template: &cross_definition
stage: build
script:
- - meson --prefix="${CI_PROJECT_DIR}/${CI_PROJECT_NAME}-$(cat VERSION)/${CI_BUILD_NAME}" -Dlv2libdir="" --cross-file "${CI_BUILD_NAME}" ${BUILD_OPTS} build
+ - meson --prefix="${CI_PROJECT_DIR}/${CI_PROJECT_NAME}-${VERSION}/${CI_BUILD_NAME}" -Dlv2libdir="" --cross-file "${CI_BUILD_NAME}" ${BUILD_OPTS} build
- ninja -C build
- ninja -C build test
- ninja -C build install
artifacts:
- name: "${CI_PROJECT_NAME}-$(cat VERSION)-${CI_BUILD_NAME}"
+ name: "${CI_PROJECT_NAME}-${VERSION}-${CI_BUILD_NAME}"
paths:
- - "${CI_PROJECT_NAME}-$(cat VERSION)/${CI_BUILD_NAME}/"
+ - "${CI_PROJECT_NAME}-${VERSION}/${CI_BUILD_NAME}/"
# build
.universal_linux_template_stretch: &universal_linux_definition_stretch
@@ -109,6 +118,6 @@ pack:
script:
- echo 'packing up'
artifacts:
- name: "${CI_PROJECT_NAME}-$(cat VERSION)"
+ name: "${CI_PROJECT_NAME}-${VERSION}"
paths:
- - "${CI_PROJECT_NAME}-$(cat VERSION)/"
+ - "${CI_PROJECT_NAME}-${VERSION}/"