Add attic-client (s390x) and geesefs to flake-hub, rewrite CI in xonsh

Move attic-client s390x cross-compilation from building/s390x/attic-client-s390x
and geesefs from building/s390x/geesefs-s390x into flake-hub. Replace ci/build.sh
with ci/build.xsh. All packages now built and pushed to attic via the existing
Woodpecker pipeline on push to main.
This commit is contained in:
Oleks
2026-03-15 13:09:05 +02:00
parent 776a0e23ea
commit 49fd58b363
5 changed files with 135 additions and 26 deletions
-22
View File
@@ -1,22 +0,0 @@
#!/bin/sh
# Build all flake-hub packages and push to attic
set -e
ARCH="$1"
ATTIC_CACHE="attic-infra-cache-k3s-1"
ATTIC_SERVER="https://nix-cache-upload.oleks.space"
echo "=== Building flake-hub packages for ${ARCH} ==="
# Setup attic
attic=$(nix build --inputs-from . nixpkgs#attic-client --print-out-paths --no-link)/bin/attic
"${attic}" login ci "${ATTIC_SERVER}" "${ATTIC_TOKEN}"
echo "Building packages..."
out=$(nix build ".#packages.${ARCH}.hello-world" --print-build-logs --print-out-paths --no-link)
"${attic}" push "${ATTIC_CACHE}" "${out}"
out=$(nix build ".#packages.${ARCH}.xonsh" --print-build-logs --print-out-paths --no-link)
"${attic}" push "${ATTIC_CACHE}" "${out}"
echo "✅ Build completed for ${ARCH}"
+29
View File
@@ -0,0 +1,29 @@
#!/usr/bin/env xonsh
"""Build all flake-hub packages and push to attic."""
import sys
ARCH = sys.argv[1]
ATTIC_CACHE = "attic-infra-cache-k3s-1"
ATTIC_SERVER = "https://nix-cache-upload.oleks.space"
print(f"=== Building flake-hub packages for {ARCH} ===")
# Setup attic
attic = $(nix build --inputs-from . nixpkgs#attic-client --print-out-paths --no-link).strip() + "/bin/attic"
@(attic) login ci @(ATTIC_SERVER) $ATTIC_TOKEN
# Common packages (all arches)
packages = ["hello-world", "geesefs", "xonsh"]
# Cross-only packages
if ARCH == "s390x-linux":
packages += ["attic-client"]
print("Building packages...")
for pkg in packages:
print(f"--- {pkg} ---")
out = $(nix build @(f".#packages.{ARCH}.{pkg}") --print-build-logs --print-out-paths --no-link).strip()
@(attic) push @(ATTIC_CACHE) @(out)
print(f"Build completed for {ARCH}")