Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
647539f
memlat: add the boot policy tool to the workspace
n0rpan Nov 26, 2026
6655c98
ci: engine-only CI on GitHub-hosted runners
n0rpan Nov 26, 2026
71c26bf
release: one aarch64 tarball on tags and on every main push
n0rpan Nov 26, 2026
857ef1d
lab: dev-update.sh installs the oxe dev build under ~/.local/state/oxe
n0rpan Nov 26, 2026
990881a
supervisor: rename oxc-local and drop the oxa-* dependencies
n0rpan Nov 26, 2026
dec1a18
ci: remove the Flash packaging fixture test
n0rpan Nov 26, 2026
c2f197e
docs: README, CONTRIBUTING and SECURITY for the standalone oxe
n0rpan Nov 26, 2026
6de460a
docs: point the CPU-target note at the workflows that now exist
n0rpan Nov 26, 2026
1f605b2
lab: dev-update.sh installs the oxe dev build under ~/.local/state/oxe
n0rpan Nov 26, 2026
30d490b
release: bare file names in SHA256SUMS
n0rpan Nov 26, 2026
6ef5ad5
docs: tighten the README tarball and stub wording
n0rpan Nov 26, 2026
a97e4c5
ci: give the aarch64 release build job the release timeout
n0rpan Nov 26, 2026
46fc4c7
docs: drop the parked ox-llm workflows
n0rpan Nov 26, 2026
96b40cc
server: refuse an absent or unsupported architecture instead of servi…
n0rpan Nov 26, 2026
0b31269
supervisor: expose the raw SSE passthrough and the production host me…
n0rpan Nov 26, 2026
139a476
oxe: serve, models and import-oxa for the standalone endpoint
n0rpan Nov 26, 2026
dcc6f5c
docs: document oxe serve, and ship a systemd --user unit
n0rpan Nov 26, 2026
b768403
serve: give the engine child a minimal base environment
n0rpan Nov 26, 2026
b0ecbd5
server: apply the architecture pre-check only to the default native e…
n0rpan Nov 26, 2026
8b7fb86
packaging: leave MemoryMax to the operator
n0rpan Nov 26, 2026
e2b4e7c
serve: name the missing config and point at models add
n0rpan Nov 26, 2026
1ed9b44
models: drop a meaningless list column
n0rpan Nov 26, 2026
6be52b4
Merge branch 'feat/ci-release' into feat/standalone-v1
n0rpan Nov 26, 2026
2eed5ef
ci: install git before checkout in the fedora container
n0rpan Nov 26, 2026
7fb2915
deps: ureq without TLS or gzip, loopback only
n0rpan Nov 26, 2026
ec8c96d
supervisor: gate the fake engine behind the testkit feature
n0rpan Nov 26, 2026
1d6e9a4
oxe import-oxa: keep the local engine default, opt in with --keep-binary
n0rpan Nov 26, 2026
f008ad4
docs: MemoryMax is optional, admission refuses a launch that does not…
n0rpan Nov 26, 2026
e06a948
docs: point at the standalone crates instead of the old engine/ prefixes
n0rpan Nov 26, 2026
40c4e77
ci: fail on secrets or Hexagon/QAIRT SDK material in the tree
n0rpan Nov 26, 2026
581928a
ci: run the memlat bwrap differential on the host runner; document th…
n0rpan Nov 26, 2026
5219236
serve: stop the engine on SIGTERM/SIGINT and kill it with its parent
n0rpan Nov 26, 2026
89c99da
serve: publish context_length beside context_window in /v1/models
n0rpan Nov 26, 2026
b19de71
supervisor test: count a reaped-never zombie as dead in the parent-de…
n0rpan Nov 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
321 changes: 321 additions & 0 deletions .github/workflows/ci.yml

Large diffs are not rendered by default.

