-
Notifications
You must be signed in to change notification settings - Fork 6
63 lines (54 loc) · 1.7 KB
/
build.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
58
59
60
61
62
63
name: Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
# Declare default permissions as read only.
permissions: read-all
jobs:
build:
name: Build ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Fetch dependencies
run: ./deps.sh
- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v1
with:
version: "15"
- name: Get cmake and ninja
uses: lukka/get-cmake@v3.26.0
with:
cmakeVersion: 3.26.0
ninjaVersion: 1.11.1
# The clang build installed above links libtinfo5, but it's missing from the current
# ubuntu-latest image.
- name: Install Ubuntu package dependencies
run: |
sudo apt install -y libtinfo5 \
mesa-common-dev libgl1-mesa-dev libgles2-mesa-dev \
libxrandr2 libxrandr-dev \
libxinerama1 libxinerama-dev \
libxcursor1 libxcursor-dev \
libxi6 libxi-dev \
libxext6 libxext-dev \
libx11-6 libx11-dev \
libxrender1 libxrender-dev \
libxfixes3 libxfixes-dev
if: matrix.os == 'ubuntu-latest'
- name: Configure CMake
run: cmake --preset ninja-debug-clang
- name: Build
run: |
cmake --build ${{github.workspace}}/out/build/ninja-debug \
--target example