-
Notifications
You must be signed in to change notification settings - Fork 93
63 lines (52 loc) · 1.83 KB
/
Copy pathbuild.yml
File metadata and controls
63 lines (52 loc) · 1.83 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Build & test
on:
push:
pull_request:
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
jobs:
build:
name: Build & test
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
build_type:
- RelWithDebInfo
- Debug
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install dependencies (Ubuntu)
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
sudo apt-get update
sudo apt-get install build-essential git make pkg-config cmake ninja-build \
libasound2-dev libpulse-dev libaudio-dev libfribidi-dev libjack-dev libsndio-dev \
libx11-dev libxext-dev libx11-xcb-dev libxrandr-dev libxcursor-dev libxfixes-dev \
libxi-dev libxss-dev libxtst-dev libxkbcommon-dev libdrm-dev libgbm-dev \
libgl1-mesa-dev libgles2-mesa-dev libegl1-mesa-dev libdbus-1-dev libibus-1.0-dev \
libudev-dev libthai-dev libpipewire-0.3-dev libwayland-dev libdecor-0-dev \
liburing-dev
- name: Install dependencies (macOS)
if: ${{ matrix.os == 'macos-latest' }}
run: brew install sdl3
- name: Setup sccache
uses: mozilla-actions/sccache-action@v0.0.9
- name: Set up MSVC env
if: ${{ matrix.os == 'windows-latest' }}
uses: ilammy/msvc-dev-cmd@v1
- name: Configure
run: >
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache
-DCMAKE_MSVC_DEBUG_INFORMATION_FORMAT=Embedded
- name: Build
run: cmake --build build
- name: Test
run: ctest --test-dir build --output-on-failure