-
Notifications
You must be signed in to change notification settings - Fork 3
46 lines (37 loc) · 1.36 KB
/
ci.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: CI
on: [push, pull_request, workflow_dispatch]
jobs:
build:
name: ${{matrix.platform.name}} ${{matrix.config.name}}
runs-on: ${{matrix.platform.os}}
strategy:
fail-fast: false
matrix:
platform:
- { name: Windows, os: windows-latest }
- { name: Linux GCC, os: ubuntu-latest }
- { name: Linux Clang, os: ubuntu-latest, flags: -DCMAKE_CXX_COMPILER=clang++ }
- { name: macOS, os: macos-latest }
config:
- { name: Debug }
- { name: Release }
steps:
- name: Install Linux Dependencies
if: runner.os == 'Linux'
run: |
sudo apt update
sudo apt install libxrandr-dev libxcursor-dev libudev-dev libopenal-dev libflac-dev libvorbis-dev libgl1-mesa-dev libegl1-mesa-dev
- name: Checkout
uses: actions/checkout@v4
- name: Configure
run: cmake --preset dev -DCMAKE_BUILD_TYPE=${{matrix.config.name}} ${{matrix.platform.flags}}
- name: Build
run: cmake --build build --config ${{matrix.config.name}}
- name: Format
if: matrix.platform.name == 'Linux Clang' && matrix.config.name == 'Debug'
run: |
cmake --build build --target format
git diff --exit-code
- name: Tidy
if: matrix.platform.name == 'Linux Clang' && matrix.config.name == 'Debug'
run: cmake --build build --target tidy