Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/build-linux-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ jobs:
githubToken: ${{ github.token }}
install: |
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y \
git curl zip unzip cmake build-essential pkg-config \
p7zip-full \
libgtk-3-dev libnss3-dev libgdk-pixbuf2.0-dev libxtst-dev libxss-dev libdbus-glib-1-dev
DEBIAN_FRONTEND=noninteractive apt-get install -y \
git curl zip unzip cmake build-essential pkg-config \
p7zip-full \
libgtk-3-dev libnss3-dev libgdk-pixbuf2.0-dev libxtst-dev libxss-dev libdbus-glib-1-dev libcurl4-openssl-dev
run: |
set -euo pipefail
cd "$GITHUB_WORKSPACE"
Expand Down Expand Up @@ -133,7 +133,7 @@ jobs:
fi
echo "Found SDK at: $ROOT"; ls -la "$ROOT/lib" || true
echo "== ARM64: Configure & Build =="
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DULTRALIGHT_SDK_ROOT="$ROOT" -DBUILD_TESTING=OFF -DWEBBROWSER_VERSION="$WEBBROWSER_VERSION"
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DULTRALIGHT_SDK_ROOT="$ROOT" -DBUILD_TESTING=OFF -DAUTO_INSTALL_CURL=ON -DWEBBROWSER_VERSION="$WEBBROWSER_VERSION"
cmake --build build --parallel
echo "== ARM64: Package (TGZ) =="
cpack --config build/CPackConfig.cmake -C Release -G TGZ -D CPACK_OUTPUT_FILE_PREFIX="$GITHUB_WORKSPACE/build"
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -240,14 +240,20 @@ jobs:
- name: 5. Install Linux Dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libnss3-dev libgdk-pixbuf2.0-dev libxtst-dev libxss-dev libdbus-glib-1-dev
sudo apt-get install -y libgtk-3-dev libnss3-dev libgdk-pixbuf2.0-dev libxtst-dev libxss-dev libdbus-glib-1-dev libcurl4-openssl-dev

- name: 5.5 AUTO_INSTALL_CURL (helper script)
run: |
echo "AUTO_INSTALL_CURL: invoke helper script if necessary"
chmod +x ./scripts/install_curl.sh || true
./scripts/install_curl.sh || true

- name: 6. Configure CMake
if: steps.prep_sdk.outputs.present == 'true'
run: |
cmake --version
echo "Configuring with ULTRALIGHT_SDK_ROOT=$ULTRALIGHT_SDK_ROOT"
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DULTRALIGHT_SDK_ROOT="$ULTRALIGHT_SDK_ROOT" -DBUILD_TESTING=ON -DWEBBROWSER_VERSION="$WEBBROWSER_VERSION"
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DULTRALIGHT_SDK_ROOT="$ULTRALIGHT_SDK_ROOT" -DBUILD_TESTING=ON -DAUTO_INSTALL_CURL=ON -DWEBBROWSER_VERSION="$WEBBROWSER_VERSION"

- name: 7. Build Project
if: steps.prep_sdk.outputs.present == 'true'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-macos-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ jobs:
run: |
cmake --version
echo "Configuring with ULTRALIGHT_SDK_ROOT=$ULTRALIGHT_SDK_ROOT"
cmake -S . -B build -DULTRALIGHT_SDK_ROOT="$ULTRALIGHT_SDK_ROOT" -DBUILD_TESTING=ON -DWEBBROWSER_VERSION="$WEBBROWSER_VERSION"
cmake -S . -B build -DULTRALIGHT_SDK_ROOT="$ULTRALIGHT_SDK_ROOT" -DBUILD_TESTING=ON -DAUTO_INSTALL_CURL=ON -DWEBBROWSER_VERSION="$WEBBROWSER_VERSION"

