Skip to content

Commit 86e5320

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

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

.github/workflows/windows.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ jobs:
1616
runs-on: windows-2022
1717
outputs:
1818
version: ${{ steps.version.outputs.version }}
19+
strategy:
20+
matrix:
21+
goarch: [ amd64, arm64 ]
1922
steps:
2023
- name: Configure pagefile
2124
uses: al-cheb/configure-pagefile-action@v1.4
@@ -72,7 +75,7 @@ jobs:
7275
uses: actions/cache/restore@v4
7376
id: cache-llvm-build
7477
with:
75-
key: llvm-build-19-windows-v1
78+
key: llvm-build-19-windows-${{ matrix.goarch }}-v1
7679
path: llvm-build
7780
- name: Build LLVM
7881
if: steps.cache-llvm-build.outputs.cache-hit != 'true'
@@ -94,7 +97,7 @@ jobs:
9497
- name: Cache Go cache
9598
uses: actions/cache@v4
9699
with:
97-
key: go-cache-windows-v1-${{ hashFiles('go.mod') }}
100+
key: go-cache-windows-${{ matrix.goarch }}-v1-${{ hashFiles('go.mod') }}
98101
path: |
99102
C:/Users/runneradmin/AppData/Local/go-build
100103
C:/Users/runneradmin/go/pkg/mod
@@ -105,14 +108,15 @@ jobs:
105108
run: make -j3 gen-device
106109
- name: Test TinyGo
107110
shell: bash
111+
if: matrix.goarch == 'amd64' # skip on ARM64 to speed up build
108112
run: make test GOTESTFLAGS="-only-current-os"
109113
- name: Build TinyGo release tarball
110114
shell: bash
111115
run: make build/release -j4
112116
- name: Make release artifact
113117
shell: bash
114118
working-directory: build/release
115-
run: 7z -tzip a tinygo${{ steps.version.outputs.version }}.windows-amd64.zip tinygo
119+
run: 7z -tzip a tinygo${{ steps.version.outputs.version }}.windows-${{ matrix.goarch }}.zip tinygo
116120
- name: Publish release artifact
117121
# Note: this release artifact is double-zipped, see:
118122
# https://github.com/actions/upload-artifact/issues/39
@@ -122,8 +126,8 @@ jobs:
122126
# We're doing the former here, to keep artifact uploads fast.
123127
uses: actions/upload-artifact@v4
124128
with:
125-
name: windows-amd64-double-zipped-${{ steps.version.outputs.version }}
126-
path: build/release/tinygo${{ steps.version.outputs.version }}.windows-amd64.zip
129+
name: windows-${{ matrix.goarch }}-double-zipped-${{ steps.version.outputs.version }}
130+
path: build/release/tinygo${{ steps.version.outputs.version }}.windows-${{ matrix.goarch }}.zip
127131

128132
smoke-test-windows:
129133
runs-on: windows-2022

0 commit comments

Comments
 (0)