Skip to content

Commit c831d22

Browse files
committed
adjustments
1 parent a4c9f52 commit c831d22

File tree

1 file changed

+25
-11
lines changed

1 file changed

+25
-11
lines changed

.github/workflows/ci.yml

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,20 @@ jobs:
2020
build_type: [Release]
2121
include:
2222
- os: ubuntu-latest
23-
c_compiler: gcc
24-
cpp_compiler: g++
23+
build-shared: 'ON'
24+
build-type: Release
25+
cxx-standard: 17
26+
cxx-compiler: g++
27+
cc-compiler: gcc
2528
- os: windows-latest
26-
c_compiler: cl
27-
cpp_compiler: cl
29+
build-shared: 'OFF'
30+
build-type: Release
31+
cxx-standard: 17
2832
- os: macos-latest
29-
c_compiler: clang
30-
cpp_compiler: clang++
33+
build-shared: 'ON'
34+
build-type: Release
35+
cxx-standard: 17
36+
3137

3238
steps:
3339
- name: Checkout code
@@ -37,8 +43,6 @@ jobs:
3743
run: |
3844
echo "Build type: ${{ matrix.build_type }}"
3945
echo "OS: ${{ matrix.os }}"
40-
echo "C compiler: ${{ matrix.c_compiler }}"
41-
echo "C++ compiler: ${{ matrix.cpp_compiler }}"
4246
4347
# Linux specific setup
4448
- name: Install dependencies (Linux)
@@ -60,17 +64,27 @@ jobs:
6064

6165
- name: Configure CMake
6266
run: |
63-
cmake -B build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
67+
cmake ../. \
68+
-DCMAKE_INSTALL_PREFIX=../_install \
69+
-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS='ON'\
70+
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \
71+
-DCMAKE_CXX_STANDARD=${{ matrix.cxx-standard }} \
72+
-DCMAKE_CXX_FLAGS=${{ matrix.cxx-flags }} \
73+
-DCMAKE_VERBOSE_MAKEFILE:BOOL='OFF' \
74+
-DBUILD_SHARED_LIBS=${{ matrix.build-shared }}
6475
6576
- name: Build
6677
run: |
67-
cmake --build build --config ${{ matrix.build_type }}
78+
run: |
79+
cmake --build . \
80+
--target install \
81+
--config ${{ matrix.build-type }}
6882
6983
# Optional: Run tests if you have any
7084
- name: Test
7185
working-directory: build
7286
run: |
73-
ctest --build-config ${{ matrix.build_type }} --verbose
87+
ctest -C ${{ matrix.build-type }}
7488
7589
# Upload build artifacts
7690
- name: Upload artifacts

0 commit comments

Comments
 (0)