From 2c208cf0e9850e5f9867338493456369bc7f4d6f Mon Sep 17 00:00:00 2001 From: Martin Hutchinson Date: Thu, 19 Sep 2024 10:13:30 +0000 Subject: [PATCH 1/7] Bump go version to 1.22 Updated lint and vuln checks to pin to the version in go.mod file. --- .github/workflows/go_test.yml | 2 +- .github/workflows/golangci-lint.yml | 2 +- .github/workflows/govulncheck.yml | 2 +- go.mod | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/go_test.yml b/.github/workflows/go_test.yml index a3fa670..f9c3603 100644 --- a/.github/workflows/go_test.yml +++ b/.github/workflows/go_test.yml @@ -6,7 +6,7 @@ jobs: test: strategy: matrix: - go-version: [1.20.x, 1.21.x] + go-version: [1.22.x, 1.23.x] os: [ubuntu-latest, macos-latest] runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 5be5348..dba8838 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -13,7 +13,7 @@ jobs: steps: - uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: - go-version: 1.17 + go-version-file: go.mod - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - name: golangci-lint uses: golangci/golangci-lint-action@aaa42aa0628b4ae2578232a66b541047968fac86 # v6.1.0 diff --git a/.github/workflows/govulncheck.yml b/.github/workflows/govulncheck.yml index 8043dd5..531b969 100644 --- a/.github/workflows/govulncheck.yml +++ b/.github/workflows/govulncheck.yml @@ -19,5 +19,5 @@ jobs: - id: govulncheck uses: golang/govulncheck-action@dd0578b371c987f96d1185abb54344b44352bd58 # v1.0.3 with: - go-version-input: 1.21.11 + go-version-file: go.mod go-package: ./... diff --git a/go.mod b/go.mod index 641276d..f69d96a 100644 --- a/go.mod +++ b/go.mod @@ -1,5 +1,5 @@ module github.com/transparency-dev/merkle -go 1.20 +go 1.22 require github.com/google/go-cmp v0.6.0 From e15bb05d0104e7c5037723f0a6a43c11688aa2c2 Mon Sep 17 00:00:00 2001 From: Martin Hutchinson Date: Thu, 19 Sep 2024 10:18:51 +0000 Subject: [PATCH 2/7] go.mod explicit about patch version Also make golangci-lint checkout and setup in the right order. --- .github/workflows/golangci-lint.yml | 7 +++---- go.mod | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index dba8838..06b4846 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -10,13 +10,12 @@ jobs: golangci: name: lint runs-on: ubuntu-latest - steps: + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - name: golangci-lint uses: golangci/golangci-lint-action@aaa42aa0628b4ae2578232a66b541047968fac86 # v6.1.0 with: - # Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version - version: v1.54.1 + version: v1.55.1 + args: --timeout=8m diff --git a/go.mod b/go.mod index f69d96a..6408097 100644 --- a/go.mod +++ b/go.mod @@ -1,5 +1,5 @@ module github.com/transparency-dev/merkle -go 1.22 +go 1.22.7 require github.com/google/go-cmp v0.6.0 From 71f1fdd4702e8824e55a4a124cc5618ae87cdfde Mon Sep 17 00:00:00 2001 From: Martin Hutchinson Date: Thu, 19 Sep 2024 10:41:17 +0000 Subject: [PATCH 3/7] Re-add steps that got accidentally dropped --- .github/workflows/golangci-lint.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 06b4846..eec003e 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -10,6 +10,7 @@ jobs: golangci: name: lint runs-on: ubuntu-latest + steps: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: From bf2515dcdab791d27ecb8e7bba52feeae3fc3ad7 Mon Sep 17 00:00:00 2001 From: Martin Hutchinson Date: Thu, 19 Sep 2024 11:10:36 +0000 Subject: [PATCH 4/7] Try another format for go.mod versions --- go.mod | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 6408097..35f0bdc 100644 --- a/go.mod +++ b/go.mod @@ -1,5 +1,7 @@ module github.com/transparency-dev/merkle -go 1.22.7 +go 1.22 + +toolchain go1.22.7 require github.com/google/go-cmp v0.6.0 From 112e9c58942e4ee124e9bc7d22f2ed69784756c2 Mon Sep 17 00:00:00 2001 From: Martin Hutchinson Date: Thu, 19 Sep 2024 11:12:31 +0000 Subject: [PATCH 5/7] Drop toolchain --- go.mod | 2 -- 1 file changed, 2 deletions(-) diff --git a/go.mod b/go.mod index 35f0bdc..f69d96a 100644 --- a/go.mod +++ b/go.mod @@ -2,6 +2,4 @@ module github.com/transparency-dev/merkle go 1.22 -toolchain go1.22.7 - require github.com/google/go-cmp v0.6.0 From 573a335628ab19883868eee6a705c2bd52fcd428 Mon Sep 17 00:00:00 2001 From: Martin Hutchinson Date: Thu, 19 Sep 2024 11:18:31 +0000 Subject: [PATCH 6/7] Bump base builder image --- .clusterfuzzlite/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.clusterfuzzlite/Dockerfile b/.clusterfuzzlite/Dockerfile index 5d93ae5..1903c51 100644 --- a/.clusterfuzzlite/Dockerfile +++ b/.clusterfuzzlite/Dockerfile @@ -1,5 +1,5 @@ # https://google.github.io/clusterfuzzlite/build-integration/#dockerfile -FROM gcr.io/oss-fuzz-base/base-builder-go@sha256:c7f01a616db0fc554d98edbd7d49a7177197f77fd4e1371bcb7774d7eac8216d +FROM gcr.io/oss-fuzz-base/base-builder-go@sha256:37d560af1d31ae8d339902acaedb8eb6fdf3f04469706f39e3bbea44fa3fdeec COPY . $SRC/merkle WORKDIR $SRC/merkle COPY .clusterfuzzlite/build.sh $SRC/ From 09866b8ae8db5dd617cc5f2c9927e454d12ff512 Mon Sep 17 00:00:00 2001 From: Martin Hutchinson Date: Thu, 19 Sep 2024 11:21:32 +0000 Subject: [PATCH 7/7] Use full x.y.z again now that fuzzer go version is bumped --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index f69d96a..6408097 100644 --- a/go.mod +++ b/go.mod @@ -1,5 +1,5 @@ module github.com/transparency-dev/merkle -go 1.22 +go 1.22.7 require github.com/google/go-cmp v0.6.0