Skip to content

Commit ace0193

Browse files
committed
Merge origin/main: Keep local master version for conflicts
2 parents 7f7393c + 1b5ba31 commit ace0193

646 files changed

Lines changed: 1164577 additions & 2029 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 50 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,18 @@ jobs:
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) {
@@ -99,18 +73,7 @@ jobs:
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/

.github/workflows/release.yml

Lines changed: 67 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,46 @@ jobs:
4848
4949
- name: Install LLVM (Windows)
5050
if: matrix.os == 'windows-latest'
51+
shell: pwsh
5152
run: |
52-
choco install llvm -y
53-
echo "C:/Program Files/LLVM/bin" >> $GITHUB_PATH
54-
echo "LLVM_DIR=C:/Program Files/LLVM/lib/cmake/llvm" >> $GITHUB_ENV
55-
echo "LLVM_ROOT=C:/Program Files/LLVM" >> $GITHUB_ENV
53+
choco install llvm --version 17.0.6 -y --force
54+
$llvmRoot = "C:\Program Files\LLVM"
55+
if (-not (Test-Path $llvmRoot)) { $llvmRoot = "C:\Program Files (x86)\LLVM" }
56+
57+
$llvmDir = ""
58+
$candidates = @("$llvmRoot\lib\cmake\llvm", "$llvmRoot\share\llvm\cmake", "$llvmRoot\lib\llvm\cmake", "$llvmRoot\cmake")
59+
foreach ($c in $candidates) {
60+
if (Test-Path "$c\LLVMConfig.cmake") { $llvmDir = $c; break }
61+
}
62+
63+
if (-not $llvmDir -and (Test-Path "C:\Program Files\LLVM\lib\cmake\llvm")) {
64+
$llvmDir = "C:\Program Files\LLVM\lib\cmake\llvm"
65+
}
66+
67+
if ($llvmDir) {
68+
$llvmDir = $llvmDir -replace "\\", "/"
69+
$llvmRoot = $llvmRoot -replace "\\", "/"
70+
Add-Content $env:GITHUB_PATH "$llvmRoot/bin"
71+
Add-Content $env:GITHUB_ENV "LLVM_DIR=$llvmDir"
72+
Add-Content $env:GITHUB_ENV "LLVM_ROOT=$llvmRoot"
73+
} else {
74+
exit 1
75+
}
5676
57-
- name: Configure CMake
77+
- name: Configure (Unix)
78+
if: matrix.os != 'windows-latest'
5879
shell: bash
5980
run: |
60-
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release \
61-
-DCMAKE_PREFIX_PATH="C:/Program Files/LLVM" \
62-
-DLLVM_DIR="C:/Program Files/LLVM/lib/cmake/llvm"
81+
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
82+
83+
- name: Configure (Windows)
84+
if: matrix.os == 'windows-latest'
85+
shell: pwsh
86+
run: |
87+
cmake -S . -B build `
88+
-DCMAKE_BUILD_TYPE=Release `
89+
-DLLVM_DIR="$env:LLVM_DIR" `
90+
-DCMAKE_PREFIX_PATH="$env:LLVM_ROOT"
6391
6492
- name: Build
6593
shell: bash
@@ -77,16 +105,36 @@ jobs:
77105
exit 1
78106
fi
79107
108+
- name: Build Installer (Windows)
109+
if: matrix.os == 'windows-latest'
110+
shell: pwsh
111+
run: |
112+
choco install innosetup -y
113+
New-Item -ItemType Directory -Force -Path bin
114+
Copy-Item "build/Release/proxpl.exe" -Destination "bin/"
115+
Copy-Item "build/Release/prm.exe" -Destination "bin/"
116+
if (Test-Path "build/Release/proxpl_lib.dll") {
117+
Copy-Item "build/Release/proxpl_lib.dll" -Destination "bin/"
118+
}
119+
ISCC setup.iss
120+
Get-ChildItem -Path build
121+
80122
- name: Rename Binary
81123
shell: bash
82124
run: |
83-
mv "${{ matrix.binary_path }}" ${{ matrix.asset_name }}
125+
if [ "${{ matrix.os }}" == "windows-latest" ]; then
126+
cp "${{ matrix.binary_path }}" ${{ matrix.asset_name }}
127+
else
128+
mv "${{ matrix.binary_path }}" ${{ matrix.asset_name }}
129+
fi
84130
85131
- name: Upload Artifact
86132
uses: actions/upload-artifact@v4
87133
with:
88134
name: ${{ matrix.asset_name }}
89-
path: ${{ matrix.asset_name }}
135+
path: |
136+
${{ matrix.asset_name }}
137+
build/ProXPL_Installer_*.exe
90138
91139
release:
92140
name: Create Release
@@ -97,6 +145,14 @@ jobs:
97145
uses: actions/download-artifact@v4
98146
with:
99147
name: proxpl-windows.exe
148+
149+
- name: Download Windows Installer
150+
uses: actions/download-artifact@v4
151+
with:
152+
name: proxpl-windows.exe
153+
path: .
154+
pattern: ProXPL_Installer_*.exe
155+
merge-multiple: true
100156

101157
- name: Download Linux Artifact
102158
uses: actions/download-artifact@v4
@@ -113,6 +169,7 @@ jobs:
113169
with:
114170
files: |
115171
proxpl-windows.exe
172+
ProXPL_Installer_*.exe
116173
proxpl-linux
117174
proxpl-macos
118175
generate_release_notes: true

.internal_ignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Ignore internal builds

0 commit comments

Comments
 (0)