Skip to content

chore(ci): generate actions.lock ahead of the 2026-10-01 lock gate (#85) #33

chore(ci): generate actions.lock ahead of the 2026-10-01 lock gate (#85)

chore(ci): generate actions.lock ahead of the 2026-10-01 lock gate (#85) #33

Workflow file for this run

# SPDX-License-Identifier: MPL-2.0
# This workflow is managed by gh actions-lock.
# Docudactyl HPC — Chapel + Zig FFI CI Pipeline
#
# Three jobs:
# 1. build-ffi: Zig FFI build + unit/integration tests
# 2. build-chapel: Chapel HPC binary (depends on FFI artifacts)
# 3. check-abi: Idris2 ABI proof compilation
#
name: HPC Build & Test
on:
workflow_dispatch:
push:
branches: [main]
paths:
- 'src/chapel/**'
- 'ffi/zig/**'
- 'src/Docudactyl/**'
- 'src/abi/**'
- 'generated/abi/**'
- 'docudactyl.ipkg'
- 'mise.toml'
- 'scripts/ci/**'
- '.github/workflows/hpc-ci.yml'
pull_request:
paths:
- 'src/chapel/**'
- 'ffi/zig/**'
- 'src/Docudactyl/**'
- 'src/abi/**'
- 'generated/abi/**'
- 'docudactyl.ipkg'
- 'mise.toml'
- 'scripts/ci/**'
- '.github/workflows/hpc-ci.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
actions: read
contents: read
env:
ZIG_VERSION: '0.15.2'
# Chapel 2.8.0 is required by docudactyl#29 — FileSystem.stat was
# removed; code now uses OS.POSIX.stat. echidna#146 set the same floor.
CHAPEL_VERSION: '2.8.0'
IDRIS2_VERSION: '0.8.0'
jobs:
# ═══════════════════════════════════════════════════════════════════════════
# Job 1: Zig FFI — Build + Test
# ═══════════════════════════════════════════════════════════════════════════
build-ffi:
name: Zig FFI Build & Test
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v4
- name: Install Zig
uses: mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29 # v2
with:
version: ${{ env.ZIG_VERSION }}
- name: Standalone Zig regression tests
run: bash scripts/ci/test-zig-standalone.sh
- name: Install C library headers
run: |
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends \
libpoppler-glib-dev libglib2.0-dev \
libtesseract-dev libleptonica-dev \
libavformat-dev libavcodec-dev libavutil-dev \
libxml2-dev libgdal-dev libvips-dev \
liblmdb-dev libarchive-dev libcurl4-openssl-dev
- name: Build FFI (ReleaseFast)
run: cd ffi/zig && zig build -Doptimize=ReleaseFast
- name: Run FFI tests (unit + integration)
run: cd ffi/zig && zig build test
- name: Verify shared library exists
run: |
ls -la ffi/zig/zig-out/lib/libdocudactyl_ffi.so*
file ffi/zig/zig-out/lib/libdocudactyl_ffi.so
- name: Upload FFI artifacts
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: ffi-libs
path: |
ffi/zig/zig-out/lib/libdocudactyl_ffi.so*
ffi/zig/zig-out/lib/libdocudactyl_ffi.a
retention-days: 1
# ═══════════════════════════════════════════════════════════════════════════
# Job 2a: FFI Smoke — decoupled from the metalayer (docudactyl#29 / echidna#146)
# ─────────────────────────────────────────────────────────────────────────────
# Builds and runs `src/chapel/smoke.chpl` linked against the Zig FFI library
# WITHOUT pulling in the full DocudactylHPC metalayer. Strict gate: if the
# FFI ABI surface or the chapel/Zig boundary regresses, this fails fast even
# when the metalayer build is broken. (No continue-on-error.)
# ═══════════════════════════════════════════════════════════════════════════
build-smoke:
name: Chapel FFI Smoke
needs: build-ffi
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v4
- name: Download FFI artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: ffi-libs
path: ffi/zig/zig-out/lib/
- name: Install Chapel
run: bash scripts/ci/install-chapel.sh
- name: Install C runtime libraries (FFI .so transitively pulls these)
run: |
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends \
libpoppler-glib8t64 libglib2.0-0t64 \
libtesseract5 libleptonica-dev \
libavformat60 libavcodec60 libavutil58 \
libxml2 libgdal34t64 libvips42t64 \
liblmdb0 libarchive13t64 libcurl4t64 \
tesseract-ocr-eng jq
- name: Verify Chapel installation
run: chpl --version
- name: Build FFI smoke binary
run: |
mkdir -p bin
ABSPATH=$(cd ffi/zig/zig-out/lib && pwd)
chpl src/chapel/smoke.chpl \
src/chapel/FFIBridge.chpl \
-o bin/docudactyl-smoke \
-Lffi/zig/zig-out/lib -ldocudactyl_ffi \
--ldflags="-Wl,-rpath,$ABSPATH"
- name: Run FFI smoke (init/version/free; no manifest required)
run: |
export LD_LIBRARY_PATH="ffi/zig/zig-out/lib:$LD_LIBRARY_PATH"
OUT=$(bin/docudactyl-smoke)
echo "$OUT"
echo "$OUT" | grep -qE '^\[smoke\] PASS$'
# ═══════════════════════════════════════════════════════════════════════════
# Job 2: Chapel HPC — Build + Smoke Test
# ═══════════════════════════════════════════════════════════════════════════
build-chapel:
name: Chapel HPC Build
needs: build-ffi
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v4
- name: Download FFI artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: ffi-libs
path: ffi/zig/zig-out/lib/
- name: Install Chapel
run: bash scripts/ci/install-chapel.sh
- name: Install C runtime libraries
run: |
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends \
libpoppler-glib8t64 libglib2.0-0t64 \
libtesseract5 libleptonica-dev \
libavformat60 libavcodec60 libavutil58 \
libxml2 libgdal34t64 libvips42t64 \
liblmdb0 libarchive13t64 libcurl4t64 \
tesseract-ocr-eng jq
- name: Verify Chapel installation
run: chpl --version
- name: Build Chapel HPC binary
run: |
mkdir -p bin
ABSPATH=$(cd ffi/zig/zig-out/lib && pwd)
chpl src/chapel/DocudactylHPC.chpl \
src/chapel/Config.chpl \
src/chapel/ContentType.chpl \
src/chapel/FFIBridge.chpl \
src/chapel/ManifestLoader.chpl \
src/chapel/NdjsonManifest.chpl \
src/chapel/FaultHandler.chpl \
src/chapel/ProgressReporter.chpl \
src/chapel/ShardedOutput.chpl \
src/chapel/ResultAggregator.chpl \
src/chapel/Checkpoint.chpl \
-o bin/docudactyl-hpc \
-Lffi/zig/zig-out/lib -ldocudactyl_ffi \
--ldflags="-Wl,-rpath,$ABSPATH" \
--fast
- name: Smoke test (deterministic fixture, strict report assertions)
run: bash scripts/ci/smoke-hpc.sh
# ═══════════════════════════════════════════════════════════════════════════
# Job 3: Idris2 ABI — Compile Proofs
# ═══════════════════════════════════════════════════════════════════════════
check-abi:
name: Idris2 ABI Proofs
runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v4
- name: Install Idris2 prerequisites
run: |
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends build-essential libgmp-dev chezscheme
- name: Cache pinned Idris2 installation
id: idris-cache
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: ~/.local/idris2
key: idris2-${{ runner.os }}-${{ runner.arch }}-0.8.0-15a3e4e70843f7a34100f6470c04b791330788df-v1
- name: Install pinned Idris2
if: steps.idris-cache.outputs.cache-hit != 'true'
run: bash scripts/ci/install-idris2.sh
- name: Add Idris2 to PATH
run: echo "$HOME/.local/idris2/bin" >> "$GITHUB_PATH"
- name: Verify Idris2 installation
run: idris2 --version
- name: Compile ABI proofs
run: |
idris2 --build docudactyl.ipkg
- name: Verify no banned patterns
run: |
echo "Checking for banned patterns in Idris2 files..."
BANNED="believe_me|assert_total|assert_smaller|unsafePerformIO"
if grep -rE "$BANNED" src/Docudactyl/ABI/; then
echo "FAIL: Banned patterns found in Idris2 ABI files"
exit 1
fi
echo "PASS: No banned patterns"
# ═══════════════════════════════════════════════════════════════════════════
# Job 4: C ABI Header — Static Assert Verification
# ═══════════════════════════════════════════════════════════════════════════
verify-header:
name: C ABI Header Verification
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v4
- name: Compile header (static assertions)
run: |
cat > /tmp/verify_abi.c << 'CEOF'
#include "generated/abi/docudactyl_ffi.h"
int main(void) { return 0; }
CEOF
gcc -I. -fsyntax-only -c /tmp/verify_abi.c -o /dev/null
echo "PASS: C ABI header compiles, static assertions hold"