Skip to content

Commit 1c790e0

Browse files
rustyconoverclaude
andcommitted
Add GitHub Actions workflows for CI, sanitizers, and releases
- ci.yml: build/test matrix (Ubuntu GCC + macOS Apple Clang) with vcpkg binary caching; conformance tests on Ubuntu via Python vgi-rpc - sanitizer.yml: ASan + UBSan on PRs, weekly schedule, and manual dispatch - release.yml: tag-triggered source tarball and GitHub Release - .gitignore: add vcpkg/ entry Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 1736f14 commit 1c790e0

4 files changed

Lines changed: 149 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
concurrency:
10+
group: ci-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
env:
14+
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
15+
16+
jobs:
17+
build:
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
include:
22+
- os: ubuntu-24.04
23+
compiler: gcc
24+
conformance: true
25+
- os: macos-14
26+
compiler: apple-clang
27+
conformance: false
28+
29+
runs-on: ${{ matrix.os }}
30+
31+
steps:
32+
- uses: actions/checkout@v4
33+
34+
- name: Export GitHub Actions cache env vars
35+
uses: actions/github-script@v7
36+
with:
37+
script: |
38+
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
39+
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
40+
41+
- name: Clone and bootstrap vcpkg
42+
run: |
43+
git clone https://github.com/microsoft/vcpkg.git
44+
git -C vcpkg checkout 05442024c3fda64320bd25d2251cc9807b84fb6f
45+
./vcpkg/bootstrap-vcpkg.sh -disableMetrics
46+
47+
- name: Configure
48+
run: cmake --preset default
49+
50+
- name: Build
51+
run: cmake --build --preset default --parallel
52+
53+
- name: Test (unit)
54+
run: ctest --test-dir build --output-on-failure -E conformance
55+
56+
- name: Setup Python
57+
if: matrix.conformance
58+
uses: actions/setup-python@v5
59+
with:
60+
python-version: "3.12"
61+
62+
- name: Install pyarrow
63+
if: matrix.conformance
64+
run: pip install pyarrow
65+
66+
- name: Clone vgi-rpc (Python)
67+
if: matrix.conformance
68+
run: git clone https://github.com/Query-farm/vgi-rpc.git ../vgi-rpc
69+
70+
- name: Test (conformance)
71+
if: matrix.conformance
72+
env:
73+
CONFORMANCE_WORKER: ${{ github.workspace }}/build/conformance/conformance_worker
74+
VGI_RPC_PYTHON_PATH: ${{ github.workspace }}/../vgi-rpc
75+
run: ctest --test-dir build --output-on-failure -R conformance

.github/workflows/release.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-24.04
11+
12+
permissions:
13+
contents: write
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
20+
- name: Create source tarball
21+
run: |
22+
git archive --format=tar.gz --prefix=vgi-rpc-c++-${GITHUB_REF_NAME}/ \
23+
-o vgi-rpc-c++-${GITHUB_REF_NAME}.tar.gz HEAD
24+
25+
- name: Create GitHub Release
26+
uses: softprops/action-gh-release@v2
27+
with:
28+
generate_release_notes: true
29+
files: vgi-rpc-c++-*.tar.gz

.github/workflows/sanitizer.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Sanitizer
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
schedule:
7+
- cron: "0 6 * * 1"
8+
workflow_dispatch:
9+
10+
env:
11+
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
12+
13+
jobs:
14+
asan-ubsan:
15+
runs-on: ubuntu-24.04
16+
17+
env:
18+
ASAN_OPTIONS: detect_leaks=1:halt_on_error=1
19+
UBSAN_OPTIONS: print_stacktrace=1:halt_on_error=1
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
24+
- name: Export GitHub Actions cache env vars
25+
uses: actions/github-script@v7
26+
with:
27+
script: |
28+
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
29+
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
30+
31+
- name: Clone and bootstrap vcpkg
32+
run: |
33+
git clone https://github.com/microsoft/vcpkg.git
34+
git -C vcpkg checkout 05442024c3fda64320bd25d2251cc9807b84fb6f
35+
./vcpkg/bootstrap-vcpkg.sh -disableMetrics
36+
37+
- name: Configure
38+
run: cmake --preset sanitizer
39+
40+
- name: Build
41+
run: cmake --build --preset sanitizer --parallel
42+
43+
- name: Test
44+
run: ctest --test-dir build --output-on-failure --timeout 300 -E conformance

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
build/
2+
vcpkg/
23
.cache/
34
.claude/

0 commit comments

Comments
 (0)