aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2022-04-15 22:22:33 +0200
committerHanspeter Portner <dev@open-music-kontrollers.ch>2022-04-15 22:22:33 +0200
commitb9f02b61ee61daaefcfa6ce59fd6878275d85d5e (patch)
treeb5938996b824ff4d4e70c73d6b72a6634b5c07a4
parentf6e801276ca2e8c6ed216dcf3fc317b7fbcc6ca9 (diff)
downloadprops.lv2-b9f02b61ee61daaefcfa6ce59fd6878275d85d5e.tar.xz
Squashed 'gitlab-ci/' changes from d20b0cd..327b305
327b305 Define dynamic VERSION env var git-subtree-dir: gitlab-ci git-subtree-split: 327b305ea86c1db6d49b2fe259068cdc30b1ba80
-rw-r--r--generic.yml31
1 files changed, 20 insertions, 11 deletions
diff --git a/generic.yml b/generic.yml
index 8a90d80..ad25c09 100644
--- a/generic.yml
+++ b/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}/"