- name: 6. Build Project (Release)
if: steps.prep_sdk.outputs.present == 'true'
Expand Down
17 changes: 16 additions & 1 deletion .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,21 @@ jobs:
run: |
brew update
brew install 7zip || brew install p7zip
- name: 3.5 Install libcurl (macOS)
run: |
# Install curl via Homebrew; headers/libraries will be exposed to CMake's FindCURL
brew update
brew install curl || true
# Optionally, link curl (macOS brew keeps headers in non-standard path)
if brew --prefix curl >/dev/null; then
echo "CURL_PREFIX=$(brew --prefix curl)" >> $GITHUB_ENV
fi

- name: 3.6 AUTO_INSTALL_CURL (helper script)
run: |
echo "AUTO_INSTALL_CURL: try helper script (wrapping brew)"
chmod +x ./scripts/install_curl.sh || true
./scripts/install_curl.sh || true
(7z -version || 7zz -version) 2>/dev/null || true

- name: 4. Prepare Ultralight SDK (macOS)
Expand Down Expand Up @@ -299,7 +314,7 @@ jobs:
run: |
cmake --version
echo "Configuring with ULTRALIGHT_SDK_ROOT=$ULTRALIGHT_SDK_ROOT"
cmake -S . -B build -DULTRALIGHT_SDK_ROOT="$ULTRALIGHT_SDK_ROOT" -DBUILD_TESTING=ON -DWEBBROWSER_VERSION="$WEBBROWSER_VERSION"
cmake -S . -B build -DULTRALIGHT_SDK_ROOT="$ULTRALIGHT_SDK_ROOT" -DBUILD_TESTING=ON -DAUTO_INSTALL_CURL=ON -DWEBBROWSER_VERSION="$WEBBROWSER_VERSION"

- name: 6. Build Project (Release)
if: steps.prep_sdk.outputs.present == 'true'
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
# This uses a multi-config generator, so the --config flag
# is used during the build step.

name: Build - Windows

Check warning on line 7 in .github/workflows/build-windows.yml

View workflow job for this annotation

GitHub Actions / windows / Validate workflow YAML

7:1 [document-start] missing document start "---"

# Require minimum permissions for artifact upload on PRs/forks and allow workflow cancellation

Check failure on line 9 in .github/workflows/build-windows.yml

View workflow job for this annotation

GitHub Actions / windows / Validate workflow YAML

9:81 [line-length] line too long (94 > 80 characters)
permissions:
contents: read
actions: write
Expand All @@ -16,7 +16,7 @@
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:

Check warning on line 19 in .github/workflows/build-windows.yml

View workflow job for this annotation

GitHub Actions / windows / Validate workflow YAML

19:1 [truthy] truthy value should be one of [false, true]
workflow_dispatch:
inputs:
sdk_url:
Expand All @@ -36,7 +36,7 @@
required: false
type: boolean
development_build:
description: "Development build (keeps intermediate packages, verbose logs)"

Check failure on line 39 in .github/workflows/build-windows.yml

View workflow job for this annotation

GitHub Actions / windows / Validate workflow YAML

39:81 [line-length] line too long (84 > 80 characters)
required: false
type: boolean
default: false
Expand All @@ -60,7 +60,7 @@
type: boolean
default: false
development_build:
description: "Development build (keeps intermediate packages, verbose logs)"

Check failure on line 63 in .github/workflows/build-windows.yml

View workflow job for this annotation

GitHub Actions / windows / Validate workflow YAML

63:81 [line-length] line too long (84 > 80 characters)
required: false
type: boolean
default: false
Expand Down Expand Up @@ -89,16 +89,16 @@

- name: Sanity-parse with PyYAML
run: |
python -c "import yaml,sys; yaml.safe_load(open('.github/workflows/build-windows.yml','r',encoding='utf-8')); print('PyYAML: parse OK')"

Check failure on line 92 in .github/workflows/build-windows.yml

View workflow job for this annotation

GitHub Actions / windows / Validate workflow YAML

92:81 [line-length] line too long (146 > 80 characters)

