Skip to content

Commit 2c649b9

Browse files
committed
ci: streamline CI workflow by consolidating cmake commands and adding configuration options for Windows build
1 parent 6aaf34c commit 2c649b9

File tree

1 file changed

+8
-20
lines changed

1 file changed

+8
-20
lines changed

.github/workflows/ci.yaml

+8-20
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,13 @@ jobs:
1313
- name: checkout repository
1414
uses: actions/checkout@v4
1515
- name: configure
16-
run: |
17-
cmake -S . -B build \
18-
-DCMAKE_BUILD_TYPE=Release
16+
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
1917
- name: build
20-
run: |
21-
cmake --build build
18+
run: cmake --build build
2219
- name: test
23-
run: |
24-
cd build
25-
ctest --output-on-failure
20+
run: ctest --test-dir build --output-on-failure
2621
- name: install
27-
run: |
28-
sudo cmake --install build
22+
run: sudo cmake --install build
2923
build-windows:
3024
name: windows-2022-release
3125
runs-on: windows-2022
@@ -36,16 +30,10 @@ jobs:
3630
- name: checkout repository
3731
uses: actions/checkout@v4
3832
- name: configure
39-
run: |
40-
cmake -S . -B build \
41-
-DCMAKE_BUILD_TYPE=Release
33+
run: cmake -S . -B build -G "Visual Studio 17 2022"
4234
- name: build
43-
run: |
44-
cmake --build build
35+
run: cmake --build build --config Release
4536
- name: test
46-
run: |
47-
cd build
48-
ctest --output-on-failure
37+
run: ctest --test-dir build --output-on-failure --config Release
4938
- name: install
50-
run: |
51-
cmake --install build
39+
run: cmake --install build --config Release

0 commit comments

Comments
 (0)