summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@gmail.com>2024-07-17 16:46:52 +0200
committerFelix Morgner <felix.morgner@gmail.com>2024-07-17 16:46:52 +0200
commit931b25f9353f57eff5c41907bc753fb68cda6992 (patch)
treefd4d606a4ecdb378c15a671b17422ec84d434aef
parent66534ae88828abe628682c7fbd6c977f0845d32d (diff)
downloadturns-931b25f9353f57eff5c41907bc753fb68cda6992.tar.xz
turns-931b25f9353f57eff5c41907bc753fb68cda6992.zip
build: simplify presets
-rw-r--r--.gitlab-ci.yml33
-rw-r--r--CMakePresets.json46
2 files changed, 29 insertions, 50 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1132bb7..916433b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,3 +1,8 @@
+stages:
+ - build
+ - test
+ - coverage
+
default:
image: registry.source.arknet.ch/fmorgner/turns/ci:latest
@@ -7,11 +12,27 @@ build:
CMAKE_INSTALL_PREFIX: "ch.arknet.Turns"
script:
- weston --no-config --socket=$WAYLAND_DISPLAY --backend=headless &
- - cmake --workflow --preset $BUILD_TYPE
+ - cmake --preset default
+ - cmake --build --preset default --config $BUILD_TYPE
- cmake --install build --config $BUILD_TYPE
artifacts:
paths:
- ${CMAKE_INSTALL_PREFIX}/
+ - build/
+ expire_in: 24 hours
+ parallel:
+ matrix:
+ - BUILD_TYPE:
+ - Debug
+ - MinSizeRel
+
+test:
+ stage: test
+ script:
+ - weston --no-config --socket=$WAYLAND_DISPLAY --backend=headless &
+ - ctest --preset default --build-config
+ artifacts:
+ paths:
- build/**/*.gcda
- build/**/*.gcno
- build/**/*.res.c
@@ -19,11 +40,11 @@ build:
parallel:
matrix:
- BUILD_TYPE:
- - debug
- - minsizerel
+ - Debug
+ - MinSizeRel
-report:
- stage: test
+coverage:
+ stage: coverage
script:
- lcov -c -o coverage.info -d build -b . --config-file .lcovrc
- lcov -l coverage.info
@@ -38,4 +59,4 @@ report:
- job: build
parallel:
matrix:
- - BUILD_TYPE: debug
+ - BUILD_TYPE: Debug
diff --git a/CMakePresets.json b/CMakePresets.json
index 01c7922..a84435e 100644
--- a/CMakePresets.json
+++ b/CMakePresets.json
@@ -12,14 +12,8 @@
],
"buildPresets": [
{
- "name": "debug",
- "configurePreset": "default",
- "configuration": "Debug"
- },
- {
- "name": "minsizerel",
- "configurePreset": "default",
- "configuration": "MinSizeRel"
+ "name": "default",
+ "configurePreset": "default"
}
],
"testPresets": [
@@ -30,41 +24,5 @@
"outputOnFailure": true
}
}
- ],
- "workflowPresets": [
- {
- "name": "debug",
- "steps": [
- {
- "type": "configure",
- "name": "default"
- },
- {
- "type": "build",
- "name": "debug"
- },
- {
- "type": "test",
- "name": "default"
- }
- ]
- },
- {
- "name": "minsizerel",
- "steps": [
- {
- "type": "configure",
- "name": "default"
- },
- {
- "type": "build",
- "name": "minsizerel"
- },
- {
- "type": "test",
- "name": "default"
- }
- ]
- }
]
}