Skip to content

Commit 1762476

Browse files
committed
ci: add Windows ARM64 build
1 parent 3869f76 commit 1762476

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

.github/workflows/windows.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,17 @@ concurrency:
1313

1414
jobs:
1515
build-windows:
16-
runs-on: windows-2022
16+
runs-on: ${{ matrix.image }}
1717
outputs:
1818
version: ${{ steps.version.outputs.version }}
19+
strategy:
20+
matrix:
21+
goarch: [ amd64, arm64 ]
22+
include:
23+
- goarch: amd64
24+
image: windows-2022
25+
- goarch: arm64
26+
image: windows-11-arm
1927
steps:
2028
- name: Configure pagefile
2129
uses: al-cheb/configure-pagefile-action@v1.4
@@ -72,7 +80,7 @@ jobs:
7280
uses: actions/cache/restore@v4
7381
id: cache-llvm-build
7482
with:
75-
key: llvm-build-19-windows-v1
83+
key: llvm-build-19-windows-${{ matrix.goarch }}-v1
7684
path: llvm-build
7785
- name: Build LLVM
7886
if: steps.cache-llvm-build.outputs.cache-hit != 'true'
@@ -94,7 +102,7 @@ jobs:
94102
- name: Cache Go cache
95103
uses: actions/cache@v4
96104
with:
97-
key: go-cache-windows-v1-${{ hashFiles('go.mod') }}
105+
key: go-cache-windows-${{ matrix.goarch }}-v1-${{ hashFiles('go.mod') }}
98106
path: |
99107
C:/Users/runneradmin/AppData/Local/go-build
100108
C:/Users/runneradmin/go/pkg/mod
@@ -105,14 +113,15 @@ jobs:
105113
run: make -j3 gen-device
106114
- name: Test TinyGo
107115
shell: bash
116+
if: matrix.goarch == 'amd64' # skip on ARM64 to speed up build
108117
run: make test GOTESTFLAGS="-only-current-os"
109118
- name: Build TinyGo release tarball
110119
shell: bash
111120
run: make build/release -j4
112121
- name: Make release artifact
113122
shell: bash
114123
working-directory: build/release
115-
run: 7z -tzip a tinygo${{ steps.version.outputs.version }}.windows-amd64.zip tinygo
124+
run: 7z -tzip a tinygo${{ steps.version.outputs.version }}.windows-${{ matrix.goarch }}.zip tinygo
116125
- name: Publish release artifact
117126
# Note: this release artifact is double-zipped, see:
118127
# https://github.com/actions/upload-artifact/issues/39
@@ -122,8 +131,8 @@ jobs:
122131
# We're doing the former here, to keep artifact uploads fast.
123132
uses: actions/upload-artifact@v4
124133
with:
125-
name: windows-amd64-double-zipped-${{ steps.version.outputs.version }}
126-
path: build/release/tinygo${{ steps.version.outputs.version }}.windows-amd64.zip
134+
name: windows-${{ matrix.goarch }}-double-zipped-${{ steps.version.outputs.version }}
135+
path: build/release/tinygo${{ steps.version.outputs.version }}.windows-${{ matrix.goarch }}.zip
127136

128137
smoke-test-windows:
129138
runs-on: windows-2022

0 commit comments

Comments
 (0)