solstice-ci/.mise/tasks/build/runner-cross
Till Wegmueller 0b54881558
Add support for multi-OS VM builds with cross-built runners and improved local development tooling
This commit introduces:
- Flexible runner URL configuration via `SOLSTICE_RUNNER_URL(S)` for cloud-init.
- Automated detection of OS-specific runner binaries during VM boot.
- Tasks for cross-building, serving, and orchestrating Solstice runners.
- End-to-end VM build flows for Linux and Illumos environments.
- Enhanced orchestration with multi-runner HTTP serving and log streaming.
2025-11-01 14:31:48 +01:00

24 lines
896 B
Bash
Executable file

#!/usr/bin/env bash
set -euo pipefail
# Cross-build the workflow-runner for Linux and Illumos targets.
# Requires: cross (https://github.com/cross-rs/cross)
# Outputs:
# - target/x86_64-unknown-linux-gnu/release/solstice-runner
# - target/x86_64-unknown-illumos/release/solstice-runner
ROOT_DIR=$(cd "$(dirname "$0")/../../.." && pwd)
cd "$ROOT_DIR"
if ! command -v cross >/dev/null 2>&1; then
echo "cross is required. Install with: cargo install cross" >&2
exit 127
fi
# Build Linux runner
cross build -p workflow-runner --target x86_64-unknown-linux-gnu --release
# Build Illumos runner
cross build -p workflow-runner --target x86_64-unknown-illumos --release
echo "Built runner binaries:" >&2
ls -l "${ROOT_DIR}/target/x86_64-unknown-linux-gnu/release/solstice-runner" 2>/dev/null || true
ls -l "${ROOT_DIR}/target/x86_64-unknown-illumos/release/solstice-runner" 2>/dev/null || true