Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e84c09d

Browse filesBrowse files
committed
ci: use native arm64 builder for arm64 binaries
1 parent 17bb1fe commit e84c09d
Copy full SHA for e84c09d

File tree

Expand file treeCollapse file tree

1 file changed

+18
-13
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+18
-13
lines changed

‎.github/workflows/linux.yml

Copy file name to clipboardExpand all lines: .github/workflows/linux.yml
+18-13Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,15 @@ jobs:
1616
# Build Linux binaries, ready for release.
1717
# This runs inside an Alpine Linux container so we can more easily create a
1818
# statically linked binary.
19-
runs-on: ubuntu-latest
19+
strategy:
20+
matrix:
21+
goarch: [ amd64, arm64 ]
22+
include:
23+
- goarch: amd64
24+
os: ubuntu-latest
25+
- goarch: arm64
26+
os: ubuntu-24.04-arm # TODO: use a -latest variant?
27+
runs-on: ${{ matrix.os }}
2028
container:
2129
image: golang:1.23-alpine
2230
outputs:
@@ -40,7 +48,7 @@ jobs:
4048
- name: Cache Go
4149
uses: actions/cache@v4
4250
with:
43-
key: go-cache-linux-alpine-v1-${{ hashFiles('go.mod') }}
51+
key: go-cache-linux-alpine-${{ matrix.goarch }}-v1-${{ hashFiles('go.mod') }}
4452
path: |
4553
~/.cache/go-build
4654
~/go/pkg/mod
@@ -73,7 +81,7 @@ jobs:
7381
uses: actions/cache/restore@v4
7482
id: cache-llvm-build
7583
with:
76-
key: llvm-build-19-linux-alpine-v1
84+
key: llvm-build-19-linux-alpine-${{ matrix.goarch }}-v1
7785
path: llvm-build
7886
- name: Build LLVM
7987
if: steps.cache-llvm-build.outputs.cache-hit != 'true'
@@ -97,7 +105,7 @@ jobs:
97105
uses: actions/cache@v4
98106
id: cache-binaryen
99107
with:
100-
key: binaryen-linux-alpine-v1
108+
key: binaryen-linux-alpine-${{ matrix.goarch }}-v1
101109
path: build/wasm-opt
102110
- name: Build Binaryen
103111
if: steps.cache-binaryen.outputs.cache-hit != 'true'
@@ -125,15 +133,15 @@ jobs:
125133
- name: Build TinyGo release
126134
run: |
127135
make release deb -j3 STATIC=1
128-
cp -p build/release.tar.gz /tmp/tinygo${{ steps.version.outputs.version }}.linux-amd64.tar.gz
129-
cp -p build/release.deb /tmp/tinygo_${{ steps.version.outputs.version }}_amd64.deb
136+
cp -p build/release.tar.gz /tmp/tinygo${{ steps.version.outputs.version }}.linux-${{ matrix.goarch }}.tar.gz
137+
cp -p build/release.deb /tmp/tinygo_${{ steps.version.outputs.version }}_${{ matrix.goarch }}.deb
130138
- name: Publish release artifact
131139
uses: actions/upload-artifact@v4
132140
with:
133-
name: linux-amd64-double-zipped-${{ steps.version.outputs.version }}
141+
name: linux-${{ matrix.goarch }}-double-zipped-${{ steps.version.outputs.version }}
134142
path: |
135-
/tmp/tinygo${{ steps.version.outputs.version }}.linux-amd64.tar.gz
136-
/tmp/tinygo_${{ steps.version.outputs.version }}_amd64.deb
143+
/tmp/tinygo${{ steps.version.outputs.version }}.linux-${{ matrix.goarch }}.tar.gz
144+
/tmp/tinygo_${{ steps.version.outputs.version }}-${{ matrix.goarch }}.deb
137145
test-linux-build:
138146
# Test the binaries built in the build-linux job by running the smoke tests.
139147
runs-on: ubuntu-latest
@@ -289,11 +297,8 @@ jobs:
289297
# part of the release tarball.
290298
strategy:
291299
matrix:
292-
goarch: [ arm, arm64 ]
300+
goarch: [ arm ]
293301
include:
294-
- goarch: arm64
295-
toolchain: aarch64-linux-gnu
296-
libc: arm64
297302
- goarch: arm
298303
toolchain: arm-linux-gnueabihf
299304
libc: armhf

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.