-
-
Notifications
You must be signed in to change notification settings - Fork 1
75 lines (61 loc) · 2.3 KB
/
test-build-system.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
# This workflow will thoroughly test the build system
name: Complete build system test
on:
push:
branches: '**'
pull_request:
branches: '**'
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install build dependencies
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main" | sudo tee -a /etc/apt/sources.list
sudo apt-get update
sudo apt-get install --no-install-recommends make pkg-config build-essential
sudo apt-get install --no-install-recommends g++-12 libgomp1 clang-17 libomp-17-dev
sudo apt-get install --no-install-recommends inkscape optipng
sudo apt-get install --no-install-recommends libglm-dev libglfw3-dev libglew-dev libstb-dev libassimp-dev
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 10000
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-17 10000
sudo update-alternatives --set g++ /usr/bin/g++-12
sudo update-alternatives --set clang++ /usr/bin/clang++-17
- name: Test icon generation target
run: |
make icons
- name: (g++) Test shared library build target
run: |
CXX="g++" make library -j$(nproc)
- name: (g++) Test demo build target
run: |
CXX="g++" make build -j$(nproc)
- name: (g++) Test debug demo build target
run: |
CXX="g++" make debug -j$(nproc)
- name: (g++) Check built objects are present
run: |
ls build/demo build/threadDemo build/libammonite.so
- name: Clean build area
run: |
make clean
- name: (clang++) Test shared library build target
run: |
CXX="clang++" make library -j$(nproc)
- name: (clang++) Test demo build target
run: |
CXX="clang++" make build -j$(nproc)
- name: (clang++) Test debug demo build target
run: |
CXX="clang++" make debug -j$(nproc)
- name: (clang++) Check built objects are present
run: |
ls build/demo build/threadDemo build/libammonite.so
- name: Test library install target
run: |
sudo make install
- name: Test headers install target
run: |
sudo make headers