-
-
Notifications
You must be signed in to change notification settings - Fork 71
48 lines (42 loc) · 1.48 KB
/
linux.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
42
43
44
45
46
47
48
name: Linux
on: [push, pull_request]
jobs:
gcc:
runs-on: ubuntu-latest
strategy:
matrix:
configuration: [Debug, Release]
steps:
- uses: actions/checkout@v2
- name: install
run: sudo apt-get update && sudo apt-get install -y libsdl2-dev gcc-10 g++-10
- name: configure
run: CC=gcc-10 CXX=g++-10 cmake -D BUILD_TESTS=1 -D CMAKE_BUILD_TYPE=${{ matrix.configuration }} -S . -B ${{ matrix.configuration }}
- name: build
run: cd ${{ matrix.configuration }} && make -j $(nproc --all)
- name: run unit tests
run: cd ${{ matrix.configuration }} && ctest -j $(nproc --all)
clang:
runs-on: ubuntu-latest
strategy:
matrix:
configuration: [Debug, Release]
steps:
- uses: actions/checkout@v2
- name: install
run: sudo apt-get update && sudo apt-get install -y libsdl2-dev clang-11
- name: configure
run: CC=clang-11 CXX=clang++-11 cmake -D CMAKE_BUILD_TYPE=${{ matrix.configuration }} -S . -B ${{ matrix.configuration }}
- name: build
run: cd ${{ matrix.configuration }} && make -j $(nproc --all)
iwyu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: configure
run: mkdir Release && cd Release && cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_EXPORT_COMPILE_COMMANDS=1 ..
- name: include what you use
uses: danielkrupinski/include-what-you-use-action@master
with:
compilation-database-path: './Release/'
no-error: 'true'