Skip to content

Commit

Permalink
Fix windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
aosoriodw committed Jan 16, 2024
1 parent 792e1f4 commit 9fca116
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
8 changes: 5 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ commands:
set -x
if [[ $OS == Windows_NT ]]; then
curl https://dl.google.com/go/go<< parameters.version >>.windows-amd64.zip -o /tmp/go.zip
mv /c/go /c/go-112
unzip -q /tmp/go.zip -d /c/
mv '/c/Program Files/Go' '/c/Program Files/Go.bak'
unzip -q /tmp/go.zip -d '/c/Program Files'
else
curl https://dl.google.com/go/go<< parameters.version >>.$(uname -s | tr A-Z a-z)-amd64.tar.gz -o /tmp/go.tar.gz
tar -C /tmp -xzf /tmp/go.tar.gz
Expand All @@ -64,6 +64,7 @@ jobs:
resource_class: small
steps:
- checkout
- run: make test-race
- run: make test
- save-coverage

Expand All @@ -73,6 +74,7 @@ jobs:
steps:
- install-go
- checkout
- run: make test-race
- run: make test
- save-coverage

Expand All @@ -83,7 +85,7 @@ jobs:
steps:
- install-go
- checkout
- run: "eval $(grep 'go test' Makefile)"
- run: "eval $(grep 'GOCOVERDIR=. go test ' Makefile)"
- save-coverage

"test":
Expand Down
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,13 @@ SHELL = bash
dlib.cov: test
test -e $@
touch $@

test-race:
go test -count=1 -race ./...
.PHONY: test

test:
GOCOVERDIR=. go test -count=1 -coverprofile=dlib.cov -coverpkg=./... -race ./...
GOCOVERDIR=. go test -count=1 -coverprofile=dlib.cov -coverpkg=./... ./...
.PHONY: test

%.cov.html: %.cov
Expand Down

0 comments on commit 9fca116

Please sign in to comment.