Skip to content

Commit b806326

Browse files
Refactoring tests definition (#364)
* refactored tests definition * attempt to link vulkan lib * updated test source * off install vulkan sdk * fixed test download artifact * fixed env path * fixed pipeline * fixed conditional publishing vulkan artifact * fixed readme
1 parent 9579325 commit b806326

File tree

4 files changed

+33
-26
lines changed

4 files changed

+33
-26
lines changed

.github/workflows/job-cmakebuild-windows.yml

+10
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,13 @@ jobs:
3333
!Result.Windows.x64.MultiConfig/Panzerfaust/${{inputs.configuration}}/net6.0/**/Microsoft.CodeAnalysis.resources.dll
3434
!Result.Windows.x64.MultiConfig/Panzerfaust/${{inputs.configuration}}/net6.0/**/Microsoft.CodeAnalysis.Scripting.resources.dll
3535
!Result.Windows.x64.MultiConfig/Panzerfaust/${{inputs.configuration}}/net6.0/**/createdump.exe
36+
37+
- name: Publish Vulkan Build Artifacts
38+
if: ${{ inputs.configuration == 'Release'}}
39+
uses: actions/upload-artifact@v4
40+
with:
41+
name: Vulkan-build-x64-release
42+
path: |
43+
Result.Windows.x64.MultiConfig/__externals/Vulkan-Loader/loader/release/vulkan-1.dll
44+
Result.Windows.x64.MultiConfig/__externals/Vulkan-Loader/loader/release/vulkan-1.exp
45+
Result.Windows.x64.MultiConfig/__externals/Vulkan-Loader/loader/release/vulkan-1.lib

.github/workflows/job-test-windows.yml

+10-10
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@ jobs:
2121
uses: actions/download-artifact@v4
2222
with:
2323
path: Result.Windows.x64.MultiConfig
24-
pattern: Build-Windows-x64-*
25-
merge-multiple: true
26-
27-
- name: Install Vulkan SDK
28-
uses: humbletim/setup-vulkan-sdk@v1.2.0
24+
name: Build-Windows-x64-${{ inputs.configuration }}
25+
26+
- name: Download Vulkan Artifacts
27+
uses: actions/download-artifact@v4
2928
with:
30-
vulkan-query-version: 1.3.204.0
31-
vulkan-components: Vulkan-Headers, Vulkan-Loader
32-
vulkan-use-cache: true
33-
29+
path: vulkan-build
30+
name: Vulkan-build-x64-release
31+
3432
- name: Run Tests
35-
run: .\Scripts\RunTests.ps1 -Configurations ${{inputs.configuration}}
3633
shell: pwsh
34+
run: |
35+
$env:PATH = ".\vulkan-build\;$env:PATH"
36+
.\Scripts\RunTests.ps1 -Configurations ${{ inputs.configuration }}

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![ZEngine Window Build](https://github.com/JeanPhilippeKernel/RendererEngine/actions/workflows/window-build.yml/badge.svg)](https://github.com/JeanPhilippeKernel/RendererEngine/actions/workflows/window-build.yml) [![ZEngine Linux Build](https://github.com/JeanPhilippeKernel/RendererEngine/actions/workflows/linux-build.yml/badge.svg)](https://github.com/JeanPhilippeKernel/RendererEngine/actions/workflows/linux-build.yml) [![ZEngine macOS Build](https://github.com/JeanPhilippeKernel/RendererEngine/actions/workflows/macOS-build.yml/badge.svg)](https://github.com/JeanPhilippeKernel/RendererEngine/actions/workflows/macOS-build.yml)
1+
[![ZEngine Windows Build](https://github.com/JeanPhilippeKernel/RendererEngine/actions/workflows/windows-build.yml/badge.svg)](https://github.com/JeanPhilippeKernel/RendererEngine/actions/workflows/windows-build.yml) [![ZEngine Linux Build](https://github.com/JeanPhilippeKernel/RendererEngine/actions/workflows/linux-build.yml/badge.svg)](https://github.com/JeanPhilippeKernel/RendererEngine/actions/workflows/linux-build.yml) [![ZEngine macOS Build](https://github.com/JeanPhilippeKernel/RendererEngine/actions/workflows/macOS-build.yml/badge.svg)](https://github.com/JeanPhilippeKernel/RendererEngine/actions/workflows/macOS-build.yml)
22

33
[![Discord Server](https://discord.com/api/guilds/1249429728624906405/widget.png?style=banner2)](https://discord.gg/jC3GPVKKsW)
44

ZEngine/tests/CMakeLists.txt

+12-15
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
1-
cmake_minimum_required(VERSION 3.17)
2-
3-
project(ZEngineTests)
4-
5-
enable_testing()
6-
7-
include_directories(${gtest_SOURCE_DIR}/include ${gtest_SOURCE_DIR})
8-
include_directories(${PROJECT_SOURCE_DIR}/include)
9-
10-
file(GLOB TEST_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
1+
set (TEST_SOURCES
2+
bitmap_test.cpp
3+
IntrusivePtr_test.cpp
4+
IntrusiveWeakPtr_test.cpp
5+
MemoryOperation_test.cpp
6+
ThreadPool_test.cpp
7+
)
118

129
add_executable(ZEngineTests ${TEST_SOURCES})
1310

14-
target_link_libraries(ZEngineTests gtest gtest_main)
15-
16-
target_link_libraries(ZEngineTests zEngineLib)
17-
18-
add_test(NAME ZEngineUnitTests COMMAND ZEngineTests)
11+
target_link_libraries(ZEngineTests PRIVATE
12+
zEngineLib
13+
GTest::gtest
14+
GTest::gtest_main
15+
)

0 commit comments

Comments
 (0)