From 87b030780e0edc82a1d48969fd05a0f9a84727f2 Mon Sep 17 00:00:00 2001 From: Sina M <1591639+s1na@users.noreply.github.com> Date: Wed, 22 Apr 2026 12:18:56 +0200 Subject: [PATCH] .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). --- .github/workflows/go.yml | 41 ++++++++++++++++++++++++++++++++++++++++ rlp/rlpgen/gen_test.go | 4 ++++ 2 files changed, 45 insertions(+) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 507057afe5..3e811072ff 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -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 diff --git a/rlp/rlpgen/gen_test.go b/rlp/rlpgen/gen_test.go index 4bfb1b9d25..2e35ef933d 100644 --- a/rlp/rlpgen/gen_test.go +++ b/rlp/rlpgen/gen_test.go @@ -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")