-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (55 loc) · 1.6 KB
/
linux.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
name: Linux
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
env:
CMAKE_GENERATOR: Ninja
jobs:
build:
name: Linux ${{ matrix.compiler.name }}
runs-on: ubuntu-22.04
strategy:
matrix:
compiler:
[
{ name: "GCC", cc: "gcc", cxx: "g++" },
{ name: "Clang", cc: "clang-18", cxx: "clang++-18" },
]
fail-fast: false
steps:
- name: Check out code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install build dependencies
run: |
sudo apt update
sudo apt install -y ninja-build cmake mesa-utils freeglut3-dev
- name: Install LLVM
if: matrix.compiler.name == 'Clang'
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 18 all
- name: Install conan
run: |
pip3 install --upgrade conan
conan profile detect -f
- name: CMake config
run: >
cmake
-S .
-B build
-G Ninja
-D CMAKE_BUILD_TYPE=Release
-D CMAKE_C_COMPILER="${{ matrix.compiler.cc }}"
-D CMAKE_CXX_COMPILER="${{ matrix.compiler.cxx }}"
-D CMAKE_PROJECT_TOP_LEVEL_INCLUDES=external/cmake-conan/conan_provider.cmake
-D CONAN_INSTALL_ARGS="--build=missing;-c tools.system.package_manager:mode=install;-c tools.system.package_manager:sudo=True"
- name: CMake build
run: cmake --build build