build:
runs-on: windows-latest
env:
ULTRALIGHT_SDK_URL: ${{ inputs.sdk_url || github.event.inputs.sdk_url }}
ULTRALIGHT_VERSION: ${{ inputs.version || github.event.inputs.version }}
WEBBROWSER_VERSION: ${{ inputs.webbrowser_version || github.event.inputs.webbrowser_version || 'dev' }}

Check failure on line 99 in .github/workflows/build-windows.yml

View workflow job for this annotation

GitHub Actions / windows / Validate workflow YAML

99:81 [line-length] line too long (109 > 80 characters)
CREATE_INSTALLER: ${{ inputs.create_installer || github.event.inputs.create_installer }}

Check failure on line 100 in .github/workflows/build-windows.yml

View workflow job for this annotation

GitHub Actions / windows / Validate workflow YAML

100:81 [line-length] line too long (94 > 80 characters)
DEVELOPMENT_BUILD: ${{ inputs.development_build || github.event.inputs.development_build || 'false' }}

Check failure on line 101 in .github/workflows/build-windows.yml

View workflow job for this annotation

GitHub Actions / windows / Validate workflow YAML

101:81 [line-length] line too long (108 > 80 characters)

steps:
- name: "0. Configure Git (longpaths, autocrlf=false)"
Expand All @@ -117,11 +117,11 @@
shell: pwsh
run: |
if ($env:ULTRALIGHT_SDK_URL) {
Write-Host "ULTRALIGHT_SDK_URL already provided: $env:ULTRALIGHT_SDK_URL"

Check failure on line 120 in .github/workflows/build-windows.yml

View workflow job for this annotation

GitHub Actions / windows / Validate workflow YAML

120:81 [line-length] line too long (85 > 80 characters)
exit 0
}
# First attempt: Use GitHub API to list sdks branch and pick latest Windows SDK (x64)

Check failure on line 123 in .github/workflows/build-windows.yml

View workflow job for this annotation

GitHub Actions / windows / Validate workflow YAML

123:81 [line-length] line too long (95 > 80 characters)
$api = "https://api.github.com/repos/${{ github.repository }}/contents/sdks?ref=base-sdk"

Check failure on line 124 in .github/workflows/build-windows.yml

View workflow job for this annotation

GitHub Actions / windows / Validate workflow YAML

124:81 [line-length] line too long (99 > 80 characters)
$headers = @{ Authorization = "Bearer $env:GITHUB_TOKEN"; Accept = "application/vnd.github+json" }
Write-Host "Querying GitHub API for SDK files: $api"
try { $resp = Invoke-RestMethod -Uri $api -Headers $headers -Method Get -UseBasicParsing } catch { $resp = $null }
Expand Down Expand Up @@ -268,16 +268,26 @@
Write-Error "Ultralight Windows SDK not found. Ensure base-sdk branch contains a valid archive or set ULTRALIGHT_SDK_ROOT/ULTRALIGHT_SDK_URL."; exit 1
}

- name: "4.5 Install libcurl (vcpkg/choco)"
shell: pwsh
run: |
Write-Host "Attempting to install libcurl for build via vcpkg / chocolatey..."
pwsh -File "${{ github.workspace }}\scripts\install_curl.ps1"

- name: "5. Configure CMake"
if: steps.prep_sdk.outputs.present == 'true'
run: |
# Ensure libcurl is present; if our earlier step installed vcpkg and curl, the toolchain file should be used.
Write-Host "(CI) libcurl install attempt finished (if available)."
cmake --version
Write-Host "Configuring with ULTRALIGHT_SDK_ROOT=$env:ULTRALIGHT_SDK_ROOT"
$createInstaller = "$env:CREATE_INSTALLER"
if ($createInstaller -eq '' -or $null -eq $createInstaller) { $createInstaller = 'false' }
$installerFlag = if ($createInstaller -match '^(true|1|on)$') { 'ON' } else { 'OFF' }
Write-Host "CREATE_INSTALLER=$createInstaller -> -DCREATE_INSTALLER=$installerFlag"
cmake -S . -B build -DULTRALIGHT_SDK_ROOT="${{ env.ULTRALIGHT_SDK_ROOT }}" -DBUILD_TESTING=ON -DCREATE_INSTALLER=$installerFlag -DWEBBROWSER_VERSION="$env:WEBBROWSER_VERSION"
# If vcpkg was installed via install_curl.ps1 in prior step, pass toolchain file
$vcpkgToolchain = if ($env:VCPKG_ROOT) { "-DCMAKE_TOOLCHAIN_FILE=$env:VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake" } else { "" }
cmake -S . -B build -DULTRALIGHT_SDK_ROOT="${{ env.ULTRIGHT_SDK_ROOT }}" -DBUILD_TESTING=ON -DAUTO_INSTALL_CURL=ON -DCREATE_INSTALLER=$installerFlag -DWEBBROWSER_VERSION="$env:WEBBROWSER_VERSION" $vcpkgToolchain

