From bff851e48d324db8f7c80f8a74e369bf7e6e634c Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Mon, 3 Aug 2026 00:50:25 -0700 Subject: [PATCH] ci: cross-compile for windows Nothing caught the unix-only constants creeping into weed/mount until a release build failed. --- .github/workflows/go.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index d55ce50a6..3bf43744f 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -75,6 +75,21 @@ jobs: - name: Build run: cd weed; go build -tags "elastic gocdk sqlite ydb tarantool tikv rclone" -v . + build-windows: + name: Build windows + runs-on: ubuntu-latest + steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v7 + - name: Set up Go + uses: actions/setup-go@v7 + with: + go-version-file: 'go.mod' + # weed/mount builds here but cannot mount yet. Without this the unix-only + # syscall constants it needs creep back in unnoticed. + - name: Build windows/amd64 + run: GOOS=windows GOARCH=amd64 go build ./weed/... + test: name: Test runs-on: ubuntu-latest