Skip to content

Commit

Permalink
chore: support windows build (#262)
Browse files Browse the repository at this point in the history
  • Loading branch information
joway authored Jun 14, 2023
1 parent df3857e commit 35639d2
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
18 changes: 17 additions & 1 deletion .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
compatibility-test:
strategy:
matrix:
go: [ 1.15, 1.19 ]
go: [ 1.15, "1.20" ]
os: [ X64, ARM64 ]
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -25,6 +25,22 @@ jobs:
run: go test -v -race -covermode=atomic -coverprofile=coverage.out ./...
- name: Benchmark
run: go test -bench=. -benchmem -run=none ./...
windows-test:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.20"
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Build Test
run: go vet -v ./...
style-test:
runs-on: ubuntu-latest
steps:
Expand Down
3 changes: 3 additions & 0 deletions net_io.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.

//go:build darwin || netbsd || freebsd || openbsd || dragonfly || linux
// +build darwin netbsd freebsd openbsd dragonfly linux

package netpoll

import "syscall"
Expand Down
3 changes: 3 additions & 0 deletions poll_default.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.

//go:build darwin || netbsd || freebsd || openbsd || dragonfly || linux
// +build darwin netbsd freebsd openbsd dragonfly linux

package netpoll

func (p *defaultPoll) Alloc() (operator *FDOperator) {
Expand Down

0 comments on commit 35639d2

Please sign in to comment.