Skip to content

Commit

Permalink
add windows builder
Browse files Browse the repository at this point in the history
Add windows builder and move to setup-go@v2 as it
supports adding GOPATH/bin to PATH without quirks.

Signed-off-by: Tobias Kohlbau <tobias@kohlbau.de>
  • Loading branch information
tobiaskohlbau authored and ericchiang committed May 3, 2020
1 parent 14b5dae commit 564f246
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 6 deletions.
27 changes: 22 additions & 5 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ on:

jobs:
build:
name: Build
name: Linux
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.13
uses: actions/setup-go@v1
- name: Set up Go 1.14
uses: actions/setup-go@v2
with:
go-version: 1.13
go-version: '^1.14.2'
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
Expand All @@ -21,4 +21,21 @@ jobs:
- name: Install libpcsc
run: sudo apt-get install -y libpcsclite-dev pcscd pcsc-tools
- name: Test
run: "PATH=$PATH:$( go env GOPATH )/bin make test"
run: "make test"
build-windows:
name: Windows
runs-on: windows-latest
steps:
- name: Set up Go 1.14
uses: actions/setup-go@v2
with:
go-version: '^1.14.2'
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Install golint
run: go get -u golang.org/x/lint/golint
- name: Test
run: "make build"
env:
CGO_ENABLED: 0
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
.PHONY: test
test:
test: lint
go test -v ./...

.PHONY: lint
lint:
golint -set_exit_status ./...

.PHONY: build
build: lint
go build ./...
2 changes: 2 additions & 0 deletions piv/pcsc_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// +build darwin linux

package piv

// https://ludovicrousseau.blogspot.com/2010/04/pcsc-sample-in-c.html
Expand Down

0 comments on commit 564f246

Please sign in to comment.