-
Notifications
You must be signed in to change notification settings - Fork 8
41 lines (28 loc) · 1.03 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Makefile Tests
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
cpp_version: [17,20,23]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Update package list
run: sudo apt-get update
- name: Install dependencies
run: sudo apt-get install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev libglew-dev gdb valgrind
- name: Build
run: make BUILD_TYPE=2 CPP_VERSION=${{ matrix.cpp_version }} -Csrc -j4
- name: Move library to ld path
run: sudo cp src/libprimis.so /usr/lib/libprimis.so
- name: Build test code
run: cd test && make CPP_VERSION=${{ matrix.cpp_version }} BUILD_TYPE=2
- name: Run tests with GDB
run: cd test && gdb --batch -ex "run" -ex "bt full" -ex "quit 0" libprimis_testsuite
- name: Run tests with Valgrind
run: cd test && valgrind --leak-check=full --track-origins=yes ./libprimis_testsuite
- name: Run tests
run: cd test && ./libprimis_testsuite