Files
leleka/.github/workflows/linux.yml
T

79 lines
2.7 KiB
YAML

name: Linux
on:
push:
branches: [main]
tags: ['v*']
pull_request:
workflow_dispatch:
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++
- 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
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
- 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
cd dist
sha256sum strata-next-linux-x86_64-musl > SHA256SUMS
- name: Static CLI model smoke
run: python3 scripts/smoke-static-cli.py control-plane/target/x86_64-unknown-linux-musl/release/strata-next
- 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 \
--repo "${GITHUB_REPOSITORY}" --title "Strata Next ${GITHUB_REF_NAME}" \
--notes 'CLI/control-plane preview. CUDA engine and model files are not included.' --prerelease