Minor improvements. #530
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |