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.
89name : CI
2728
2829jobs :
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
0 commit comments