Skip to content

Commit

Permalink
Updating windows build constraints
Browse files Browse the repository at this point in the history
pkg/guid is not windows specific, as it can run on Linux.
Build constraints on guid_windows and guid_nonwindows are redundant with
file names, but added for consistency.

Added missing build constraints.

Added Ubuntu to test matrix, along with windows 2022.

Signed-off-by: Hamza El-Saawy <hamzaelsaawy@microsoft.com>
  • Loading branch information
helsaawy committed Mar 29, 2022
1 parent 843abba commit b52bba4
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 5 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ on:

jobs:
test:
runs-on: 'windows-2019'
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-2019, windows-2022, ubuntu-latest]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
Expand Down
3 changes: 3 additions & 0 deletions fileinfo_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build windows
// +build windows

package winio

import (
Expand Down
2 changes: 0 additions & 2 deletions pkg/guid/guid.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build windows

// Package guid provides a GUID type. The backing structure for a GUID is
// identical to that used by the golang.org/x/sys/windows GUID type.
// There are two main binary encodings used for a GUID, the big-endian encoding,
Expand Down
1 change: 1 addition & 0 deletions pkg/guid/guid_nonwindows.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !windows
// +build !windows

package guid
Expand Down
2 changes: 0 additions & 2 deletions pkg/guid/guid_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build windows

package guid

import (
Expand Down
3 changes: 3 additions & 0 deletions pkg/guid/guid_windows.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build windows
// +build windows

package guid

import "golang.org/x/sys/windows"
Expand Down
3 changes: 3 additions & 0 deletions reparse.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build windows
// +build windows

package winio

import (
Expand Down

0 comments on commit b52bba4

Please # to comment.