Skip to content

Commit 98af757

Browse files
rustyconoverclaude
andcommitted
CI: run unit + extension integration suite on Linux, macOS, and Windows
Matrix both jobs across ubuntu/macos/windows. The integration job picks the matching haybarn_unittest asset per platform; on Windows the bash steps run under Git Bash and the worker LOCATION is the native path to the .venv/Scripts/vgi-easter.exe launcher. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 8b555e0 commit 98af757

2 files changed

Lines changed: 47 additions & 15 deletions

File tree

.github/workflows/ci.yml

Lines changed: 38 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
#
33
# Unit tests + the sqllogictest extension suite (test/sql/*.test) run against
44
# the easter worker through the real signed `vgi` DuckDB community extension via
5-
# a prebuilt standalone `haybarn-unittest`. See ci/README.md for the design.
5+
# a prebuilt standalone `haybarn-unittest`. Both jobs run on Linux, macOS, and
6+
# Windows. See ci/README.md for the design.
67
#
78
# Reusable (workflow_call) so publish.yml can gate releases on a green run.
89
name: CI
@@ -27,15 +28,30 @@ env:
2728

2829
jobs:
2930
unit:
30-
runs-on: ubuntu-latest
31+
strategy:
32+
fail-fast: false
33+
matrix:
34+
os: [ubuntu-latest, macos-latest, windows-latest]
35+
runs-on: ${{ matrix.os }}
3136
steps:
3237
- uses: actions/checkout@v4
3338
- uses: astral-sh/setup-uv@v6
3439
- name: Run unit tests
3540
run: uv run --python 3.13 pytest tests/ -q
3641

3742
integration:
38-
runs-on: ubuntu-latest
43+
strategy:
44+
fail-fast: false
45+
matrix:
46+
include:
47+
- { os: ubuntu-latest, asset: haybarn_unittest-linux-amd64.zip }
48+
- { os: macos-latest, asset: haybarn_unittest-osx-arm64.zip }
49+
- { os: windows-latest, asset: haybarn_unittest-windows-amd64.zip }
50+
runs-on: ${{ matrix.os }}
51+
defaults:
52+
run:
53+
# Git Bash on Windows; the integration runner is a bash script.
54+
shell: bash
3955
steps:
4056
- uses: actions/checkout@v4
4157
- uses: astral-sh/setup-uv@v6
@@ -49,17 +65,27 @@ jobs:
4965
run: |
5066
gh release download "$HAYBARN_RELEASE" \
5167
--repo Query-farm-haybarn/haybarn \
52-
--pattern 'haybarn_unittest-linux-amd64.zip' \
53-
--output /tmp/haybarn-unittest.zip --clobber
54-
unzip -o -q /tmp/haybarn-unittest.zip -d /tmp/haybarn-unittest
55-
UNITTEST=$(find /tmp/haybarn-unittest -name 'haybarn-unittest' -type f | head -1)
56-
chmod +x "$UNITTEST"
57-
echo "HAYBARN_UNITTEST=$UNITTEST" >> "$GITHUB_ENV"
68+
--pattern '${{ matrix.asset }}' \
69+
--output haybarn-unittest.zip --clobber
70+
mkdir -p hb && unzip -o -q haybarn-unittest.zip -d hb
5871
env:
5972
GH_TOKEN: ${{ github.token }}
6073

74+
- name: Resolve runner + worker paths
75+
run: |
76+
# The worker LOCATION is consumed by the (native) extension process,
77+
# so on Windows it must be a native path to the .exe launcher; the
78+
# unittest binary itself is exec'd by bash, so a POSIX path is fine.
79+
if [ "$RUNNER_OS" = "Windows" ]; then
80+
UNITTEST=$(find hb -name 'haybarn-unittest.exe' -type f | head -1)
81+
WORKER=$(cygpath -w "$PWD/.venv/Scripts/vgi-easter.exe")
82+
else
83+
UNITTEST=$(find hb -name 'haybarn-unittest' -type f | head -1)
84+
chmod +x "$UNITTEST"
85+
WORKER="$PWD/.venv/bin/vgi-easter"
86+
fi
87+
echo "HAYBARN_UNITTEST=$UNITTEST" >> "$GITHUB_ENV"
88+
echo "VGI_EASTER_WORKER=$WORKER" >> "$GITHUB_ENV"
89+
6190
- name: Run extension integration suite
6291
run: ci/run-integration.sh
63-
env:
64-
HAYBARN_UNITTEST: ${{ env.HAYBARN_UNITTEST }}
65-
VGI_EASTER_WORKER: ${{ github.workspace }}/.venv/bin/vgi-easter

ci/README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,15 @@
22

33
[`.github/workflows/ci.yml`](../.github/workflows/ci.yml) runs the unit tests
44
and this repo's sqllogictest suite (`test/sql/*.test`) against the easter VGI
5-
worker through the **real DuckDB `vgi` extension** on every push / PR — and is
6-
reused by [`publish.yml`](../.github/workflows/publish.yml) so nothing reaches
7-
PyPI without a green extension run.
5+
worker through the **real DuckDB `vgi` extension** on every push / PR — across
6+
**Linux, macOS, and Windows** — and is reused by
7+
[`publish.yml`](../.github/workflows/publish.yml) so nothing reaches PyPI
8+
without a green extension run on all three.
9+
10+
Both jobs run as an OS matrix. The integration job selects the matching
11+
`haybarn_unittest-*` asset per platform (`linux-amd64`, `osx-arm64`,
12+
`windows-amd64`); on Windows the bash steps run under Git Bash and the worker
13+
LOCATION is the native path to the `.venv/Scripts/vgi-easter.exe` launcher.
814

915
## How it works (no C++ build)
1016

0 commit comments

Comments
 (0)