solstice-ci/.solstice/setup-illumos.sh
Till Wegmueller 08eb82d7f7
Introduce GNU tar (gtar) support and workflow setup enhancements; bump version to 0.1.16
- Add detection and usage of GNU `tar` for platforms where BSD `tar` is incompatible with required options.
- Refactor `job.sh` to delegate all environment setup to newly introduced per-OS setup scripts.
- Add initial support for workflow setups via `workflow.kdl`, running pre-defined setup scripts before executing workflow steps.
- Integrate step-wise execution and logging for workflows, with structured NDJSON output for detailed traceability.
- Increment orchestrator version to 0.1.16.

Signed-off-by: Till Wegmueller <toasterson@gmail.com>
2025-11-18 15:17:03 +01:00

48 lines
1.5 KiB
Bash

#!/usr/bin/env bash
set -euo pipefail
# Solstice CI per-OS environment prepare (illumos / SunOS)
# Installs baseline tools (curl, git, gtar, compilers, rust) where possible.
log() { printf "[setup-illumos] %s\n" "$*" >&2; }
install_packages() {
if command -v pkg >/dev/null 2>&1; then
# OpenIndiana / IPS
sudo pkg refresh || true
# Prefer GNU tar (gtar) to match runner expectations
sudo pkg install -v \
web/curl \
developer/build/gnu-make \
developer/gcc-13 \
developer/protobuf \
developer/clang \
archiver/gnu-tar \
developer/rustc || true
# CA certs where package exists
sudo pkg install -v web/ca-certificates || true
# mozilla-rootcerts when available
if command -v mozilla-rootcerts >/dev/null 2>&1; then
sudo mozilla-rootcerts install || true
fi
elif command -v pkgin >/dev/null 2>&1; then
# SmartOS/NetBSD pkgin
sudo pkgin -y update || true
sudo pkgin -y install curl gmake gcc protobuf clang gtar rust || true
sudo pkgin -y install mozilla-rootcerts || true
if command -v mozilla-rootcerts >/dev/null 2>&1; then
sudo mozilla-rootcerts install || true
fi
else
log "no known package manager found (pkg/pkgin); skipping installs"
fi
}
main() {
install_packages
# Prefer GNU tar on PATH when available
if command -v gtar >/dev/null 2>&1 && ! command -v tar >/dev/null 2>&1; then
ln -sf "$(command -v gtar)" "$HOME/bin/tar" 2>/dev/null || true
fi
}
main "$@"