Skip to content

Commit 323d76b

Browse files
work on CI workflows
1 parent 02e97e7 commit 323d76b

4 files changed

Lines changed: 6 additions & 32 deletions

File tree

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

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,11 @@ jobs:
1616
- name: Checkout repository
1717
uses: actions/checkout@v4
1818

19-
- name: Setup Powershell Repository
20-
run: curl -O https://github.com/PowerShell/PowerShell/releases/download/v7.5.2/powershell_7.5.2-1.deb_amd64.deb && sudo dpkg -i powershell_7.5.2-1.deb_amd64.deb
21-
2219
- name: Install External Dependencies
2320
run: sudo apt-get update && sudo apt-get install -f -y git libasound2-dev libgl1-mesa-dev libpulse-dev libdbus-1-dev libx11-dev libxcursor-dev libxext-dev libxi-dev libxinerama-dev libxrandr-dev libxss-dev libxt-dev libxxf86vm-dev cmake gcc g++ ninja-build libassimp-dev libfmt-dev libimgui-dev libstb-dev libglfw3-dev libspdlog-dev libglm-dev libyaml-cpp-dev libspirv-cross-c-shared-dev spirv-cross spirv-tools glslang-dev glslang-tools nlohmann-json3-dev dotnet-runtime-8.0 libgtest-dev
2421

2522
- name: CMake Build
26-
run: .\Scripts\BuildEngine.ps1 -Configurations ${{ inputs.configuration }} -RunClangFormat 0
27-
shell: pwsh
23+
run: cmake --preset Linux_${{ inputs.configuration }} && cmake --build --preset Linux_${{ inputs.configuration }}
2824

2925
- name: Run Tests
30-
run: .\Scripts\RunTests.ps1 -Configurations ${{ inputs.configuration }}
31-
shell: pwsh
26+
run: cd ../builds/RendererEngine/ZEngine/tests && ./ZEngineTests

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
shell: pwsh
3232

3333
- name: Update access permission of ZEngineTests
34-
run: chmod +x ./Result.Darwin.x64.${{ inputs.configuration }}/ZEngine/tests/ZEngineTests
34+
run: chmod +x ../builds/ZEngine/tests/ZEngineTests
3535

3636
- name: Run Tests
3737
run: .\Scripts\RunTests.ps1 -Configurations ${{ inputs.configuration }}

Scripts/PostBuild.ps1

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,7 @@ $ErrorActionPreference = "Stop"
4343
$TargetFramework = 'net8.0'
4444

4545
[string]$RepoRoot = [IO.Path]::Combine($PSScriptRoot, "..")
46-
[string]$OuputBuildDirectory = If($IsWindows) {
47-
[IO.Path]::Combine($RepoRoot, "Result.Windows.x64.MultiConfig")
48-
} Else {
49-
[IO.Path]::Combine($RepoRoot, "Result.$SystemName.x64.$Configurations")
50-
}
46+
[string]$OuputBuildDirectory = [IO.Path]::Combine($RepoRoot, "../builds/RendererEngine")
5147

5248
if($LauncherOnly) {
5349
Write-Host "Skipping resources copy..."

Scripts/RunTests.ps1

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,7 @@ else {
4545
}
4646

4747
[string]$RepoRoot = [IO.Path]::Combine($PSScriptRoot, "..")
48-
[string]$OutputBuildDirectory = If ($IsWindows) {
49-
[IO.Path]::Combine($RepoRoot, "Result.Windows.x64.MultiConfig")
50-
}
51-
Else {
52-
[IO.Path]::Combine($RepoRoot, "Result.$SystemName.x64.$Configurations")
53-
}
48+
[string]$OutputBuildDirectory = [IO.Path]::Combine($RepoRoot, "../builds/RendererEngine")
5449

5550

5651
# Function to run tests
@@ -59,19 +54,7 @@ function RunTests {
5954
[string]$Configuration
6055
)
6156

62-
[string]$testExecutablePath = ""
63-
switch ($SystemName) {
64-
"Windows" {
65-
$testExecutablePath = [IO.Path]::Combine($OutputBuildDirectory, "ZEngine", "tests", $Configuration, "ZEngineTests.exe")
66-
}
67-
"Darwin" {
68-
$testExecutablePath = Join-Path $OutputBuildDirectory -ChildPath "ZEngine/tests/$Configuration/ZEngineTests"
69-
}
70-
"Linux" {}
71-
Default {
72-
throw 'This system is not supported'
73-
}
74-
}
57+
[string]$testExecutablePath = Join-Path $OutputBuildDirectory -ChildPath "ZEngine/tests/$Configuration/ZEngineTests"
7558

7659
# Check if the executable exists
7760
if (Test-Path $testExecutablePath) {

0 commit comments

Comments
 (0)