|
8 | 8 |
|
9 | 9 | jobs: |
10 | 10 | test-macos: |
| 11 | + if: false |
11 | 12 | runs-on: macos-latest |
12 | 13 | steps: |
13 | 14 | - uses: actions/checkout@v3 |
|
61 | 62 | run: cmake --build build --config Release |
62 | 63 |
|
63 | 64 | - name: Test |
64 | | - run: build/bin/Release/RobotCPPSDLTest.exe --gtest_filter=-*InteractiveMode --ci-mode true |
| 65 | + run: | |
| 66 | + # Check and display directory structure |
| 67 | + Write-Host "Checking directory structure..." |
| 68 | + |
| 69 | + # Check vcpkg directories |
| 70 | + Write-Host "Vcpkg directories:" |
| 71 | + Get-ChildItem -Path "vcpkg\installed\x64-windows\bin" -ErrorAction SilentlyContinue |
| 72 | + |
| 73 | + # Check build output directories |
| 74 | + Write-Host "Build output directories:" |
| 75 | + Get-ChildItem -Path "build\bin" -ErrorAction SilentlyContinue |
| 76 | + Get-ChildItem -Path "build\bin\Release" -ErrorAction SilentlyContinue |
| 77 | + |
| 78 | + # Find SDL2.dll |
| 79 | + Write-Host "Finding SDL2.dll..." |
| 80 | + Get-ChildItem -Path "vcpkg" -Recurse -Filter "SDL2.dll" -ErrorAction SilentlyContinue | |
| 81 | + ForEach-Object { Write-Host $_.FullName } |
| 82 | + |
| 83 | + # Create Release directory if it doesn't exist |
| 84 | + if (-not (Test-Path "build\bin\Release")) { |
| 85 | + Write-Host "Creating missing directory: build\bin\Release" |
| 86 | + New-Item -Path "build\bin\Release" -ItemType Directory -Force |
| 87 | + } |
| 88 | + |
| 89 | + # Try to find the executable |
| 90 | + Write-Host "Finding test executable..." |
| 91 | + Get-ChildItem -Path "build" -Recurse -Filter "*.exe" -ErrorAction SilentlyContinue | |
| 92 | + ForEach-Object { Write-Host $_.FullName } |
| 93 | + |
| 94 | + # Try to run the executable wherever it is |
| 95 | + $executable = Get-ChildItem -Path "build" -Recurse -Filter "RobotCPPSDLTest.exe" -ErrorAction SilentlyContinue | |
| 96 | + Select-Object -First 1 |
| 97 | + |
| 98 | + if ($executable) { |
| 99 | + Write-Host "Found executable at: $($executable.FullName)" |
| 100 | + |
| 101 | + # Try to find and copy SDL2.dll |
| 102 | + $sdl2Dll = Get-ChildItem -Path "vcpkg" -Recurse -Filter "SDL2.dll" -ErrorAction SilentlyContinue | |
| 103 | + Select-Object -First 1 |
| 104 | + |
| 105 | + if ($sdl2Dll) { |
| 106 | + Write-Host "Found SDL2.dll at: $($sdl2Dll.FullName)" |
| 107 | + Copy-Item -Path $sdl2Dll.FullName -Destination $executable.DirectoryName -Force |
| 108 | + } |
| 109 | + |
| 110 | + # Run the executable |
| 111 | + Write-Host "Running: $($executable.FullName) --gtest_filter=-*InteractiveMode --ci-mode true" |
| 112 | + & $executable.FullName --gtest_filter=-*InteractiveMode --ci-mode true |
| 113 | + } else { |
| 114 | + Write-Host "Executable not found!" |
| 115 | + exit 1 |
| 116 | + } |
0 commit comments