Skip to content

Commit 7b319ed

Browse files
committed
add cmake tests to CI
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
1 parent fc123a2 commit 7b319ed

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

.github/workflows/main.yml

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ on:
2525
- /^ci\/.*$/
2626

2727
jobs:
28-
Build:
28+
Testme:
2929
runs-on: ${{ matrix.os }}
3030
strategy:
3131
matrix:
@@ -146,3 +146,30 @@ jobs:
146146
cat test_*.log || true
147147
cat valgrind_test.log || true
148148
cat gcc_errors_*.log || true
149+
150+
CMake:
151+
runs-on: ${{ matrix.os }}
152+
strategy:
153+
matrix:
154+
os: [ ubuntu-18.04, ubuntu-20.04 ]
155+
# The environment given to the programs in the build
156+
# We have only one program and the variable $BUILDOPTIONS
157+
# has only the options to that program: testme.sh
158+
159+
config:
160+
# Static library build
161+
- { CMAKEOPTIONS: '', TARGET: 'check' }
162+
# Shared library build
163+
- { CMAKEOPTIONS: '-DBUILD_SHARED_LIBS=On', TARGET: 'check'}
164+
steps:
165+
- uses: actions/checkout@v2
166+
- name: install dependencies
167+
run: |
168+
sudo apt-get update -qq
169+
sudo apt-get install cmake
170+
- name: build
171+
run: |
172+
mkdir build
173+
cd build
174+
cmake ${{ matrix.config.CMAKEOPTIONS }} ..
175+
make -j$(nproc) ${{ matrix.config.TARGET }}

0 commit comments

Comments
 (0)