-
Notifications
You must be signed in to change notification settings - Fork 0
101 lines (82 loc) · 3.01 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: build
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
BUILD_TYPE: Release
jobs:
linux:
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
compiler:
- { pkg: clang, exe: 'clang++', version: 18 }
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- run: pip install -U Jinja2
- name: Get CMake and Ninja
uses: lukka/get-cmake@latest
with:
cmakeVersion: 3.26.1
ninjaVersion: 1.11.1
- name: Install Clang
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-add-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-${{matrix.compiler.version}} main"
sudo apt update
sudo apt install -y ${{matrix.compiler.pkg}}-${{matrix.compiler.version}} libc++-dev libc++abi-dev
- name: Install dependencies
run: |
sudo apt update
sudo apt install libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev wayland-protocols libwayland-dev libxkbcommon-dev
sudo apt install libgl-dev
- name: Configure
env:
CC: ${{matrix.compiler.pkg}}-${{matrix.compiler.version}}
CXX: ${{matrix.compiler.exe}}-${{matrix.compiler.version}}
run: cmake -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DFLUX_GRAPHICS_API=OpenGL -B ${{github.workspace}}/build/${{matrix.os}}-${{env.BUILD_TYPE}} -G Ninja
- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build/${{matrix.os}}-${{env.BUILD_TYPE}} --config ${{env.BUILD_TYPE}}
windows:
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
os: [windows-latest]
compiler:
- { pkg: clang, exe: 'clang++', version: 18 }
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- run: pip install -U Jinja2
- name: Get CMake and Ninja
uses: lukka/get-cmake@latest
with:
cmakeVersion: 3.26.1
ninjaVersion: 1.11.1
- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v2
with:
version: ${{matrix.compiler.version}}
- name: Configure
env:
CC: ${{ matrix.compiler.pkg }}
CXX: ${{ matrix.compiler.exe }}
run: cmake -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DFLUX_GRAPHICS_API=OpenGL -DFLUX_ENABLE_LTO=NO -B ${{github.workspace}}/build/${{matrix.os}}-${{env.BUILD_TYPE}} -G Ninja
- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build/${{matrix.os}}-${{env.BUILD_TYPE}} --config ${{env.BUILD_TYPE}}