Skip to content

Commit a2344d0

Browse files
committed
CI: Convert Prometheus Build to CMake Presets
Signed-off-by: Patrick M. Niedzielski <[email protected]>
1 parent f7239ca commit a2344d0

File tree

2 files changed

+34
-16
lines changed

2 files changed

+34
-16
lines changed

.github/workflows/build.yaml

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -307,22 +307,13 @@ jobs:
307307
working-directory: deps
308308
run: ${{ github.workspace }}/src/plugins/bmqprometheus/build_prometheus_deps.sh
309309

310-
- name: Build plugins
311-
env:
312-
PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig:/opt/bb/lib64/pkgconfig
313-
run: |
314-
cmake -S . -B build/blazingmq -G Ninja \
315-
-DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/deps/srcs/bde-tools/BdeBuildSystem/toolchains/linux/gcc-default.cmake \
316-
-DCMAKE_BUILD_TYPE=Debug \
317-
-DBDE_BUILD_TARGET_SAFE=ON \
318-
-DBDE_BUILD_TARGET_64=ON \
319-
-DBDE_BUILD_TARGET_CPP17=ON \
320-
-DCMAKE_PREFIX_PATH=${{ github.workspace }}/deps/srcs/bde-tools/BdeBuildSystem \
321-
-DCMAKE_INSTALL_LIBDIR=lib64 \
322-
-DINSTALL_TARGETS="prometheus;bmqbrkr;bmqtool"
323-
cmake --build build/blazingmq --parallel 8 --target bmqbrkr bmqtool bmqprometheus
324-
325-
- name: Create prometheus dir
310+
- name: Configure BlazingMQ with Prometheus plugin
311+
run: cmake --preset gh-prometheus-ubuntu-latest-cpp17
312+
313+
- name: Build BlazingMQ with Prometheus plugin
314+
run: cmake --build --preset gh-prometheus-ubuntu-latest-cpp17
315+
316+
- name: Create Prometheus dir
326317
run: mkdir -p prometheus_dir
327318

328319
- name: Download Prometheus

CMakePresets.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,22 @@
9191
"BDE_BUILD_TARGET_CPP17": "ON",
9292
"CMAKE_INSTALL_LIBDIR": "lib64"
9393
}
94+
},
95+
{
96+
"name": "gh-prometheus-ubuntu-latest-cpp17",
97+
"description": "GitHub Actions CI: Build with Prometheus plugin on ubuntu-latest, C++17",
98+
"inherits": "gh-base",
99+
"toolchainFile":
100+
"$env{GITHUB_WORKSPACE}/deps/srcs/bde-tools/BdeBuildSystem/toolchains/linux/gcc-default.cmake",
101+
"environment": {
102+
"PKG_CONFIG_PATH":
103+
"/usr/lib/x86_64-linux-gnu/pkgconfig:/opt/bb/lib64/pkgconfig"
104+
},
105+
"cacheVariables": {
106+
"BDE_BUILD_TARGET_CPP17": "ON",
107+
"CMAKE_INSTALL_LIBDIR": "lib64",
108+
"INSTALL_TARGETS": "prometheus;bmqbrkr;bmqtool"
109+
}
94110
}
95111
],
96112
"buildPresets": [
@@ -106,6 +122,17 @@
106122
"all.t",
107123
"all.it"
108124
]
125+
},
126+
{
127+
"name": "gh-prometheus-ubuntu-latest-cpp17",
128+
"description": "GitHub Actions CI: Build with Prometheus plugin on ubuntu-latest, C++17",
129+
"configurePreset": "gh-prometheus-ubuntu-latest-cpp17",
130+
"jobs": 8,
131+
"targets": [
132+
"bmqbrkr",
133+
"bmqtool",
134+
"bmqprometheus"
135+
]
109136
}
110137
],
111138
"testPresets": [

0 commit comments

Comments
 (0)