Skip to content

Commit 5efe4be

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

File tree

2 files changed

+36
-16
lines changed

2 files changed

+36
-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: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,23 @@
9191
"BDE_BUILD_TARGET_CPP17": "ON",
9292
"CMAKE_INSTALL_LIBDIR": "lib64"
9393
}
94+
},
95+
{
96+
"name": "gh-prometheus-ubuntu-latest-cpp17",
97+
"description":
98+
"GitHub Actions CI: Build with Prometheus plugin on ubuntu-latest, C++17",
99+
"inherits": "gh-base",
100+
"toolchainFile":
101+
"$env{GITHUB_WORKSPACE}/deps/srcs/bde-tools/BdeBuildSystem/toolchains/linux/gcc-default.cmake",
102+
"environment": {
103+
"PKG_CONFIG_PATH":
104+
"/usr/lib/x86_64-linux-gnu/pkgconfig:/opt/bb/lib64/pkgconfig"
105+
},
106+
"cacheVariables": {
107+
"BDE_BUILD_TARGET_CPP17": "ON",
108+
"CMAKE_INSTALL_LIBDIR": "lib64",
109+
"INSTALL_TARGETS": "prometheus;bmqbrkr;bmqtool"
110+
}
94111
}
95112
],
96113
"buildPresets": [
@@ -106,6 +123,18 @@
106123
"all.t",
107124
"all.it"
108125
]
126+
},
127+
{
128+
"name": "gh-prometheus-ubuntu-latest-cpp17",
129+
"description":
130+
"GitHub Actions CI: Build with Prometheus plugin on ubuntu-latest, C++17",
131+
"configurePreset": "gh-prometheus-ubuntu-latest-cpp17",
132+
"jobs": 8,
133+
"targets": [
134+
"bmqbrkr",
135+
"bmqtool",
136+
"bmqprometheus"
137+
]
109138
}
110139
],
111140
"testPresets": [

0 commit comments

Comments
 (0)