-
Notifications
You must be signed in to change notification settings - Fork 8
57 lines (47 loc) · 1.47 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
47
48
49
50
51
52
53
54
55
56
57
name: CI
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
jobs:
build:
strategy:
fail-fast: false
matrix:
os: ["windows", "linux", "macos"]
platform: ["x86_64", "aarch64"]
config: ["Debug", "Release"]
include:
- {os: windows, runs-on: windows-latest}
- {os: linux, runs-on: ubuntu-latest}
- {os: macos, runs-on: macos-latest}
exclude:
- {os: macos, platform: x86_64}
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Setup Linux
if: matrix.os == 'linux'
run: sudo apt-get update && sudo apt-get install -y xorg-dev
- name: Setup Linux (aarch64 cross-compilation)
if: matrix.os == 'linux' && matrix.platform == 'aarch64'
run: |
sudo dpkg --add-architecture arm64
sudo apt-get update
sudo apt-get install -y crossbuild-essential-arm64 xorg-dev:arm64
echo "CC=aarch64-linux-gnu-gcc" >> "$GITHUB_ENV"
echo "CXX=aarch64-linux-gnu-g++" >> "$GITHUB_ENV"
- name: Setup MSVC
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{matrix.platform == 'aarch64' && 'amd64_arm64' || 'amd64'}}
- name: Setup CMake/Ninja
uses: lukka/get-cmake@latest
- name: Configure
run: cmake --preset default -S . -B build
- name: Build
run: cmake --build build -j 2