2121 fail-fast : false
2222 matrix :
2323 os : [ubuntu-latest, windows-latest, macos-latest]
24-
24+ include :
25+ - os : ubuntu-latest
26+ bin_path : |
27+ build/proxpl
28+ build/prm
29+ - os : macos-latest
30+ bin_path : |
31+ build/proxpl
32+ build/prm
33+ - os : windows-latest
34+ bin_path : build/ProXPL_Installer_*.exe
35+
2536 steps :
2637 - name : Checkout source
2738 uses : actions/checkout@v4
@@ -42,55 +53,18 @@ jobs:
4253 if : matrix.os == 'windows-latest'
4354 shell : pwsh
4455 run : |
45- # 1. Install LLVM via Chocolatey (Pinned to stable version)
4656 choco install llvm --version 17.0.6 -y --force
47-
48- # 2. Define standard paths
4957 $llvmRoot = "C:\Program Files\LLVM"
50- if (-not (Test-Path $llvmRoot)) {
51- $llvmRoot = "C:\Program Files (x86)\LLVM"
52- }
58+ if (-not (Test-Path $llvmRoot)) { $llvmRoot = "C:\Program Files (x86)\LLVM" }
5359
54- # 3. Find LLVMConfig.cmake
5560 $llvmDir = ""
56- $candidates = @(
57- "$llvmRoot\lib\cmake\llvm",
58- "$llvmRoot\share\llvm\cmake",
59- "$llvmRoot\lib\llvm\cmake",
60- "$llvmRoot\cmake"
61- )
62-
61+ $candidates = @("$llvmRoot\lib\cmake\llvm", "$llvmRoot\share\llvm\cmake", "$llvmRoot\lib\llvm\cmake", "$llvmRoot\cmake")
6362 foreach ($c in $candidates) {
64- if (Test-Path "$c") {
65- # If the directory exists, check for config file OR accept the dir if it looks like a cmake dir
66- if ((Test-Path "$c\LLVMConfig.cmake") -or (Test-Path "$c\LLVMConfigExtensions.cmake")) {
67- $llvmDir = $c
68- break
69- }
70- }
63+ if (Test-Path "$c\LLVMConfig.cmake") { $llvmDir = $c; break }
7164 }
7265
73- # 4. Fallback search (more depth)
74- if (-not $llvmDir -and (Test-Path $llvmRoot)) {
75- Write-Host "Performing deep search in $llvmRoot..."
76- # Try to find the directory containing LLVMConfig.cmake
77- $found = Get-ChildItem -Path $llvmRoot -Filter "LLVMConfig.cmake" -Recurse -Depth 8 -ErrorAction SilentlyContinue | Select-Object -First 1
78- if ($found) {
79- $llvmDir = $found.Directory.FullName
80- } else {
81- # Fallback: look for LLVMConfigExtensions.cmake which we saw exists
82- $foundExt = Get-ChildItem -Path $llvmRoot -Filter "LLVMConfigExtensions.cmake" -Recurse -Depth 8 -ErrorAction SilentlyContinue | Select-Object -First 1
83- if ($foundExt) {
84- $llvmDir = $foundExt.Directory.FullName
85- Write-Host "Found likely LLVM CMake dir via Extensions: $llvmDir"
86- }
87- }
88- }
89-
90- # 5. HARDCODED FALLBACK: We know it exists here on the runner!
9166 if (-not $llvmDir -and (Test-Path "C:\Program Files\LLVM\lib\cmake\llvm")) {
9267 $llvmDir = "C:\Program Files\LLVM\lib\cmake\llvm"
93- Write-Host "Forcing LLVM_DIR to known path: $llvmDir"
9468 }
9569
9670 if ($llvmDir) {
9973 Add-Content $env:GITHUB_PATH "$llvmRoot/bin"
10074 Add-Content $env:GITHUB_ENV "LLVM_DIR=$llvmDir"
10175 Add-Content $env:GITHUB_ENV "LLVM_ROOT=$llvmRoot"
102- Write-Host "SUCCESS: LLVM_DIR=$llvmDir"
103- Write-Host "SUCCESS: LLVM_ROOT=$llvmRoot"
10476 } else {
105- Write-Warning "LLVM not found on Windows after installation. Debug info follows:"
106- if (Test-Path $llvmRoot) {
107- Write-Host "Listing $llvmRoot recursively (depth 5) for debugging:"
108- Get-ChildItem -Path $llvmRoot -Recurse -Depth 5 | Select-Object FullName
109- } else {
110- Write-Host "PATH $llvmRoot DOES NOT EXIST"
111- Write-Host "Listing C:\Program Files recursively (Depth 2) to find where LLVM is:"
112- Get-ChildItem -Path "C:\Program Files" -Recurse -Depth 2 | Select-Object FullName
113- }
11477 exit 1
11578 }
11679
@@ -135,6 +98,40 @@ jobs:
13598 -DCMAKE_PREFIX_PATH="$env:LLVM_ROOT"
13699
137100 - name : Build
101+ shell : bash
102+ run : cmake --build build --config Release --verbose
138103
104+ - name : Run Benchmarks
139105 shell : bash
140- run : cmake --build build --verbose
106+ run : |
107+ if [ "${{ matrix.os }}" == "windows-latest" ]; then
108+ EXE_PATH="build/Release/proxpl.exe"
109+ else
110+ EXE_PATH="build/proxpl"
111+ fi
112+
113+ echo "Running benchmarks with $EXE_PATH"
114+ python benchmarks/run_benchmarks.py --executable "$EXE_PATH"
115+
116+ - name : Build Installer (Windows)
117+ if : matrix.os == 'windows-latest'
118+ shell : pwsh
119+ run : |
120+ choco install innosetup -y
121+ New-Item -ItemType Directory -Force -Path bin
122+ Copy-Item "build/Release/proxpl.exe" -Destination "bin/"
123+ Copy-Item "build/Release/prm.exe" -Destination "bin/"
124+ if (Test-Path "build/Release/proxpl_lib.dll") {
125+ Copy-Item "build/Release/proxpl_lib.dll" -Destination "bin/"
126+ }
127+ iscc setup.iss
128+
129+ - name : Upload Artifact
130+ uses : actions/upload-artifact@v4
131+ with :
132+ name : ProXPL-${{ matrix.os }}
133+ # UPDATED: This will now upload the .exe and the .dll for Windows
134+ # For Linux/Mac, it still uploads the single binary.
135+ path : |
136+ ${{ matrix.bin_path }}
137+ benchmarks/
0 commit comments