Skip to content

Commit eb1c3d8

Browse files
committed
fetchcontent move test
1 parent 56cc9e4 commit eb1c3d8

File tree

8 files changed

+12
-45
lines changed

8 files changed

+12
-45
lines changed

.github/workflows/Engine-CI.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
on:
22
push:
3-
branches: [ master, develop, arena-integration ]
3+
branches: [ master, develop, arena-integration, fetchcontentmovetest ]
44
pull_request:
55
branches: [ master, develop, arena-integration ]
66

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

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,15 @@ jobs:
1717
name: test-linux-${{ inputs.configuration }}
1818
runs-on: ubuntu-24.04
1919
steps:
20-
- name: Checkout repository
21-
uses: actions/checkout@v4
22-
2320
- name: Download Artifacts
2421
uses: actions/download-artifact@v4
2522
with:
2623
name: Build-linux-${{ inputs.configuration }}
27-
path: Result.Linux.x64.${{ inputs.configuration }}
2824

2925
- name: Update access permission of ZEngineTests
30-
run: chmod +x ./Result.Linux.x64.${{ inputs.configuration }}/tests/ZEngineTests
26+
run: chmod +x ${{github.workspace}}/tests/ZEngineTests
3127

3228
- name: Run Tests
3329
env:
3430
LD_LIBRARY_PATH: ${{github.workspace}}/lib
35-
run: .\Scripts\RunTests.ps1 -Configurations ${{ inputs.configuration }}
36-
shell: pwsh
31+
run: ${{github.workspace}}/tests/ZEngineTests

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

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,15 @@ jobs:
1717
name: test-macOS-${{ inputs.architecture }}-${{ inputs.configuration }}
1818
runs-on: ${{ inputs.architecture == 'x64' && 'macos-15-intel' || 'macos-latest' }}
1919
steps:
20-
- name: Checkout repository
21-
uses: actions/checkout@v4
22-
2320
- name: Download Artifacts
2421
uses: actions/download-artifact@v4
2522
with:
2623
name: Build-macOS-${{ inputs.architecture }}-${{ inputs.configuration }}
27-
path: Result.Darwin.${{inputs.architecture}}.${{ inputs.configuration }}
2824

2925
- name: Update access permission of ZEngineTests
30-
run: chmod +x ./Result.Darwin.${{inputs.architecture}}.${{ inputs.configuration }}/tests/ZEngineTests
26+
run: chmod +x ${{github.workspace}}/tests/ZEngineTests
3127

3228
- name: Run Tests
3329
env:
3430
DYLD_LIBRARY_PATH: ${{github.workspace}}/lib
35-
run: .\Scripts\RunTests.ps1 -Configurations ${{ inputs.configuration }}
36-
shell: pwsh
31+
run: ${{github.workspace}}/tests/ZEngineTests

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,13 @@ jobs:
1414
name: test-windows-${{ inputs.configuration }}
1515
runs-on: windows-2022
1616
steps:
17-
- name: Checkout repository
18-
uses: actions/checkout@v4
19-
2017
- name: Download All Artifacts
2118
uses: actions/download-artifact@v4
2219
with:
23-
path: Result.Windows.x64.MultiConfig
2420
name: Build-Windows-x64-${{ inputs.configuration }}
2521

2622
- name: Run Tests
2723
shell: pwsh
28-
run: .\Scripts\RunTests.ps1 -Configurations ${{ inputs.configuration }}
24+
env:
25+
PATH: ${{github.workspace}}\lib
26+
run: ${{github.workspace}}\tests\ZEngineTests.exe

.github/workflows/windows-build.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,13 @@ jobs:
1919

2020
test:
2121
needs: cmake-build
22-
strategy:
23-
matrix:
24-
testConfiguration: [Debug, Release]
2522
uses: ./.github/workflows/job-test-windows.yml
2623
with:
27-
configuration: ${{matrix.testConfiguration}}
24+
configuration: Release
2825

2926
deploy:
3027
needs: test
3128
uses: ./.github/workflows/job-deploy-windows.yml
3229
with:
3330
configuration: Release
34-
targetFramework: ${{inputs.targetFramework}}
31+
targetFramework: ${{inputs.targetFramework}}

CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ endif()
3636

3737
list( APPEND CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib )
3838

39-
include(CTest)
40-
include(GoogleTest)
41-
4239
# Externals dependencies
4340
#
4441
if (NOT LAUNCHER_ONLY)

Scripts/RunTests.ps1

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -63,21 +63,8 @@ function RunTests {
6363
[string]$Configuration
6464
)
6565

66-
[string]$testExecutablePath = ""
67-
switch ($SystemName) {
68-
"Windows" {
69-
$testExecutablePath = Join-Path $OutputBuildDirectory -ChildPath "tests/ZEngineTests.exe")
70-
}
71-
"Darwin" {
72-
$testExecutablePath = Join-Path $OutputBuildDirectory -ChildPath "tests/ZEngineTests"
73-
}
74-
"Linux" {
75-
$testExecutablePath = Join-Path $OutputBuildDirectory -ChildPath "tests/ZEngineTests"
76-
}
77-
Default {
78-
throw 'This system is not supported'
79-
}
80-
}
66+
[string] $testExecutablePath = Join-Path $OutputBuildDirectory -ChildPath "tests/ZEngineTests")
67+
8168

8269
# Check if the executable exists
8370
if (Test-Path $testExecutablePath) {

ZEngine/tests/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,3 @@ set_target_properties(ZEngineTests PROPERTIES INSTALL_RPATH ${CMAKE_INSTALL_PREF
1717

1818
install(TARGETS ZEngineTests
1919
RUNTIME DESTINATION tests)
20-
21-
gtest_discover_tests(ZEngineTests DISCOCERY_MODE PRE_TEST)

0 commit comments

Comments
 (0)