@@ -13,9 +13,17 @@ concurrency:
13
13
14
14
jobs :
15
15
build-windows :
16
- runs-on : windows-2022
16
+ runs-on : ${{ matrix.image }}
17
17
outputs :
18
18
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
19
27
steps :
20
28
- name : Configure pagefile
21
29
uses : al-cheb/configure-pagefile-action@v1.4
72
80
uses : actions/cache/restore@v4
73
81
id : cache-llvm-build
74
82
with :
75
- key : llvm-build-19-windows-v1
83
+ key : llvm-build-19-windows-${{ matrix.goarch }}- v1
76
84
path : llvm-build
77
85
- name : Build LLVM
78
86
if : steps.cache-llvm-build.outputs.cache-hit != 'true'
94
102
- name : Cache Go cache
95
103
uses : actions/cache@v4
96
104
with :
97
- key : go-cache-windows-v1-${{ hashFiles('go.mod') }}
105
+ key : go-cache-windows-${{ matrix.goarch }}- v1-${{ hashFiles('go.mod') }}
98
106
path : |
99
107
C:/Users/runneradmin/AppData/Local/go-build
100
108
C:/Users/runneradmin/go/pkg/mod
@@ -105,14 +113,15 @@ jobs:
105
113
run : make -j3 gen-device
106
114
- name : Test TinyGo
107
115
shell : bash
116
+ if : matrix.goarch == 'amd64' # skip on ARM64 to speed up build
108
117
run : make test GOTESTFLAGS="-only-current-os"
109
118
- name : Build TinyGo release tarball
110
119
shell : bash
111
120
run : make build/release -j4
112
121
- name : Make release artifact
113
122
shell : bash
114
123
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
116
125
- name : Publish release artifact
117
126
# Note: this release artifact is double-zipped, see:
118
127
# https://github.com/actions/upload-artifact/issues/39
@@ -122,8 +131,8 @@ jobs:
122
131
# We're doing the former here, to keep artifact uploads fast.
123
132
uses : actions/upload-artifact@v4
124
133
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
127
136
128
137
smoke-test-windows :
129
138
runs-on : windows-2022
0 commit comments