Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 15 additions & 6 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,17 @@ concurrency:

jobs:
build-windows:
runs-on: windows-2022
runs-on: ${{ matrix.image }}
outputs:
version: ${{ steps.version.outputs.version }}
strategy:
matrix:
goarch: [ amd64, arm64 ]
include:
- goarch: amd64
image: windows-2022
- goarch: arm64
image: windows-11-arm
steps:
- name: Configure pagefile
uses: al-cheb/[email protected]
Expand Down Expand Up @@ -72,7 +80,7 @@ jobs:
uses: actions/cache/restore@v4
id: cache-llvm-build
with:
key: llvm-build-19-windows-v1
key: llvm-build-19-windows-${{ matrix.goarch }}-v1
path: llvm-build
- name: Build LLVM
if: steps.cache-llvm-build.outputs.cache-hit != 'true'
Expand All @@ -94,7 +102,7 @@ jobs:
- name: Cache Go cache
uses: actions/cache@v4
with:
key: go-cache-windows-v1-${{ hashFiles('go.mod') }}
key: go-cache-windows-${{ matrix.goarch }}-v1-${{ hashFiles('go.mod') }}
path: |
C:/Users/runneradmin/AppData/Local/go-build
C:/Users/runneradmin/go/pkg/mod
Expand All @@ -105,14 +113,15 @@ jobs:
run: make -j3 gen-device
- name: Test TinyGo
shell: bash
if: matrix.goarch == 'amd64' # skip on ARM64 to speed up build
run: make test GOTESTFLAGS="-only-current-os"
- name: Build TinyGo release tarball
shell: bash
run: make build/release -j4
- name: Make release artifact
shell: bash
working-directory: build/release
run: 7z -tzip a tinygo${{ steps.version.outputs.version }}.windows-amd64.zip tinygo
run: 7z -tzip a tinygo${{ steps.version.outputs.version }}.windows-${{ matrix.goarch }}.zip tinygo
- name: Publish release artifact
# Note: this release artifact is double-zipped, see:
# https://github.com/actions/upload-artifact/issues/39
Expand All @@ -122,8 +131,8 @@ jobs:
# We're doing the former here, to keep artifact uploads fast.
uses: actions/upload-artifact@v4
with:
name: windows-amd64-double-zipped-${{ steps.version.outputs.version }}
path: build/release/tinygo${{ steps.version.outputs.version }}.windows-amd64.zip
name: windows-${{ matrix.goarch }}-double-zipped-${{ steps.version.outputs.version }}
path: build/release/tinygo${{ steps.version.outputs.version }}.windows-${{ matrix.goarch }}.zip

smoke-test-windows:
runs-on: windows-2022
Expand Down
Loading