-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (81 loc) · 3.23 KB
/
ci.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
name: All
on: [push, pull_request, pull_request_review]
jobs:
clang-format:
name: Run clang-format
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Run clang-format
run: |
choco upgrade llvm
Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1
refreshenv
echo "Installed $(clang-format --version)."
cd .github/scripts/run_clang_format_on_source/
go run . ../../../src
shader-formatter:
name: Run shader-formatter
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Run shader-formatter
run: |
cd .github/scripts/run_shader_formatter_on_source/
go run . ../../../res/engine/shaders
build-tests-windows:
name: Build and run tests on Windows
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Pull submodules
run: git submodule update --init --recursive
- name: Install dependencies
run: |
choco install ninja doxygen.install
Copy "C:\Program Files\doxygen\bin\doxygen.exe" "C:\ProgramData\Chocolatey\bin\doxygen.exe"
Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1
refreshenv
cmake --version
clang --version
echo "Installed doxygen of version $(doxygen -v)."
- name: Prepare Vulkan SDK
uses: humbletim/[email protected]
with:
vulkan-query-version: 1.3.204.0
vulkan-components: Vulkan-Headers, Vulkan-Loader
vulkan-use-cache: true
- name: Setup vk_enum_string_helper.h
run: |
'#pragma once' | Out-File -FilePath VULKAN_SDK/include/vulkan/vk_enum_string_helper.h
'#include <string>' | Out-File -FilePath VULKAN_SDK/include/vulkan/vk_enum_string_helper.h -Append
'#include <vulkan/vulkan.h>' | Out-File -FilePath VULKAN_SDK/include/vulkan/vk_enum_string_helper.h -Append
'static inline const char* string_VkResult(VkResult input_value) {return "";}' | Out-File -FilePath VULKAN_SDK/include/vulkan/vk_enum_string_helper.h -Append
- name: Create build directory
run: mkdir build
- name: Build (debug)
run: |
cmake -G "Visual Studio 17 2022" -DCMAKE_BUILD_TYPE=Debug ..
cmake --build . --target ALL_BUILD --config Debug
working-directory: build
- name: Test (debug)
run: |
cmake -G "Visual Studio 17 2022" -DCMAKE_BUILD_TYPE=Debug ..
cmake --build . --target engine_tests --config Debug
./OUTPUT/engine_tests/Debug/engine_tests.exe
working-directory: build
- name: Build (release)
run: |
cmake -G "Visual Studio 17 2022" -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --target ALL_BUILD --config Release
working-directory: build
- name: Test (release)
run: |
cmake -G "Visual Studio 17 2022" -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --target engine_tests --config Release
Copy-Item -Path ../res -Recurse -Destination ./OUTPUT/engine_tests/Release/ -Container
./OUTPUT/engine_tests/Release/engine_tests.exe
working-directory: build