-
Notifications
You must be signed in to change notification settings - Fork 3
44 lines (37 loc) · 1.48 KB
/
build_clang.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
name: "Clang Code Build"
on:
workflow_call:
inputs:
render_api:
required: true
type: string
build_config:
required: true
type: string
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Install necessary linux dependencies
run: |
sudo apt-get update
sudo apt-get install libxrandr-dev libxinerama-dev x11-xkb-utils libxcursor-dev libxi-dev mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev clang-13
# https://github.com/actions/runner-images/issues/8659
# todo: remove this step once github actions stops being bad
# workaround is to use this magic script to install clang-17.
# it is bound to start failing soon.
- name: Install newer Clang
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x ./llvm.sh
sudo ./llvm.sh 17
- uses: actions/checkout@v2
with:
submodules: recursive
- name: 'Install Vulkan SDK'
uses: humbletim/install-vulkan-sdk@v1.1.1
if: ${{inputs.render_api == 'vulkan'}}
- name: 'Configure Topaz ${{inputs.render_api}}_clang_${{inputs.build_config}}'
run: cmake --preset host_${{inputs.render_api}}_${{inputs.build_config}} -DCMAKE_CXX_COMPILER=clang++-17 -DCMAKE_C_COMPILER=clang-17
- name: 'Build Topaz ${{inputs.render_api}}_clang_${{inputs.build_config}}'
run: cmake --build ./build/Linux_${{inputs.render_api}}_${{inputs.build_config}} --target topaz