Skip to content

test: add ProXPL v0.9.0 stdlib feature verification script for gc, ti… #9

test: add ProXPL v0.9.0 stdlib feature verification script for gc, ti…

test: add ProXPL v0.9.0 stdlib feature verification script for gc, ti… #9

Workflow file for this run

name: ProXPL Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
build-and-package:
name: Build on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
include:
- os: ubuntu-latest
artifact_name: proxpl-linux
binary_path: build/proxpl
asset_name: proxpl-linux
- os: windows-latest
artifact_name: proxpl-windows
binary_path: build\Release\proxpl.exe
asset_name: proxpl-windows.exe
- os: macos-latest
artifact_name: proxpl-macos
binary_path: build/proxpl
asset_name: proxpl-macos
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Install LLVM (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y llvm-dev libclang-dev clang
- name: Install LLVM (macOS)
if: matrix.os == 'macos-latest'
run: |
brew install llvm
echo "CMAKE_PREFIX_PATH=$(brew --prefix llvm)" >> $GITHUB_ENV
- name: Install LLVM (Windows)
if: matrix.os == 'windows-latest'
shell: pwsh
run: |
choco install llvm --version 17.0.6 -y --force
$llvmRoot = "C:\Program Files\LLVM"
if (-not (Test-Path $llvmRoot)) { $llvmRoot = "C:\Program Files (x86)\LLVM" }
$llvmDir = ""
$candidates = @("$llvmRoot\lib\cmake\llvm", "$llvmRoot\share\llvm\cmake", "$llvmRoot\lib\llvm\cmake", "$llvmRoot\cmake")
foreach ($c in $candidates) {
if (Test-Path "$c\LLVMConfig.cmake") { $llvmDir = $c; break }
}
if (-not $llvmDir -and (Test-Path "C:\Program Files\LLVM\lib\cmake\llvm")) {
$llvmDir = "C:\Program Files\LLVM\lib\cmake\llvm"
}
if ($llvmDir) {
$llvmDir = $llvmDir -replace "\\", "/"
$llvmRoot = $llvmRoot -replace "\\", "/"
Add-Content $env:GITHUB_PATH "$llvmRoot/bin"
Add-Content $env:GITHUB_ENV "LLVM_DIR=$llvmDir"
Add-Content $env:GITHUB_ENV "LLVM_ROOT=$llvmRoot"
} else {
exit 1
}
- name: Configure (Unix)
if: matrix.os != 'windows-latest'
shell: bash
run: |
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
- name: Configure (Windows)
if: matrix.os == 'windows-latest'
shell: pwsh
run: |
cmake -S . -B build `
-DCMAKE_BUILD_TYPE=Release `
-DLLVM_DIR="$env:LLVM_DIR" `
-DCMAKE_PREFIX_PATH="$env:LLVM_ROOT"
- name: Build
shell: bash
run: cmake --build build --config Release --verbose
- name: Verify Build (Check Binary Exists)
shell: bash
run: |
if [ -f "${{ matrix.binary_path }}" ]; then
echo "Binary found at ${{ matrix.binary_path }}"
else
echo "Binary NOT found at ${{ matrix.binary_path }}"
# List directory for debugging
ls -R build
exit 1
fi
- name: Build Installer (Windows)
if: matrix.os == 'windows-latest'
shell: pwsh
run: |
choco install innosetup -y
New-Item -ItemType Directory -Force -Path bin
Copy-Item "build/Release/proxpl.exe" -Destination "bin/"
Copy-Item "build/Release/prm.exe" -Destination "bin/"
if (Test-Path "build/Release/proxpl_lib.dll") {
Copy-Item "build/Release/proxpl_lib.dll" -Destination "bin/"
}
ISCC setup.iss
Get-ChildItem -Path build
- name: Rename Binary
shell: bash
run: |
if [ "${{ matrix.os }}" == "windows-latest" ]; then
cp "${{ matrix.binary_path }}" ${{ matrix.asset_name }}
else
mv "${{ matrix.binary_path }}" ${{ matrix.asset_name }}
fi
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.asset_name }}
path: |
${{ matrix.asset_name }}
build/ProXPL_Installer_*.exe
release:
name: Create Release
needs: build-and-package
runs-on: ubuntu-latest
steps:
- name: Download Windows Artifact
uses: actions/download-artifact@v4
with:
name: proxpl-windows.exe
- name: Download Windows Installer
uses: actions/download-artifact@v4
with:
name: proxpl-windows.exe
path: .
pattern: ProXPL_Installer_*.exe
merge-multiple: true
- name: Download Linux Artifact
uses: actions/download-artifact@v4
with:
name: proxpl-linux
- name: Download macOS Artifact
uses: actions/download-artifact@v4
with:
name: proxpl-macos
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: |
proxpl-windows.exe
ProXPL_Installer_*.exe
proxpl-linux
proxpl-macos
generate_release_notes: true
draft: false
prerelease: false