-
Notifications
You must be signed in to change notification settings - Fork 2
46 lines (36 loc) · 1.36 KB
/
linux_gcc.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
name: Linux GCC
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build_with_gcc:
strategy:
matrix:
gcc_version: [ 10, 11, 12 ]
mode: [ Release, Debug ]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: deps
run: |
sudo apt-get install -y build-essential
sudo apt-get install -y gcc-${{matrix.gcc_version}} g++-${{matrix.gcc_version}}
sudo apt-get install -y libsdl2-dev libsdl2-ttf-dev libsdl2-image-dev libsdl2-mixer-dev
- name: Clone Deps
run: git submodule update --init
working-directory: ${{github.workspace}}
- name: Install ninja-build tool
uses: seanmiddleditch/gha-setup-ninja@master
- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: ${{ github.job }}-${{ matrix.mode}}-gcc${{ matrix.gcc_version}}
- name: Configure CMake
run: CXX=g++-${{matrix.gcc_version}} CC=gcc-${{matrix.gcc_version}} cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.mode}} -G Ninja -DUSE_CCACHE=ON
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{matrix.mode}} -j --verbose
- name: Test
working-directory: ${{github.workspace}}/build/test
run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure