-
Notifications
You must be signed in to change notification settings - Fork 0
101 lines (84 loc) · 2.85 KB
/
test.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: test
on:
push:
branches:
- '**'
workflow_call:
jobs:
test-windows:
runs-on: windows-2022
env:
VS_PATH: C:\Program Files\Microsoft Visual Studio\2022\Enterprise
MSBUILD_PATH: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\MSBuild.exe
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Cache dependencies
id: cache-deps
uses: actions/cache@v3
env:
cache-name: cache-deps
with:
path: C:/libraries
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('tools/install_deps.py') }}-v1
- if: ${{ steps.cache-deps.outputs.cache-hit != 'true' }}
name: Install dependencies
shell: cmd
run: |
pip install conan
python tools/install_deps.py C:/libraries
- name: Build libfwk, tests & tools
shell: cmd
run: |
"%MSBUILD_PATH%" windows\libfwk.sln /p:Platform=x64 /p:Configuration=Debug
- name: Run tests
shell: cmd
run: |
build\test_stuff-x64-Debug\test_stuff.exe
build\test_math-x64-Debug\test_math.exe
test-linux:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Install Dependencies
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt update
sudo apt-get install libsdl2-dev libfreetype-dev libvorbis-dev libogg-dev libopenal-dev libdwarf-dev libelf-dev
wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo tee /etc/apt/trusted.gpg.d/lunarg.asc
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list http://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list
sudo apt update
sudo apt install libvulkan-dev shaderc glslang-dev vulkan-headers
- name: Build libfwk
run: |
make -j8 lib
- name: Build tests & tools
run: |
make -j8 tests tools
- name: Run tests
run: |
tests/stuff
tests/math
check-formatting:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Install Dependencies
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-17 main'
sudo apt update
sudo apt install clang-format-17
pip install black
- name: Check C++ formatting
run: |
python tools/format.py -c
- name: Check Python formatting
if: '!cancelled()'
run: |
python -m black tools/* --check --color --diff -l 100