Skip to content

Commit

Permalink
chore(go): use 1.17 and enable windows/arm64 target. (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zenithar authored Aug 17, 2021
1 parent f2e8cac commit 1727b2d
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr-extra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: 1.17
- name: Run go list
run: go list -json -m all > go.list
- name: Nancy
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: 1.17
- name: Checkout code
uses: actions/checkout@v2
- name: Check go mod
Expand All @@ -31,7 +31,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: 1.17
- uses: actions/checkout@v2
- name: lint
uses: golangci/[email protected]
Expand All @@ -46,7 +46,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.16 # test only the latest go version to speed up CI
go-version: 1.17 # test only the latest go version to speed up CI
- uses: actions/[email protected]
with:
path: ~/go/pkg/mod
Expand All @@ -56,7 +56,7 @@ jobs:
- name: Setup gotestsum
uses: autero1/[email protected]
with:
gotestsum_version: 1.6.1
gotestsum_version: 1.7.0
- name: Run tests
run: gotestsum --format short-verbose ./pkg/...

Expand All @@ -68,7 +68,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.16 # test only the latest go version to speed up CI
go-version: 1.17 # test only the latest go version to speed up CI
- uses: actions/[email protected]
with:
path: ~/go/pkg/mod
Expand All @@ -78,7 +78,7 @@ jobs:
- name: Setup gotestsum
uses: autero1/[email protected]
with:
gotestsum_version: 1.6.1
gotestsum_version: 1.7.0
- name: Run tests
run: gotestsum --format short-verbose ./pkg/...

Expand All @@ -90,7 +90,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.16 # test only the latest go version to speed up CI
go-version: 1.17 # test only the latest go version to speed up CI
- uses: actions/[email protected]
with:
path: ~/go/pkg/mod
Expand All @@ -100,6 +100,6 @@ jobs:
- name: Setup gotestsum
uses: autero1/[email protected]
with:
gotestsum_version: 1.6.1
gotestsum_version: 1.7.0
- name: Run tests
run: gotestsum --format short-verbose ./pkg/...
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Download a [release](https://github.com/elastic/harp/releases) or build from sou

```sh
$ go version
go version go1.16.7 linux/amd64
go version go1.17 linux/amd64
```

> Simple go version manager - <https://github.com/stefanmaric/g>
Expand Down
12 changes: 12 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ tasks:
- release-linux-arm64
- release-linux-arm7
- release-windows-amd64
- release-windows-arm64

release-darwin-amd64:
cmds:
Expand Down Expand Up @@ -95,6 +96,17 @@ tasks:
- test -f bin/{{.ARTIFACT}}-windows-amd64.exe
method: checksum

release-windows-arm64:
cmds:
- "tar cfJ dist/{{.ARTIFACT}}-windows-arm64-$RELEASE.tar.xz -C bin {{.ARTIFACT}}-windows-arm64.exe"
sources:
- bin/{{.ARTIFACT}}-windows-arm64.exe
generates:
- dist/{{.ARTIFACT}}-windows-arm64-$RELEASE.tar.xz
preconditions:
- test -f bin/{{.ARTIFACT}}-windows-arm64.exe
method: checksum

release-checksum:
deps:
- release-all
Expand Down
2 changes: 1 addition & 1 deletion build/mage/docker/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ ARG VCS_REF
## -------------------------------------------------------------------------------------------------
FROM golang:1.16
FROM golang:1.17
# hadolint ignore=DL3008
RUN set -eux; \
Expand Down
8 changes: 8 additions & 0 deletions magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,14 @@ func Release(ctx context.Context) error {
golang.GOOS("windows"), golang.GOARCH("amd64"),
)()
},
func() error {
return golang.Release(
"harp",
"github.com/elastic/harp/cmd/harp",
version,
golang.GOOS("windows"), golang.GOARCH("arm64"),
)()
},
)

return ctx.Err()
Expand Down

0 comments on commit 1727b2d

Please sign in to comment.