From df004dfb8d512b8c1b4309c9acbc8cb05b9b6855 Mon Sep 17 00:00:00 2001 From: Cosmos Nicolaou Date: Sun, 5 Feb 2023 15:54:10 -0800 Subject: [PATCH 1/5] . --- .github/workflows/windows.yml | 55 +++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/windows.yml diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml new file mode 100644 index 00000000..af1d027e --- /dev/null +++ b/.github/workflows/windows.yml @@ -0,0 +1,55 @@ +name: linux + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + test: + strategy: + matrix: + go-version: [1.20.x] + os: [windows-latest] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version: ${{ matrix.go-version }} + cache: true + + - name: Install tools + run: | + go install golang.org/x/tools/cmd/goimports@latest + + - name: Test + run: | + export VDLPATH=$GITHUB_WORKSPACE + go test --race --covermode=atomic --timeout=15m ./... + cd x/ref/examples + go test --race --covermode=atomic ./... + + integration-tests: + runs-on: windows-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version: 1.20.x + cache: true + + - name: Install openssl + run: | + choco install openssl + + - name: Test + run: | + make test-integration test-openssl-integration From 37f7877fa809b0fdc70fc479ca06f0e1ede34984 Mon Sep 17 00:00:00 2001 From: Cosmos Nicolaou Date: Sun, 5 Feb 2023 15:54:39 -0800 Subject: [PATCH 2/5] . --- .github/workflows/windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index af1d027e..091c1703 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -1,4 +1,4 @@ -name: linux +name: windows on: push: From a9504a63ad2ce9fb48c2cd8479856c5004eec5a4 Mon Sep 17 00:00:00 2001 From: Cosmos Nicolaou Date: Sun, 5 Feb 2023 15:59:00 -0800 Subject: [PATCH 3/5] . --- .github/workflows/windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 091c1703..46d14e0e 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -29,7 +29,7 @@ jobs: - name: Test run: | - export VDLPATH=$GITHUB_WORKSPACE + $Env:VDLPATH=$Env:GITHUB_WORKSPACE go test --race --covermode=atomic --timeout=15m ./... cd x/ref/examples go test --race --covermode=atomic ./... From 72934380372534e85942e47012e1f94248a82e19 Mon Sep 17 00:00:00 2001 From: Cosmos Nicolaou Date: Sun, 5 Feb 2023 16:15:18 -0800 Subject: [PATCH 4/5] . --- .../security/internal/lockedfile/filelock/filelock_windows.go | 2 +- x/ref/runtime/factories/roaming/roaming.go | 4 ++-- x/ref/runtime/factories/static/static.go | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/x/ref/lib/security/internal/lockedfile/filelock/filelock_windows.go b/x/ref/lib/security/internal/lockedfile/filelock/filelock_windows.go index 4a948729..8c4975c0 100644 --- a/x/ref/lib/security/internal/lockedfile/filelock/filelock_windows.go +++ b/x/ref/lib/security/internal/lockedfile/filelock/filelock_windows.go @@ -8,7 +8,7 @@ package filelock import ( - "internal/syscall/windows" + "golang.org/x/sys/windows" "os" "syscall" ) diff --git a/x/ref/runtime/factories/roaming/roaming.go b/x/ref/runtime/factories/roaming/roaming.go index a7bc9574..6fc978a9 100644 --- a/x/ref/runtime/factories/roaming/roaming.go +++ b/x/ref/runtime/factories/roaming/roaming.go @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build linux || darwin -// +build linux darwin +//go:build linux || darwin || windows +// +build linux darwin windows // Package roaming implements a RuntimeFactory suitable for a variety of network // configurations, including 1-1 NATs, dhcp auto-configuration, Amazon Web diff --git a/x/ref/runtime/factories/static/static.go b/x/ref/runtime/factories/static/static.go index 45fa2a17..356e6d5b 100644 --- a/x/ref/runtime/factories/static/static.go +++ b/x/ref/runtime/factories/static/static.go @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build linux || darwin -// +build linux darwin +//go:build linux || darwin || windows +// +build linux darwin windows // Package static implements a RuntimeFactory suitable for a variety of network // configurations, including 1-1 NATs, Amazon Web Services and Google Compute From a8bd439ecb2759c1f341a6659146ea4010630ef6 Mon Sep 17 00:00:00 2001 From: Cosmos Nicolaou Date: Sun, 5 Feb 2023 16:16:56 -0800 Subject: [PATCH 5/5] . --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 6766f9ac..18e41d39 100644 --- a/go.mod +++ b/go.mod @@ -13,6 +13,7 @@ require ( golang.org/x/mod v0.7.0 golang.org/x/net v0.5.0 golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 + golang.org/x/sys v0.4.0 golang.org/x/term v0.4.0 golang.org/x/text v0.6.0 v.io/x/lib v0.1.13 @@ -28,7 +29,6 @@ require ( github.com/tklauser/go-sysconf v0.3.11 // indirect github.com/tklauser/numcpus v0.6.0 // indirect github.com/yusufpapurcu/wmi v1.2.2 // indirect - golang.org/x/sys v0.4.0 // indirect ) replace v.io/x/ref/lib/flags/sitedefaults => ./x/ref/lib/flags/sitedefaults