Skip to content

Commit 7758cc3

Browse files
committed
[cmake] add minimal build test
for CMakeLists.txt at root
1 parent c9d3af9 commit 7758cc3

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

.github/workflows/cmake-tests.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,26 @@ env:
2121
COMMON_CMAKE_FLAGS: "-DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DZSTD_BUILD_TESTS=ON"
2222

2323
jobs:
24+
# Basic cmake build using the root CMakeLists.txt
25+
# Provides a lightweight sanity check that the top-level project config builds
26+
# with the default Unix Makefiles generator driven purely through cmake commands
27+
cmake-root-basic:
28+
name: "CMake Root Build"
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # tag=v5.0.0
32+
- name: Configure (Root)
33+
run: |
34+
cmake -S . -B cmake-build -DCMAKE_BUILD_TYPE=Release ${{ env.COMMON_CMAKE_FLAGS }}
35+
- name: Build (Root)
36+
run: |
37+
cmake --build cmake-build --config Release
38+
2439
# Ubuntu-based cmake build using make wrapper
2540
# This test uses the make-driven cmake build to ensure compatibility
2641
# with the existing build system integration
2742
cmake-ubuntu-basic:
28-
name: "CMake Ubuntu Basic Build"
43+
name: "CMake build using make wrapper"
2944
runs-on: ubuntu-latest
3045
steps:
3146
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # tag=v5.0.0

0 commit comments

Comments
 (0)