feat: build APK packages for x86_64 and aarch64
Uses a matrix strategy with Go cross-compilation (GOARCH + CARCH) so both architectures build in the same amd64 container. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -10,6 +10,14 @@ jobs:
|
|||||||
- ubuntu-24.04
|
- ubuntu-24.04
|
||||||
container:
|
container:
|
||||||
image: alpine:latest
|
image: alpine:latest
|
||||||
|
options: --platform linux/amd64
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- goarch: amd64
|
||||||
|
pkgarch: x86_64
|
||||||
|
- goarch: arm64
|
||||||
|
pkgarch: aarch64
|
||||||
steps:
|
steps:
|
||||||
- name: Install build dependencies
|
- name: Install build dependencies
|
||||||
run: |
|
run: |
|
||||||
@@ -39,6 +47,7 @@ jobs:
|
|||||||
pkgname="axolotl"
|
pkgname="axolotl"
|
||||||
|
|
||||||
sed -i "s/pkgver=.*/pkgver=$pkgver/" packaging/alpine/APKBUILD
|
sed -i "s/pkgver=.*/pkgver=$pkgver/" packaging/alpine/APKBUILD
|
||||||
|
sed -i "s/^arch=.*/arch=\"${{ matrix.pkgarch }}\"/" packaging/alpine/APKBUILD
|
||||||
|
|
||||||
git archive --format=tar.gz --prefix="$pkgname-$pkgver/" -o "packaging/alpine/$pkgname-$pkgver.tar.gz" HEAD
|
git archive --format=tar.gz --prefix="$pkgname-$pkgver/" -o "packaging/alpine/$pkgname-$pkgver.tar.gz" HEAD
|
||||||
|
|
||||||
@@ -49,7 +58,7 @@ jobs:
|
|||||||
run: su build -c "cd $PWD/packaging/alpine && abuild checksum"
|
run: su build -c "cd $PWD/packaging/alpine && abuild checksum"
|
||||||
|
|
||||||
- name: Build package
|
- name: Build package
|
||||||
run: su build -c "cd $PWD/packaging/alpine && abuild -r"
|
run: su build -c "cd $PWD/packaging/alpine && GOARCH=${{ matrix.goarch }} CARCH=${{ matrix.pkgarch }} abuild -r"
|
||||||
|
|
||||||
- name: Publish to Gitea Registry
|
- name: Publish to Gitea Registry
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user