.github: add windows runner (#34742)

Difference to Appveyor:

- Missing 386 build. Hit some issue because user-space memory there is
around 2Gbs. Also seems generally extremely niche.
- Not doing the archive step and NSIS installer and uploads (those are
done on the builder).
This commit is contained in:
Sina M 2026-04-22 12:18:56 +02:00 committed by GitHub
parent 6f02965aab
commit 87b030780e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 45 additions and 0 deletions

View file

@ -97,3 +97,44 @@ jobs:
- name: Run tests
run: go run build/ci.go test -p 8
windows:
name: Windows ${{ matrix.arch }}
needs: lint
runs-on: [self-hosted, windows, x64]
strategy:
fail-fast: false
matrix:
include:
- arch: amd64
mingw: 'C:\msys64\mingw64'
test: true
- arch: '386'
mingw: 'C:\msys64\mingw32'
test: false
env:
GETH_MINGW: ${{ matrix.mingw }}
GETH_CC: ${{ matrix.mingw }}\bin\gcc.exe
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.25'
cache: false
- name: Build
shell: cmd
run: |
set PATH=%GETH_MINGW%\bin;%PATH%
go run build/ci.go install -arch ${{ matrix.arch }} -cc %GETH_CC%
- name: Run tests
if: matrix.test
shell: cmd
run: |
set PATH=%GETH_MINGW%\bin;%PATH%
go run build/ci.go test -arch ${{ matrix.arch }} -cc %GETH_CC% -short -p 8

View file

@ -26,6 +26,7 @@ import (
"go/types"
"os"
"path/filepath"
"runtime"
"testing"
)
@ -52,6 +53,9 @@ var tests = []string{"uints", "nil", "rawvalue", "optional", "bigint", "uint256"
func TestOutput(t *testing.T) {
for _, test := range tests {
t.Run(test, func(t *testing.T) {
if test == "pkgclash" && runtime.GOOS == "windows" {
t.Skip("source-based importer is pathologically slow on Windows/NTFS")
}
inputFile := filepath.Join("testdata", test+".in.txt")
outputFile := filepath.Join("testdata", test+".out.txt")
bctx, typ, err := loadTestSource(inputFile, "Test")