188 lines
9.1 KiB
YAML
188 lines
9.1 KiB
YAML
name: Linux
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
tags: ['v*']
|
|
pull_request:
|
|
workflow_dispatch:
|
|
inputs:
|
|
keyless_gpu:
|
|
description: Run synthetic Keyless CUDA tests on the private GPU runner
|
|
type: boolean
|
|
default: false
|
|
static_cuda_package:
|
|
description: Build and audit static CUDA toolkit linkage on the private Linux runner (no inference)
|
|
type: boolean
|
|
default: false
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
verify:
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install build tools
|
|
run: sudo apt-get update && sudo apt-get install -y cmake ninja-build g++ python3-numpy
|
|
- name: Install pinned Rust
|
|
run: rustup toolchain install 1.99.0 --profile minimal --component rustfmt --component clippy
|
|
- name: Local checks
|
|
run: scripts/check-local.sh
|
|
|
|
keyless-cuda:
|
|
if: github.event_name == 'workflow_dispatch' && inputs.keyless_gpu
|
|
runs-on: [self-hosted, linux, x64, strata-gpu]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Query-routing, streaming and snapshot GPU tests
|
|
run: scripts/check-keyless-gpu.sh
|
|
|
|
static-cuda-package:
|
|
if: github.event_name == 'workflow_dispatch' && inputs.static_cuda_package && github.event.repository.private
|
|
needs: verify
|
|
runs-on: [self-hosted, linux, x64, strata-gpu]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Build and audit engine without GPU inference
|
|
env:
|
|
CUDA_VISIBLE_DEVICES: ''
|
|
BUILD_JOBS: '2'
|
|
STRATA_BUILD_DIR: ${{ runner.temp }}/strata-static-cuda-${{ github.run_id }}
|
|
run: nice -n 10 scripts/build-static-cuda.sh
|
|
- name: Install pinned Rust and musl target
|
|
run: |
|
|
rustup toolchain install 1.99.0 --profile minimal
|
|
rustup target add --toolchain 1.99.0 x86_64-unknown-linux-musl
|
|
command -v musl-gcc
|
|
- name: Assemble combined private package
|
|
run: |
|
|
engine="${RUNNER_TEMP}/strata-static-cuda-${GITHUB_RUN_ID}/strata"
|
|
python3 scripts/build-linux-package.py --engine "$engine" \
|
|
--sha256 "$(sha256sum "$engine" | cut -d ' ' -f 1)" --revision "$GITHUB_SHA" \
|
|
--cargo-target-dir "${RUNNER_TEMP}/strata-package-build-${GITHUB_RUN_ID}" \
|
|
--output "${RUNNER_TEMP}/strata-package-${GITHUB_RUN_ID}"
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: strata-next-static-cuda-preview
|
|
path: ${{ runner.temp }}/strata-package-${{ github.run_id }}/
|
|
if-no-files-found: error
|
|
retention-days: 7
|
|
- name: Remove uploaded package copy
|
|
run: rm -rf -- "${RUNNER_TEMP}/strata-package-${GITHUB_RUN_ID}"
|
|
- name: Remove private build intermediates
|
|
if: always()
|
|
run: rm -rf -- "${RUNNER_TEMP}/strata-static-cuda-${GITHUB_RUN_ID}" "${RUNNER_TEMP}/strata-package-build-${GITHUB_RUN_ID}"
|
|
|
|
linux-static-cli:
|
|
needs: verify
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install musl toolchain
|
|
run: sudo apt-get update && sudo apt-get install -y musl-tools cmake binutils python3-numpy
|
|
- name: Install pinned Rust and target
|
|
run: |
|
|
rustup toolchain install 1.99.0 --profile minimal
|
|
rustup target add --toolchain 1.99.0 x86_64-unknown-linux-musl
|
|
- name: Build static CLI
|
|
run: cargo build --manifest-path control-plane/Cargo.toml --locked --release --target x86_64-unknown-linux-musl --bin strata-next
|
|
- name: Verify ELF and checksum
|
|
run: |
|
|
binary=control-plane/target/x86_64-unknown-linux-musl/release/strata-next
|
|
if readelf -l "$binary" | grep -q INTERP; then
|
|
echo 'ELF has a dynamic interpreter' >&2
|
|
exit 1
|
|
fi
|
|
if readelf -d "$binary" | grep -q NEEDED; then
|
|
echo 'ELF has a dynamic library dependency' >&2
|
|
exit 1
|
|
fi
|
|
"$binary" --version
|
|
mkdir -p dist
|
|
cp "$binary" dist/strata-next-linux-x86_64-musl
|
|
{
|
|
echo "Commit: $GITHUB_SHA"
|
|
echo "Workflow: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID"
|
|
rustc --version
|
|
cargo --version
|
|
musl-gcc --version
|
|
readelf --version
|
|
} > dist/BUILD-PROVENANCE.txt
|
|
{
|
|
readelf -h "$binary"
|
|
readelf -l "$binary"
|
|
readelf -d "$binary"
|
|
} > dist/ELF-AUDIT.txt
|
|
cd dist
|
|
sha256sum strata-next-linux-x86_64-musl BUILD-PROVENANCE.txt ELF-AUDIT.txt > SHA256SUMS
|
|
- name: Static CLI model smoke
|
|
run: python3 scripts/smoke-static-cli.py control-plane/target/x86_64-unknown-linux-musl/release/strata-next
|
|
- name: Engine loader probe before model acquisition
|
|
run: python3 scripts/smoke-engine-probe.py control-plane/target/x86_64-unknown-linux-musl/release/strata-next
|
|
- name: Explicit GPU profile driver policy without GPU
|
|
run: python3 scripts/smoke-gpu-requirement.py control-plane/target/x86_64-unknown-linux-musl/release/strata-next
|
|
- name: Atomic pinned assets before native serving
|
|
run: python3 scripts/smoke-asset-bootstrap.py control-plane/target/x86_64-unknown-linux-musl/release/strata-next
|
|
- name: Native GGUF pack preparation against upstream oracle
|
|
run: python3 scripts/smoke-native-pack.py control-plane/target/x86_64-unknown-linux-musl/release/strata-next
|
|
- name: Native fetch prepare serve and verified offline reuse
|
|
run: python3 scripts/smoke-native-bootstrap.py control-plane/target/x86_64-unknown-linux-musl/release/strata-next
|
|
- name: Native systemd unit syntax and path safety
|
|
run: python3 scripts/smoke-service-unit.py control-plane/target/x86_64-unknown-linux-musl/release/strata-next
|
|
- name: Native deployment configuration without worker launch
|
|
run: python3 scripts/smoke-config-check.py control-plane/target/x86_64-unknown-linux-musl/release/strata-next
|
|
- name: Native API authentication without GPU
|
|
run: python3 scripts/smoke-native-auth.py control-plane/target/x86_64-unknown-linux-musl/release/strata-next
|
|
- name: Native custom text and regex tools without GPU
|
|
run: python3 scripts/smoke-custom-tools.py control-plane/target/x86_64-unknown-linux-musl/release/strata-next
|
|
- name: Native auto/none/required/forced tool policy without GPU
|
|
run: python3 scripts/smoke-tool-policy.py control-plane/target/x86_64-unknown-linux-musl/release/strata-next
|
|
- name: Stored Responses retrieval and deletion without GPU
|
|
run: python3 scripts/smoke-response-history.py control-plane/target/x86_64-unknown-linux-musl/release/strata-next
|
|
- name: Native drain and resume without GPU
|
|
run: python3 scripts/smoke-native-drain.py control-plane/target/x86_64-unknown-linux-musl/release/strata-next
|
|
- name: Native signal shutdown grace without GPU
|
|
run: python3 scripts/smoke-signal-drain.py control-plane/target/x86_64-unknown-linux-musl/release/strata-next
|
|
- name: Native generation deadline and recovery without GPU
|
|
run: python3 scripts/smoke-generation-deadline.py control-plane/target/x86_64-unknown-linux-musl/release/strata-next
|
|
- name: Static CLI HTTP cancellation failure isolation
|
|
run: python3 scripts/smoke-worker-cancel.py control-plane/target/x86_64-unknown-linux-musl/release/strata-next
|
|
- name: Static CLI HTTP crash recovery without request replay
|
|
run: python3 scripts/smoke-worker-cancel.py control-plane/target/x86_64-unknown-linux-musl/release/strata-next --restart
|
|
- name: Embedded CPU worker packaging without GPU
|
|
run: |
|
|
musl-gcc -O2 -static scripts/fixtures/embedded-worker.c -o "$RUNNER_TEMP/embedded-worker"
|
|
python3 scripts/build-linux-package.py --cpu-fixture --engine "$RUNNER_TEMP/embedded-worker" \
|
|
--sha256 "$(sha256sum "$RUNNER_TEMP/embedded-worker" | cut -d ' ' -f 1)" --revision "$GITHUB_SHA" \
|
|
--cargo-target-dir control-plane/target --output "$RUNNER_TEMP/combined-fixture"
|
|
cd "$RUNNER_TEMP/combined-fixture"
|
|
sha256sum -c SHA256SUMS
|
|
cd "$GITHUB_WORKSPACE"
|
|
python3 scripts/smoke-embedded-engine.py "$RUNNER_TEMP/combined-fixture/strata-next-linux-x86_64-musl" "$RUNNER_TEMP/embedded-worker"
|
|
rm "$RUNNER_TEMP/embedded-worker"
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: strata-next-linux-x86_64-musl
|
|
path: dist/
|
|
|
|
release-cli:
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
needs: linux-static-cli
|
|
runs-on: ubuntu-24.04
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- uses: actions/download-artifact@v4
|
|
with:
|
|
name: strata-next-linux-x86_64-musl
|
|
path: dist/
|
|
- name: Publish CLI preview release
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
run: |
|
|
gh release create "${GITHUB_REF_NAME}" dist/strata-next-linux-x86_64-musl dist/SHA256SUMS dist/BUILD-PROVENANCE.txt dist/ELF-AUDIT.txt \
|
|
--repo "${GITHUB_REPOSITORY}" --title "Strata Next ${GITHUB_REF_NAME}" \
|
|
--notes 'CLI/control-plane preview. CUDA engine and model files are not included.' --prerelease
|