Skip to content
Open
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
42 changes: 42 additions & 0 deletions .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build Linux

on:
workflow_call:
inputs:
cc:
required: false
type: string
default: gcc
cxx:
required: false
type: string
default: g++

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 15
env:
CC: ${{ inputs.cc }}
CXX: ${{ inputs.cxx }}
steps:
- uses: actions/checkout@v5

- name: Install packages
run: |
sudo apt-get update
sudo apt-get install -y libcurl4-openssl-dev ninja-build clang

- name: Configure CMake
run: |
cmake -B Build/ubuntu -G Ninja \
-D CMAKE_BUILD_TYPE=RelWithDebInfo \
-D CMAKE_C_COMPILER=${{ inputs.cc }} \
-D CMAKE_CXX_COMPILER=${{ inputs.cxx }}

- name: Build
run: ninja -C Build/ubuntu

- name: Run Tests
working-directory: Build/ubuntu/Tests
run: ./UrlLibTests
32 changes: 32 additions & 0 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build macOS

on:
workflow_call:
inputs:
xcode-version:
required: true
type: string
runs-on:
required: false
type: string
default: macos-latest

jobs:
build:
runs-on: ${{ inputs.runs-on }}
timeout-minutes: 15
steps:
- uses: actions/checkout@v5

- name: Select Xcode ${{ inputs.xcode-version }}
run: sudo xcode-select --switch /Applications/Xcode_${{ inputs.xcode-version }}.app/Contents/Developer
Comment thread
matthargett marked this conversation as resolved.

- name: Configure CMake
run: cmake -B Build/macOS -G Xcode

- name: Build
run: cmake --build Build/macOS --target UrlLibTests --config RelWithDebInfo

- name: Run Tests
working-directory: Build/macOS/Tests/RelWithDebInfo
run: ./UrlLibTests
52 changes: 52 additions & 0 deletions .github/workflows/build-win32.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Build Win32

on:
workflow_call:
inputs:
platform:
required: true
type: string

jobs:
build:
runs-on: windows-2022
timeout-minutes: 15
steps:
- uses: actions/checkout@v5

- name: Configure CMake
run: cmake -B Build/Win32 -A ${{ inputs.platform }}

- name: Build Solution
run: cmake --build Build/Win32 --config RelWithDebInfo -- /m

- name: Enable Crash Dumps
shell: cmd
run: |
rem WER does not reliably create a custom DumpFolder at crash time; make sure it
rem exists before the registry points at it.
if not exist "%RUNNER_TEMP%\Dumps" mkdir "%RUNNER_TEMP%\Dumps"
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\UrlLibTests.exe" /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\UrlLibTests.exe" /v DumpType /t REG_DWORD /d 2 /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\UrlLibTests.exe" /v DumpCount /t REG_DWORD /d 1 /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\UrlLibTests.exe" /v DumpFolder /t REG_SZ /d "%RUNNER_TEMP%\Dumps" /f

- name: Run Tests
shell: cmd
working-directory: Build/Win32/Tests/RelWithDebInfo
run: UrlLibTests.exe

- name: Stage Test App for Crash Dumps
if: failure()
shell: powershell
run: |
New-Item -ItemType Directory -Force -Path "$env:RUNNER_TEMP\Dumps" | Out-Null
Copy-Item -Path "Build\Win32\Tests\RelWithDebInfo\UrlLibTests.*" -Destination "$env:RUNNER_TEMP\Dumps\" -ErrorAction SilentlyContinue
Comment thread
matthargett marked this conversation as resolved.

- name: Upload Crash Dumps
if: failure()
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.platform }}-crash-dumps
path: ${{ runner.temp }}/Dumps/
if-no-files-found: ignore
Comment thread
matthargett marked this conversation as resolved.
31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
# ── Win32 ─────────────────────────────────────────────────────
Win32_x64:
uses: ./.github/workflows/build-win32.yml
with:
platform: x64

# ── macOS ─────────────────────────────────────────────────────
macOS_Xcode164:
uses: ./.github/workflows/build-macos.yml
with:
xcode-version: '16.4'
runs-on: macos-latest

# ── Linux ─────────────────────────────────────────────────────
Ubuntu_gcc:
uses: ./.github/workflows/build-linux.yml

Ubuntu_clang:
uses: ./.github/workflows/build-linux.yml
with:
cc: clang
cxx: clang++