- name: "6. Build Project"
# We specify the 'Release' config at build time
Expand Down
51 changes: 51 additions & 0 deletions scripts/install_curl.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
param(
[switch]$Force
)

Write-Host "PowerShell: Attempting to install libcurl or vcpkg curl for development (Windows)..."

function Install-VcpkgAndCurl {
$tempRoot = $env:RUNNER_TEMP
if (-not $tempRoot) { $tempRoot = $env:TEMP }
if (-not $tempRoot) { $tempRoot = $env:USERPROFILE }
if (-not $tempRoot) { $tempRoot = "C:\vcpkg_temp" }
$vcpkg = Join-Path $tempRoot 'vcpkg'
if (-not (Test-Path $vcpkg)) {
Write-Host "Cloning vcpkg to $vcpkg"
git clone https://github.com/microsoft/vcpkg.git $vcpkg
}
Push-Location $vcpkg
if (-not (Test-Path ./vcpkg.exe)) {
& .\bootstrap-vcpkg.bat
}
# Install curl for x64
& .\vcpkg.exe install curl:x64-windows
$env:VCPKG_ROOT = $vcpkg
# Persist VCPKG_ROOT to GitHub Actions environment file if present
if ($env:GITHUB_ENV) { "VCPKG_ROOT=$vcpkg" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append }
Pop-Location
return $true
}

try {
Write-Host "Attempting vcpkg install for curl (preferred)", 'VCPKG_ROOT=' + $vcpkg
try {
Install-VcpkgAndCurl
$installed = $true
} catch {
Write-Warning "vcpkg install failed: $_"
$installed = $false
}
if (-not $installed) {
if (Get-Command choco -ErrorAction SilentlyContinue) {
Write-Host "Chocolatey present; attempting to install curl client via choco as fallback..."
choco install curl -y --no-progress
$installed = $true
}
}
Write-Host "Install script finished. If build does not detect curl, consider enabling vcpkg toolchain for CMake by setting -DCMAKE_TOOLCHAIN_FILE=$env:VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake"
exit 0
} catch {
Write-Error "Failed to install libcurl: $_"
exit 1
}
28 changes: 28 additions & 0 deletions scripts/install_curl.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env bash
set -euo pipefail

echo "Detecting package manager and installing libcurl development package..."
if command -v apt-get >/dev/null 2>&1; then
echo "APT detected. Installing libcurl4-openssl-dev (Debian/Ubuntu)..."
sudo apt-get update
sudo apt-get install -y libcurl4-openssl-dev
exit 0
fi
if command -v dnf >/dev/null 2>&1; then
echo "DNF detected. Installing libcurl-devel (Fedora/RHEL)..."
sudo dnf install -y libcurl-devel
exit 0
fi
if command -v pacman >/dev/null 2>&1; then
echo "pacman detected. Installing libcurl (Arch Linux)..."
sudo pacman -Sy --noconfirm curl
exit 0
fi
if command -v brew >/dev/null 2>&1; then
echo "Homebrew detected. Installing curl..."
brew install curl
exit 0
fi

echo "No known package manager detected; please install libcurl (development headers) manually."
exit 1
Loading