10 changes: 4 additions & 6 deletions docs/ci-reference/codeql.yml → .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# CodeQL (advanced setup). Owner decision 2026-11-19: scan main, weekly and on demand,
# not every pull request (PR CI time goes to the required checks). Replaces the
# repository's CodeQL default setup, which is switched off when this lands.
# CodeQL (advanced setup) for the engine: Rust, the vendored C kernels, the Python CI tooling and
# the workflows themselves. Scans main, weekly and on demand, not every pull request, so PR CI
# time goes to the required checks.
name: CodeQL

on:
Expand Down Expand Up @@ -34,14 +34,12 @@ jobs:
build-mode: none
- language: c-cpp
build-mode: none
- language: javascript-typescript
build-mode: none
- language: python
build-mode: none
- language: rust
build-mode: none
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: github/codeql-action/init@33d7b85da1a04171e211befe2c739303b9a4c066 # v4.39.3
Expand Down
120 changes: 120 additions & 0 deletions .github/workflows/dev-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
name: dev-build
# Every push to main builds the dev tarball (release-build.yml) and advances the rolling `dev`
# prerelease, which has no stable assets and is never the "latest" release. A dev version is a
# pre-release of the next stable tag: vX.Y.(Z+1)-dev.<commits since tag>+<sha7>
# (tools/ci/dev_version.py). The tag `dev` always points at the commit of the newest published
# dev build. Build provenance is generated for the exact uploaded assets.
on:
push:
branches: [main]
workflow_dispatch:

permissions:
contents: read

concurrency:
# Pushes stay serialized: a running build finishes, only the newest pending run is kept; the
# publish step only ever moves the dev tag forward.
group: dev-build-${{ github.event_name }}
cancel-in-progress: false

defaults:
run:
shell: bash

