-
Notifications
You must be signed in to change notification settings - Fork 30
102 lines (92 loc) · 2.85 KB
/
ubuntu-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
102
name: Linux
on:
push:
branches:
- '*'
jobs:
build-linux:
name: build-linux
runs-on: ubuntu-latest
env:
LLVM_TAG:
steps:
- name: Install prerequisites
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy$LLVM_TAG main"
sudo apt update
# Remove any base dist LLVM/Clang installations
sudo apt remove -y \
"libclang*" \
"clang*" \
"llvm*"
# Reinstall tagged versions
sudo apt install -y \
ninja-build \
llvm$LLVM_TAG-dev \
libclang$LLVM_TAG-dev \
clang$LLVM_TAG
- name: Capture LLVM major version
run: |
echo "LLVM_MAJOR=$(ls -1d /usr/lib/llvm-* | sort | tail -n1 | sed 's/.*llvm-//')" >> $GITHUB_ENV
- name: Work around broken packaging
run: |
sudo touch /usr/lib/llvm-$LLVM_MAJOR/lib/libclang-$LLVM_MAJOR.so.1
- name: Checkout
uses: actions/checkout@v4
with:
path: main
- name: Checkout tools repo
uses: actions/checkout@v4
with:
repository: include-what-you-use/include-what-you-use
path: iwyu
- name: Build include-what-you-use
run: |
cd iwyu
mkdir build
cd ./build
cmake -G Ninja \
-DCMAKE_EXPORT_COMPILE_COMMANDS=on \
-DCMAKE_C_COMPILER=clang$LLVM_TAG \
-DCMAKE_CXX_COMPILER=clang++$LLVM_TAG \
-DCMAKE_INSTALL_PREFIX=./ \
-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=on \
../
ninja
- name: Test install
run: |
cd ./iwyu/build
cmake --install .
ls -lr
- name: setup
run: |
sudo apt-get update
sudo apt-get install -y mesa-utils xvfb xorg-dev libglu1-mesa-dev glslang-dev glslang-tools
- name: set up engine dependencies
run: |
cd main
git submodule init
git submodule update
#cd thirdparty/glew
#make extensions
- name: build
run: |
cd main
mkdir build
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DBUILD_SAMPLES=OFF -DBUILD_TESTS=ON -DOPENGL_SHADER_OUTPUT=ON -S . -B build
cd build
make
../iwyu/build/bin/iwyu_tool.py -p .
- name: test
continue-on-error: true
run: |
cd build/tests
mkdir glslang
xvfb-run -a -e errors ./limitless-tests
cat errors
- name: shader glslang validation
run: |
cd build/tests
cd glslang
for file in ./*; do glslangValidator -C "$file"; done