-
Notifications
You must be signed in to change notification settings - Fork 0
123 lines (105 loc) · 4.44 KB
/
Copy pathci.yml
File metadata and controls
123 lines (105 loc) · 4.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# © Copyright 2025, 2026 Query Farm LLC - https://query.farm
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
env:
# Use Cloudflare's S3-compatible R2 endpoint directly because vcpkg binary
# archives can exceed the Worker request-size limit. Fork PRs do not receive
# secrets, so disable the remote cache instead of issuing broken AWS calls.
VCPKG_BINARY_SOURCES: "${{ secrets.R2_ACCESS_KEY_ID != '' && secrets.R2_SECRET_KEY_ID != '' && secrets.R2_ENDPOINT != '' && 'clear;x-aws,s3://query-farm-duckdb-vcpkg/,readwrite' || 'clear' }}"
AWS_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_KEY_ID }}
AWS_ENDPOINT_URL: ${{ secrets.R2_ENDPOINT }}
AWS_DEFAULT_REGION: auto
AWS_REQUEST_CHECKSUM_CALCULATION: when_required
AWS_RESPONSE_CHECKSUM_VALIDATION: when_required
jobs:
# Seconds, and it fails the run before anything is built: a formatting-only
# diff arriving on top of a real change is what the formatter exists to stop.
format:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Install clang-format
run: pipx install 'clang-format~=22.1'
- name: Check formatting
run: ./scripts/format.sh --check
build:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-24.04
compiler: gcc
- os: ubuntu-24.04-arm
compiler: gcc
- os: macos-14
compiler: apple-clang
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
# The SDK is built from source as a subdirectory, not from an installed
# copy: the two move together, and an installed one goes stale silently.
# CMakeLists.txt looks for it beside this repo by default.
- name: Check out vgi-rpc-cpp
uses: actions/checkout@v4
with:
repository: Query-farm/vgi-rpc-cpp
path: vgi-rpc-c++
- name: Clone and bootstrap vcpkg
run: |
git clone https://github.com/microsoft/vcpkg.git
git -C vcpkg checkout 2d32fae67c755b665794a0650f5d268979d7807f
./vcpkg/bootstrap-vcpkg.sh -disableMetrics
echo "VCPKG_ROOT=$(pwd)/vcpkg" >> $GITHUB_ENV
- name: Install newer bison (macOS)
if: runner.os == 'macOS'
run: |
brew install bison
echo "$(brew --prefix bison)/bin" >> $GITHUB_PATH
# vcpkg builds libsodium through its autotools script. The runners ship
# libtool but not the complete autoconf toolset, and the port fails at
# configure time when any one of these tools is absent.
- name: Install autotools (libsodium)
run: |
if [ "$RUNNER_OS" = "macOS" ]; then
brew install autoconf autoconf-archive automake libtool
else
sudo apt-get update && sudo apt-get install -y autoconf autoconf-archive automake libtool
fi
# vcpkg's binary cache covers the dependencies; this covers our own
# translation units, which vcpkg knows nothing about.
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ${{ matrix.os }}-${{ matrix.compiler }}
max-size: 500M
- name: Configure
run: >
cmake --preset default
-DVGI_RPC_SOURCE_DIR=${{ github.workspace }}/vgi-rpc-c++
-DCMAKE_C_COMPILER_LAUNCHER=ccache
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
- name: Build
run: cmake --build --preset default --parallel
- name: Test (unit)
run: ctest --test-dir build --output-on-failure
# The example worker is the deliverable: if it does not start and answer
# __describe__, nothing downstream of it can work.
- name: Smoke — the worker describes itself
run: |
python3 -m pip install --quiet 'vgi-rpc[http]' || true
test -x build/example-worker/vgi-example-worker
echo "worker built: $(build/example-worker/vgi-example-worker --help 2>&1 | head -1 || true)"
# The integration suite is the definition of done for this repo, and it needs
# the DuckDB extension built from ~/Development/vgi — a large, separate build
# that does not belong in this workflow. It runs locally via
# scripts/run_tests.sh; see CLAUDE.md. Wiring it here needs the extension
# published as a release artifact first, which is tracked separately.