build: assemble verified private Linux runtime packages

This commit is contained in:
Pavlo Ratushnyi
2026-10-04 20:00:48 +02:00
parent 312948e9ef
commit edea410253
5 changed files with 366 additions and 8 deletions
+28 -8
View File
@@ -40,7 +40,7 @@ jobs:
run: scripts/check-keyless-gpu.sh
static-cuda-package:
if: github.event_name == 'workflow_dispatch' && inputs.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:
@@ -51,9 +51,27 @@ jobs:
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 private build intermediates
if: always()
run: rm -rf -- "${RUNNER_TEMP}/strata-static-cuda-${GITHUB_RUN_ID}"
run: rm -rf -- "${RUNNER_TEMP}/strata-static-cuda-${GITHUB_RUN_ID}" "${RUNNER_TEMP}/strata-package-build-${GITHUB_RUN_ID}" "${RUNNER_TEMP}/strata-package-${GITHUB_RUN_ID}"
linux-static-cli:
needs: verify
@@ -134,12 +152,14 @@ jobs:
- name: Embedded CPU worker packaging without GPU
run: |
musl-gcc -O2 -static scripts/fixtures/embedded-worker.c -o "$RUNNER_TEMP/embedded-worker"
export STRATA_EMBED_ENGINE_PATH="$RUNNER_TEMP/embedded-worker"
export STRATA_EMBED_ENGINE_SHA256="$(sha256sum "$STRATA_EMBED_ENGINE_PATH" | cut -d ' ' -f 1)"
export STRATA_EMBED_ENGINE_REVISION="$GITHUB_SHA"
cargo build --manifest-path control-plane/Cargo.toml --locked --release --target x86_64-unknown-linux-musl --bin strata-next
python3 scripts/smoke-embedded-engine.py control-plane/target/x86_64-unknown-linux-musl/release/strata-next "$STRATA_EMBED_ENGINE_PATH"
rm "$STRATA_EMBED_ENGINE_PATH"
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