Skip to content

Wire wyreboxd catalog-backed mailbox services #26

Wire wyreboxd catalog-backed mailbox services

Wire wyreboxd catalog-backed mailbox services #26

Workflow file for this run

name: Main CI
on:
push:
branches:
- main
permissions:
contents: read
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
jobs:
formatting:
name: Formatting
runs-on: ubuntu-24.04
steps:
- name: Check out sources
uses: actions/checkout@v6
- name: Install formatter
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends indent
- name: Check C formatting
run: |
mapfile -d '' c_files < <(git ls-files -z -- 'wyrebox/*.c')
if [ "${#c_files[@]}" -eq 0 ]; then
echo "No C files."
exit 0
fi
./tools/gst-indent "${c_files[@]}"
git diff --exit-code -- "${c_files[@]}"
build:
name: Build (${{ matrix.compiler }})
runs-on: ubuntu-24.04
needs: formatting
strategy:
fail-fast: false
matrix:
compiler: [gcc, clang]
env:
CC: ${{ matrix.compiler }}
steps:
- name: Check out sources
uses: actions/checkout@v6
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
${{ matrix.compiler }} \
libglib2.0-dev \
meson \
ninja-build \
pkg-config \
unzip
- name: Configure
run: |
meson setup _build
- name: Build
run: |
meson compile -C _build
- name: Test
run: |
meson test -C _build --print-errorlogs
sanitize:
name: Sanitize (${{ matrix.arch }})
runs-on: ${{ matrix.runner }}
needs: build
strategy:
fail-fast: false
matrix:
include:
- arch: x86_64
runner: ubuntu-24.04
- arch: arm64
runner: ubuntu-24.04-arm
env:
ASAN_OPTIONS: "abort_on_error=1:halt_on_error=1:strict_string_checks=1:detect_stack_use_after_return=1"
UBSAN_OPTIONS: "halt_on_error=1:print_stacktrace=1"
# DuckDB version built from source on architectures without a prebuilt.
DUCKDB_VERSION: v1.5.2
DUCKDB_ROOT: ${{ github.workspace }}/duckdb-install
steps:
- name: Check out sources
uses: actions/checkout@v6
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
cmake \
git \
libglib2.0-dev \
meson \
ninja-build \
pkg-config \
unzip
# arm64 has no bundled DuckDB prebuilt; build it from source and cache it
# so it is compiled at most once per DuckDB version.
- name: Cache source-built DuckDB
if: matrix.arch == 'arm64'
id: duckdb-cache
uses: actions/cache@v4
with:
path: ${{ env.DUCKDB_ROOT }}
key: duckdb-${{ env.DUCKDB_VERSION }}-${{ matrix.arch }}
- name: Build DuckDB from source
if: matrix.arch == 'arm64' && steps.duckdb-cache.outputs.cache-hit != 'true'
run: |
git clone --depth 1 --branch "$DUCKDB_VERSION" \
https://github.com/duckdb/duckdb.git duckdb-src
cmake -S duckdb-src -B duckdb-src/build \
-G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_UNITTESTS=OFF \
-DCMAKE_INSTALL_PREFIX="$DUCKDB_ROOT"
cmake --build duckdb-src/build -j "$(nproc)"
cmake --install duckdb-src/build
- name: Configure
run: |
extra=()
if [ "${{ matrix.arch }}" = "arm64" ]; then
extra+=("-Dduckdb_root=$DUCKDB_ROOT")
fi
meson setup _build \
-Db_sanitize=address,undefined \
-Db_lundef=false \
"${extra[@]}"
- name: Build
run: |
meson compile -C _build
- name: Test
run: |
export LD_LIBRARY_PATH="$DUCKDB_ROOT/lib:${LD_LIBRARY_PATH:-}"
# Sanitizer-instrumented runs are several times slower than a normal
# build; on the arm64 runner the derived-view-materializer suite
# exceeds Meson's default 30s per-test limit. Scale all test timeouts
# so slow-but-progressing tests are not killed prematurely.
meson test -C _build --timeout-multiplier 6 --print-errorlogs