feat: add native linux/arm64 release build step

Install Woodpecker agent as systemd user service on local aarch64 machine
(Fedora Asahi 42). Add build-linux-arm64 step to release pipeline using
platform: linux/arm64 to route to the native arm64 agent. Update upload
step to include artifacts/linux-arm64/ in the release upload loop.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Shaun Arman 2026-03-29 12:44:43 -05:00
parent b1a74e66ee
commit 2c1094fdcb
2 changed files with 32 additions and 11 deletions

View File

@ -1,8 +1,8 @@
---
# Release pipeline — triggered on v* tags
# Agents:
# linux/amd64 → woodpecker_agent (native x86_64)
# linux/arm64 → woodpecker_agent_arm64 (QEMU emulation on x86_64 host)
# linux/amd64 → woodpecker_agent (native x86_64 on 172.0.0.29)
# linux/arm64 → woodpecker-agent.service on sarman's local arm64 machine (native)
# macOS requires a separate Mac runner — not covered here.
clone:
@ -54,6 +54,24 @@ pipeline:
- mkdir -p artifacts/windows-amd64
- find src-tauri/target/$TARGET/release/bundle -name "*.exe" -o -name "*.msi" | xargs -I{} cp {} artifacts/windows-amd64/ 2>/dev/null || true
build-linux-arm64:
image: rust:1.88-slim
platform: linux/arm64
environment:
TARGET: aarch64-unknown-linux-gnu
when:
event: tag
commands:
- apt-get update -qq && apt-get install -y -qq libwebkit2gtk-4.1-dev libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev patchelf pkg-config curl perl
- curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
- apt-get install -y nodejs
- npm ci --legacy-peer-deps
- rustup target add $TARGET
- cargo install tauri-cli --version "^2" --locked
- CI=true cargo tauri build --target $TARGET
- mkdir -p artifacts/linux-arm64
- find src-tauri/target/$TARGET/release/bundle -name "*.deb" -o -name "*.rpm" -o -name "*.AppImage" | xargs -I{} cp {} artifacts/linux-arm64/
upload-release:
image: curlimages/curl:latest
network_mode: gogs_default
@ -78,7 +96,7 @@ pipeline:
echo "Release ID: $RELEASE_ID"
# Upload all available artifacts
for dir in artifacts/linux-amd64 artifacts/windows-amd64; do
for dir in artifacts/linux-amd64 artifacts/linux-arm64 artifacts/windows-amd64; do
[ -d "$dir" ] || continue
for f in "$dir"/*; do
[ -f "$f" ] || continue

View File

@ -11,10 +11,11 @@
### CI Agents
| Container | Platform | Purpose |
|-----------|----------|---------|
| `woodpecker_agent` | `linux/amd64` | Native x86_64 — all test builds + amd64/windows release |
| `woodpecker_agent_arm64` | `linux/arm64` | QEMU emulation on x86_64 host — arm64 release builds |
| Agent | Platform | Host | Purpose |
|-------|----------|------|---------|
| `woodpecker_agent` (Docker) | `linux/amd64` | 172.0.0.29 | Native x86_64 — test builds + amd64/windows release |
| `woodpecker-agent` (systemd) | `linux/arm64` | sarman's local machine | Native aarch64 — arm64 release builds |
| `woodpecker_agent_arm64` (Docker) | `linux/arm64` | 172.0.0.29 | QEMU fallback — kept as backup |
---
@ -64,11 +65,13 @@ pipeline:
```
Pipeline steps:
1. clone → alpine/git with explicit tag fetch + checkout
2. build-linux-amd64 → cargo tauri build (x86_64-unknown-linux-gnu)
2. build-linux-amd64 → cargo tauri build (x86_64-unknown-linux-gnu) [amd64 agent]
→ artifacts/linux-amd64/{.deb, .rpm, .AppImage}
3. build-windows-amd64 → cargo tauri build (x86_64-pc-windows-gnu via mingw-w64)
3. build-windows-amd64 → cargo tauri build (x86_64-pc-windows-gnu) [amd64 agent]
→ artifacts/windows-amd64/{.exe, .msi}
4. upload-release → Create Gogs release + upload all artifacts
4. build-linux-arm64 → cargo tauri build (aarch64-unknown-linux-gnu) [arm64 agent]
→ artifacts/linux-arm64/{.deb, .rpm, .AppImage}
5. upload-release → Create Gogs release + upload all artifacts
```
**Clone override (release.yml):**
@ -98,7 +101,7 @@ environment:
**Artifacts per platform:**
- Linux amd64: `.deb`, `.rpm`, `.AppImage`
- Windows amd64: `.exe` (NSIS installer), `.msi`
- Linux arm64: `.deb`, `.AppImage` (requires arm64 agent or QEMU)
- Linux arm64: `.deb`, `.rpm`, `.AppImage` (native build on local arm64 agent)
**Important:** Artifacts must be written to the **workspace** (relative paths like `artifacts/linux-amd64/`), not to absolute paths like `/artifacts/`. Only the workspace is shared between pipeline steps via Docker volume.