jobs:
version:
if: github.repository == 'oxstack/oxe'
runs-on: ubuntu-24.04-arm
timeout-minutes: 5
outputs:
version: ${{ steps.version.outputs.version }}
file_version: ${{ steps.version.outputs.file_version }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
fetch-depth: 0
fetch-tags: true
- id: version
run: |
echo "version=$(python3 -I tools/ci/dev_version.py "$GITHUB_SHA")" >> "$GITHUB_OUTPUT"
echo "file_version=$(python3 -I tools/ci/dev_version.py "$GITHUB_SHA" --file-name)" >> "$GITHUB_OUTPUT"

build:
needs: version
uses: ./.github/workflows/release-build.yml
with:
version: ${{ needs.version.outputs.version }}
file_version: ${{ needs.version.outputs.file_version }}

publish:
needs: [version, build]
if: >-
!cancelled() && needs.build.result == 'success' && github.repository == 'oxstack/oxe' &&
github.event_name == 'push' && github.ref == 'refs/heads/main' && !github.event.repository.private
runs-on: ubuntu-24.04-arm
timeout-minutes: 15
permissions:
contents: write # create or update the rolling dev prerelease
id-token: write # sign the provenance (Sigstore)
attestations: write # store the attestation
env:
VERSION: ${{ needs.version.outputs.version }}
FILE_VERSION: ${{ needs.version.outputs.file_version }}
steps:
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: oxe-linux-aarch64
path: dist
- name: Build provenance
id: provenance
uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2
with:
subject-path: |
dist/*.tar.gz
dist/SHA256SUMS
- name: Keep the attestation with the assets
env:
BUNDLE: ${{ steps.provenance.outputs.bundle-path }}
run: cp "$BUNDLE" "dist/oxe-$FILE_VERSION.provenance.jsonl"
- name: Advance only the rolling dev prerelease
env:
GH_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
# Only a genuine 404 permits creation; auth/network failures fail closed.
missing() { grep -q 'HTTP 404' "$1"; }
# Publish only forward: this commit must still be on main and must be newer than (or
# equal to) the commit the dev tag points at. Runs are serialized by the concurrency
# group, so nothing races this check.
on_main=$(gh api "repos/$GITHUB_REPOSITORY/compare/$GITHUB_SHA...main" --jq .status)
case "$on_main" in ahead|identical) ;; *) echo "::notice::$GITHUB_SHA is not on main ($on_main); not publishing"; exit 0;; esac
if gh api "repos/$GITHUB_REPOSITORY/git/ref/tags/dev" --jq .object.sha > dev-sha 2> dev-error; then
forward=$(gh api "repos/$GITHUB_REPOSITORY/compare/$(cat dev-sha)...$GITHUB_SHA" --jq .status)
case "$forward" in ahead|identical) ;; *) echo "::notice::dev already at a newer commit ($forward); not publishing"; exit 0;; esac
else
missing dev-error || { cat dev-error >&2; exit 1; }
fi
release="repos/$GITHUB_REPOSITORY/releases/tags/dev"
if ! gh api "$release" > release.json 2> release-error; then
missing release-error || { cat release-error >&2; exit 1; }
gh release create dev --repo "$GITHUB_REPOSITORY" --target "$GITHUB_SHA" \
--prerelease --latest=false --title 'Development build'
fi
gh release upload dev dist/* --repo "$GITHUB_REPOSITORY" --clobber
ref="repos/$GITHUB_REPOSITORY/git/refs/tags/dev"
if gh api "repos/$GITHUB_REPOSITORY/git/ref/tags/dev" > /dev/null 2> ref-error; then
gh api --method PATCH "$ref" -f sha="$GITHUB_SHA" -F force=true > /dev/null
else
missing ref-error || { cat ref-error >&2; exit 1; }
gh api --method POST "repos/$GITHUB_REPOSITORY/git/refs" -f ref=refs/tags/dev -f sha="$GITHUB_SHA" > /dev/null
fi
printf 'Qualified main commit: %s\nVersion: %s\nRun: %s/%s/actions/runs/%s\n' \
"$GITHUB_SHA" "$VERSION" "$GITHUB_SERVER_URL" "$GITHUB_REPOSITORY" "$GITHUB_RUN_ID" > notes.md
gh release edit dev --repo "$GITHUB_REPOSITORY" --target "$GITHUB_SHA" --draft=false \
--prerelease --latest=false --title "Development $VERSION" --notes-file notes.md
# Publication is committed above. Remove superseded assets, never another tag/release.
gh api "$release" --jq '.assets[].name' | while IFS= read -r asset; do
test -f "dist/$asset" || gh release delete-asset dev --repo "$GITHUB_REPOSITORY" --yes -- "$asset"
done
134 changes: 134 additions & 0 deletions .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
name: release-build
# Builds and packages the one release tarball. Artifact only: no tags, no credentials and no
# publication here; release.yml and dev-build.yml call it and publish its artifact.
#
# The tarball holds oxe, oxe-server and local-ai-memlat-boot under usr/bin/, built by the pinned
# Rust toolchain and the Fedora 44 GCC 16 container the vendored kernels were bit-matched with
# (tools/ci/setup_toolchain.sh). The Flash feature is not built: it links a production ggml
# archive that is not in this repository (issue #7).
on:
workflow_call:
inputs:
version:
description: Version in the tarball name and in the binaries (tag, or vX.Y.Z-dev.N+sha)
type: string
required: true
file_version:
description: Version used in file names ('+' written as '.'); defaults to version
type: string
default: ''

permissions:
contents: read

env:
RUST_VERSION: "1.99.1"
CARGO_TERM_COLOR: always
CARGO_BUILD_JOBS: "4"

defaults:
run:
shell: bash

jobs:
linux-aarch64:
name: oxe tarball (linux-aarch64)
runs-on: ubuntu-24.04-arm
container:
image: fedora:44@sha256:15da97ed9aa94dd3d92c3925eb89520f6c80e07ea7ee24cba848d1f8b6912b3e
timeout-minutes: 180
steps:
# The fedora image ships no git, so actions/checkout would fall back to the REST source
# archive without .git and every later `git ls-files` would fail. Install it first.
- name: Git before checkout (prevent REST archive fallback)
run: dnf -y -q install --setopt=install_weak_deps=False git-core
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
# The checkout runs as another uid than the container's root.
- name: Trust the workspace checkout
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Version
id: v
env:
VERSION: ${{ inputs.version }}
FILE_VERSION: ${{ inputs.file_version }}
run: |
set -euo pipefail
[[ $VERSION =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.]+)?$ ]] || {
echo "bad version string: $VERSION" >&2; exit 1; }
file_version=${FILE_VERSION:-$VERSION}
[[ $file_version =~ ^[0-9A-Za-z._+-]+$ ]] || {
echo "bad file version string: $file_version" >&2; exit 1; }
{
echo "version=$VERSION"
echo "file_version=$file_version"
# The binaries report the tag without its leading v (OX_BUILD_VERSION, see
# crates/oxe-cli/src/bin/oxe.rs build_version).
echo "stamp=${VERSION#v}"
} >> "$GITHUB_OUTPUT"
- name: Toolchain
run: tools/ci/setup_toolchain.sh "$RUST_VERSION"
- name: Compiler and source cache key
id: rust-key
run: python3 -I tools/ci/rust_cache_key.py --variant fedora44-release .
- uses: actions/cache/restore@caa296126883cff596d87d8935842f9db880ef25 # v5
id: rust-cache
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ steps.rust-key.outputs.key }}
restore-keys: ${{ steps.rust-key.outputs.prefix }}
- name: Mark sources newer than any restored build output
run: git ls-files -z | xargs -0 touch -c --
- name: Rust cache result
run: echo "Rust cache exact hit = ${{ steps.rust-cache.outputs.cache-hit }}" >> "$GITHUB_STEP_SUMMARY"
- name: Build the release binaries
env:
OX_BUILD_VERSION: ${{ steps.v.outputs.stamp }}
run: |
cargo build --release --locked -p server --bin oxe-server
cargo build --release --locked -p oxe-cli --bin oxe
cargo build --release --locked --bin local-ai-memlat-boot
- name: Binaries report the packaged version
env:
STAMP: ${{ steps.v.outputs.stamp }}
run: |
set -euo pipefail
test "$(./target/release/oxe --version)" = "oxe $STAMP"
test "$(./target/release/oxe-server --version)" = "oxe-server $STAMP"
./target/release/local-ai-memlat-boot --help | head -n 1
- name: Package usr/bin, licences and README.txt
env:
VERSION: ${{ steps.v.outputs.file_version }}
DIST: ${{ github.workspace }}/dist
TARGET: ${{ github.workspace }}/target
run: tools/ci/package.sh oxe "$VERSION" "$DIST" "$TARGET" oxe oxe-server local-ai-memlat-boot
- name: SHA256SUMS
working-directory: dist
run: |
set -euo pipefail
n=$(find . -maxdepth 1 -name '*.tar.gz' | wc -l)
test "$n" -eq 1
rm -f ./*.tar.gz.sha256
# Bare file names: consumers (tools/lab/dev-update.sh) match them by asset name.
sha256sum -- *.tar.gz > SHA256SUMS
sha256sum -c SHA256SUMS
cat SHA256SUMS
- uses: actions/cache/save@caa296126883cff596d87d8935842f9db880ef25 # v5
# Only main seeds caches: a tag or PR ref cannot share its cache.
if: github.ref == 'refs/heads/main' && steps.rust-cache.outputs.cache-matched-key != format('{0}main', steps.rust-key.outputs.prefix)
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ steps.rust-key.outputs.prefix }}main
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: oxe-linux-aarch64
path: dist/
if-no-files-found: error
retention-days: 7
116 changes: 116 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
name: release
# Tagged release: builds the linux-aarch64 tarball (release-build.yml), writes SHA256SUMS,
# generates build provenance (actions/attest-build-provenance) and creates the GitHub Release.
# No secrets: the job token only. Only the release job holds write permissions and the "release"
# environment, which must be protected in the repository settings (required reviewer, deployment
# tag v*), together with a tag ruleset that limits who may create v* tags.
on:
push:
tags: ["v*"]

permissions:
contents: read

concurrency:
group: release-${{ github.ref }}
cancel-in-progress: false

defaults:
run:
shell: bash

jobs:
version:
runs-on: ubuntu-latest
timeout-minutes: 5
outputs:
version: ${{ steps.v.outputs.version }}
file_version: ${{ steps.v.outputs.file_version }}
steps:
- id: v
env:
REF_NAME: ${{ github.ref_name }}
run: |
v=$REF_NAME
re='^v[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.]+)?$'
if ! [[ $v =~ $re ]]; then echo "bad version string: $v" >&2; exit 1; fi
echo "version=$v" >> "$GITHUB_OUTPUT"
echo "file_version=$v" >> "$GITHUB_OUTPUT"

build:
needs: version
uses: ./.github/workflows/release-build.yml
with:
version: ${{ needs.version.outputs.version }}
file_version: ${{ needs.version.outputs.file_version }}

release:
needs: [version, build]
if: github.ref_type == 'tag'
runs-on: ubuntu-latest
timeout-minutes: 20
# Protect this environment in the repository settings (see the header).
environment: release
permissions:
contents: write # create the release and upload its assets
id-token: write # sign the provenance (Sigstore)
attestations: write # store the attestation
env:
TAG: ${{ needs.version.outputs.version }}
FILE_VERSION: ${{ needs.version.outputs.file_version }}
steps:
- name: Refuse a release without provenance
# Artifact attestations need a public repository on GitHub Free/Pro: a release without
# one is not made from a private repository.
if: github.event.repository.private
run: |
echo "::error::release only from the public repository (no build provenance in a private one)"
exit 1
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: oxe-linux-aarch64
path: dist
- name: Build provenance
id: provenance
uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2
with:
subject-path: |
dist/*.tar.gz
dist/SHA256SUMS
- name: Keep the attestation with the assets
env:
BUNDLE: ${{ steps.provenance.outputs.bundle-path }}
run: cp "$BUNDLE" "dist/oxe-$FILE_VERSION.provenance.jsonl"
- name: Create the GitHub Release
env:
GH_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
{
echo "Built by GitHub Actions from \`$TAG\` (commit $GITHUB_SHA) in [run $GITHUB_RUN_ID]($GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID); nobody uploads binaries by hand."
echo
echo "Linux aarch64, for ARMv8.6-A cores with dotprod, i8mm, fp16 and bf16 (measured on the Snapdragon X Elite X1E80100 only); glibc requirement and toolchain in the tarball's README.txt."
echo
echo "| File | Contents |"
echo "|---|---|"
echo "| \`oxe-$TAG-linux-aarch64.tar.gz\` | \`usr/bin/oxe\`, \`usr/bin/oxe-server\` and \`usr/bin/local-ai-memlat-boot\`, with licences and README.txt |"
echo "| \`SHA256SUMS\` | the tarball's SHA-256 |"
echo "| \`oxe-$FILE_VERSION.provenance.jsonl\` | the Sigstore attestation bundle for both files |"
echo
echo "The Flash engine (\`oxe-server --engine flash\`) is not in these binaries: its production ggml archive is not in the source repository (https://github.com/$GITHUB_REPOSITORY/issues/7)."
echo
echo "Verify:"
echo
echo '```sh'
echo "sha256sum -c SHA256SUMS"
echo "gh attestation verify oxe-$TAG-linux-aarch64.tar.gz --repo $GITHUB_REPOSITORY \\"
echo " --signer-workflow $GITHUB_REPOSITORY/.github/workflows/release.yml"
echo '```'
echo
echo "No model weights are included."
} > notes.md
opts=()
case $TAG in *-*) opts+=(--prerelease);; esac
gh release create "$TAG" dist/*.tar.gz dist/SHA256SUMS dist/*.provenance.jsonl \
--repo "$GITHUB_REPOSITORY" --verify-tag --title "oxe $TAG" --notes-file notes.md \
${opts[@]+"${opts[@]}"}
Loading