From add16d78c5aa993dae65727d0bf6f24245ce624b Mon Sep 17 00:00:00 2001 From: Klaus Post Date: Mon, 14 Feb 2022 11:29:17 +0100 Subject: [PATCH 1/2] tests: Test s2 asm tags with defines Until Go 1.18 can be used. Upgrade Goreleaser. --- .github/workflows/go.yml | 18 +++++++++++------- .github/workflows/release.yml | 2 +- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index d7dd90452e..c5767691d7 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -31,11 +31,6 @@ jobs: - name: Test run: go test ./... - - name: Test S2 GOAMD64 v3 - env: - GOAMD64: v3 - run: go test -tags=goamd64_v3 ./s2/... - - name: Test Noasm run: go test -tags=noasm ./... @@ -67,8 +62,17 @@ jobs: run: go build github.com/klauspost/compress/s2/cmd/s2c && go build github.com/klauspost/compress/s2/cmd/s2d&&./s2c -verify s2c &&./s2d s2c.s2&&rm ./s2c&&rm s2d&&rm s2c.s2 - name: goreleaser deprecation - run: curl -sfL https://git.io/goreleaser | VERSION=v0.162.0 sh -s -- check + run: curl -sfL https://git.io/goreleaser | VERSION=v1.5.0 sh -s -- check - name: goreleaser snapshot - run: curl -sL https://git.io/goreleaser | VERSION=v0.162.0 sh -s -- --snapshot --skip-publish --rm-dist + run: curl -sL https://git.io/goreleaser | VERSION=v1.5.0 sh -s -- --snapshot --skip-publish --rm-dist + - name: Test S2 GOAMD64 v3 + env: + GOAMD64: v3 + run: go test -asmflags=-D=GOAMD64_v3 ./s2/... + + - name: Test S2 GOAMD64 v4 + env: + GOAMD64: v4 + run: go test -asmflags=-D=GOAMD64_v4 ./s2/... diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9011210642..9a10cceeef 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,7 +23,7 @@ jobs: name: Run GoReleaser uses: goreleaser/goreleaser-action@v2 with: - version: 0.162.0 + version: 1.5.0 args: release --rm-dist env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From fe80baf6803878802fe7d860099710836b8a42bb Mon Sep 17 00:00:00 2001 From: Klaus Post Date: Mon, 14 Feb 2022 11:55:13 +0100 Subject: [PATCH 2/2] Install garble manually --- .github/workflows/go.yml | 3 +++ .github/workflows/release.yml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index c5767691d7..51babb2e8a 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -61,6 +61,9 @@ jobs: - name: Build s2c run: go build github.com/klauspost/compress/s2/cmd/s2c && go build github.com/klauspost/compress/s2/cmd/s2d&&./s2c -verify s2c &&./s2d s2c.s2&&rm ./s2c&&rm s2d&&rm s2c.s2 + - name: install garble + run: go install mvdan.cc/garble@latest + - name: goreleaser deprecation run: curl -sfL https://git.io/goreleaser | VERSION=v1.5.0 sh -s -- check diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9a10cceeef..4cf2f91e38 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,6 +19,9 @@ jobs: uses: actions/setup-go@v2 with: go-version: 1.17.x + - + name: install garble + run: go install mvdan.cc/garble@latest - name: Run GoReleaser uses: goreleaser/goreleaser-action@v2