Compare commits

...

1 Commits

Author SHA1 Message Date
Ayke van Laethem ec9e041a40 ci: use native arm64 builder for arm64 binaries 2025-11-09 09:41:06 +01:00
+18 -13
View File
@@ -16,7 +16,15 @@ jobs:
# Build Linux binaries, ready for release. # Build Linux binaries, ready for release.
# This runs inside an Alpine Linux container so we can more easily create a # This runs inside an Alpine Linux container so we can more easily create a
# statically linked binary. # statically linked binary.
runs-on: ubuntu-latest strategy:
matrix:
goarch: [ amd64, arm64 ]
include:
- goarch: amd64
os: ubuntu-latest
- goarch: arm64
os: ubuntu-24.04-arm # TODO: use a -latest variant?
runs-on: ${{ matrix.os }}
container: container:
image: golang:1.25-alpine image: golang:1.25-alpine
outputs: outputs:
@@ -40,7 +48,7 @@ jobs:
- name: Cache Go - name: Cache Go
uses: actions/cache@v4 uses: actions/cache@v4
with: with:
key: go-cache-linux-alpine-v1-${{ hashFiles('go.mod') }} key: go-cache-linux-alpine-${{ matrix.goarch }}-v1-${{ hashFiles('go.mod') }}
path: | path: |
~/.cache/go-build ~/.cache/go-build
~/go/pkg/mod ~/go/pkg/mod
@@ -73,7 +81,7 @@ jobs:
uses: actions/cache/restore@v4 uses: actions/cache/restore@v4
id: cache-llvm-build id: cache-llvm-build
with: with:
key: llvm-build-20-linux-alpine-v1 key: llvm-build-19-linux-alpine-${{ matrix.goarch }}-v1
path: llvm-build path: llvm-build
- name: Build LLVM - name: Build LLVM
if: steps.cache-llvm-build.outputs.cache-hit != 'true' if: steps.cache-llvm-build.outputs.cache-hit != 'true'
@@ -97,7 +105,7 @@ jobs:
uses: actions/cache@v4 uses: actions/cache@v4
id: cache-binaryen id: cache-binaryen
with: with:
key: binaryen-linux-alpine-v1 key: binaryen-linux-alpine-${{ matrix.goarch }}-v1
path: build/wasm-opt path: build/wasm-opt
- name: Build Binaryen - name: Build Binaryen
if: steps.cache-binaryen.outputs.cache-hit != 'true' if: steps.cache-binaryen.outputs.cache-hit != 'true'
@@ -116,15 +124,15 @@ jobs:
- name: Build TinyGo release - name: Build TinyGo release
run: | run: |
make release deb -j3 STATIC=1 make release deb -j3 STATIC=1
cp -p build/release.tar.gz /tmp/tinygo${{ steps.version.outputs.version }}.linux-amd64.tar.gz cp -p build/release.tar.gz /tmp/tinygo${{ steps.version.outputs.version }}.linux-${{ matrix.goarch }}.tar.gz
cp -p build/release.deb /tmp/tinygo_${{ steps.version.outputs.version }}_amd64.deb cp -p build/release.deb /tmp/tinygo_${{ steps.version.outputs.version }}_${{ matrix.goarch }}.deb
- name: Publish release artifact - name: Publish release artifact
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: linux-amd64-double-zipped-${{ steps.version.outputs.version }} name: linux-${{ matrix.goarch }}-double-zipped-${{ steps.version.outputs.version }}
path: | path: |
/tmp/tinygo${{ steps.version.outputs.version }}.linux-amd64.tar.gz /tmp/tinygo${{ steps.version.outputs.version }}.linux-${{ matrix.goarch }}.tar.gz
/tmp/tinygo_${{ steps.version.outputs.version }}_amd64.deb /tmp/tinygo_${{ steps.version.outputs.version }}-${{ matrix.goarch }}.deb
test-linux-build: test-linux-build:
# Test the binaries built in the build-linux job by running the smoke tests. # Test the binaries built in the build-linux job by running the smoke tests.
runs-on: ubuntu-latest runs-on: ubuntu-latest
@@ -272,11 +280,8 @@ jobs:
# part of the release tarball. # part of the release tarball.
strategy: strategy:
matrix: matrix:
goarch: [ arm, arm64 ] goarch: [ arm ]
include: include:
- goarch: arm64
toolchain: aarch64-linux-gnu
libc: arm64
- goarch: arm - goarch: arm
toolchain: arm-linux-gnueabihf toolchain: arm-linux-gnueabihf
libc: armhf libc: armhf