From 4e9fbee1e2ef39ff56bdfb19126a9b1a8a841eb4 Mon Sep 17 00:00:00 2001 From: Francis Lavoie Date: Tue, 15 Mar 2022 18:09:19 -0400 Subject: [PATCH] ci: Build on Go 1.18, bump actions versions (#4637) * ci: Build on Go 1.18, bump actions versions * Revert linter version bump for now * Try linter again --- .github/workflows/ci.yml | 10 +++++----- .github/workflows/cross-build.yml | 6 +++--- .github/workflows/lint.yml | 12 ++++++++---- .github/workflows/release.yml | 8 ++++---- caddyconfig/caddyfile/formatter_fuzz.go | 1 + caddyconfig/caddyfile/lexer_fuzz.go | 1 + caddyconfig/httpcaddyfile/addresses_fuzz.go | 1 + duration_fuzz.go | 1 + go.mod | 2 +- go.sum | 6 ++++-- listeners_fuzz.go | 1 + notify/notify_other.go | 1 + replacer_fuzz.go | 1 + sigtrap_nonposix.go | 1 + sigtrap_posix.go | 1 + 15 files changed, 34 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c8b07ff9..894b8ed2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ jobs: fail-fast: false matrix: os: [ ubuntu-latest, macos-latest, windows-latest ] - go: [ '1.16', '1.17' ] + go: [ '1.16', '1.17', '1.18' ] # Set some variables per OS, usable via ${{ matrix.VAR }} # CADDY_BIN_PATH: the path to the compiled Caddy binary, for artifact publishing @@ -41,12 +41,12 @@ jobs: steps: - name: Install Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v3 with: go-version: ${{ matrix.go }} - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 # These tools would be useful if we later decide to reinvestigate # publishing test/coverage reports to some tool for easier consumption @@ -130,7 +130,7 @@ jobs: continue-on-error: true # August 2020: s390x VM is down due to weather and power issues steps: - name: Checkout code into the Go module directory - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Run Tests run: | mkdir -p ~/.ssh && echo -e "${SSH_KEY//_/\\n}" > ~/.ssh/id_ecdsa && chmod og-rwx ~/.ssh/id_ecdsa @@ -155,7 +155,7 @@ jobs: runs-on: ubuntu-latest steps: - name: checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - uses: goreleaser/goreleaser-action@v2 with: diff --git a/.github/workflows/cross-build.yml b/.github/workflows/cross-build.yml index 5c038569..04c1d29a 100644 --- a/.github/workflows/cross-build.yml +++ b/.github/workflows/cross-build.yml @@ -16,12 +16,12 @@ jobs: fail-fast: false matrix: goos: ['android', 'linux', 'solaris', 'illumos', 'dragonfly', 'freebsd', 'openbsd', 'plan9', 'windows', 'darwin', 'netbsd'] - go: [ '1.17' ] + go: [ '1.18' ] runs-on: ubuntu-latest continue-on-error: true steps: - name: Install Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v3 with: go-version: ${{ matrix.go }} @@ -45,7 +45,7 @@ jobs: cross-build-go${{ matrix.go }}-${{ matrix.goos }} - name: Checkout code into the Go module directory - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Run Build env: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 4b4ed036..7376b910 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -16,10 +16,14 @@ jobs: name: lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: golangci-lint - uses: golangci/golangci-lint-action@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-go@v3 with: - version: v1.31 + go-version: 1.17 + + - name: golangci-lint + uses: golangci/golangci-lint-action@v3 + with: + version: v1.44 # Optional: show only new issues if it's a pull request. The default value is `false`. # only-new-issues: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 834d3034..8572e44a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,22 +11,22 @@ jobs: strategy: matrix: os: [ ubuntu-latest ] - go: [ '1.17' ] + go: [ '1.18' ] runs-on: ${{ matrix.os }} steps: - name: Install Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v3 with: go-version: ${{ matrix.go }} - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: fetch-depth: 0 # Force fetch upstream tags -- because 65 minutes - # tl;dr: actions/checkout@v2 runs this line: + # tl;dr: actions/checkout@v3 runs this line: # git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +ebc278ec98bb24f2852b61fde2a9bf2e3d83818b:refs/tags/ # which makes its own local lightweight tag, losing all the annotations in the process. Our earlier script ran: # git fetch --prune --unshallow diff --git a/caddyconfig/caddyfile/formatter_fuzz.go b/caddyconfig/caddyfile/formatter_fuzz.go index b1bbd84a..c07a2268 100644 --- a/caddyconfig/caddyfile/formatter_fuzz.go +++ b/caddyconfig/caddyfile/formatter_fuzz.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build gofuzz // +build gofuzz package caddyfile diff --git a/caddyconfig/caddyfile/lexer_fuzz.go b/caddyconfig/caddyfile/lexer_fuzz.go index 29348446..179fd87c 100644 --- a/caddyconfig/caddyfile/lexer_fuzz.go +++ b/caddyconfig/caddyfile/lexer_fuzz.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build gofuzz // +build gofuzz package caddyfile diff --git a/caddyconfig/httpcaddyfile/addresses_fuzz.go b/caddyconfig/httpcaddyfile/addresses_fuzz.go index 4ab62984..be873ef1 100644 --- a/caddyconfig/httpcaddyfile/addresses_fuzz.go +++ b/caddyconfig/httpcaddyfile/addresses_fuzz.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build gofuzz // +build gofuzz package httpcaddyfile diff --git a/duration_fuzz.go b/duration_fuzz.go index e7afed3f..aa01a46a 100644 --- a/duration_fuzz.go +++ b/duration_fuzz.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build gofuzz // +build gofuzz package caddy diff --git a/go.mod b/go.mod index 95c3de7f..a7cc1a89 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,7 @@ require ( github.com/google/uuid v1.3.0 github.com/klauspost/compress v1.15.0 github.com/klauspost/cpuid/v2 v2.0.11 - github.com/lucas-clemente/quic-go v0.24.0 + github.com/lucas-clemente/quic-go v0.25.0 github.com/mholt/acmez v1.0.2 github.com/naoina/go-stringutil v0.1.0 // indirect github.com/naoina/toml v0.1.1 diff --git a/go.sum b/go.sum index bfb546a4..e6ba33dc 100644 --- a/go.sum +++ b/go.sum @@ -664,8 +664,8 @@ github.com/libdns/libdns v0.2.1 h1:Wu59T7wSHRgtA0cfxC+n1c/e+O3upJGWytknkmFEDis= github.com/libdns/libdns v0.2.1/go.mod h1:yQCXzk1lEZmmCPa857bnk4TsOiqYasqpyOEeSObbb40= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/lucas-clemente/quic-go v0.24.0 h1:ToR7SIIEdrgOhgVTHvPgdVRJfgVy+N0wQAagH7L4d5g= -github.com/lucas-clemente/quic-go v0.24.0/go.mod h1:paZuzjXCE5mj6sikVLMvqXk8lJV2AsqtJ6bDhjEfxx0= +github.com/lucas-clemente/quic-go v0.25.0 h1:K+X9Gvd7JXsOHtU0N2icZ2Nw3rx82uBej3mP4CLgibc= +github.com/lucas-clemente/quic-go v0.25.0/go.mod h1:YtzP8bxRVCBlO77yRanE264+fY/T2U9ZlW1AaHOsMOg= github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= @@ -680,6 +680,8 @@ github.com/marten-seemann/qtls-go1-16 v0.1.4 h1:xbHbOGGhrenVtII6Co8akhLEdrawwB2i github.com/marten-seemann/qtls-go1-16 v0.1.4/go.mod h1:gNpI2Ol+lRS3WwSOtIUUtRwZEQMXjYK+dQSBFbethAk= github.com/marten-seemann/qtls-go1-17 v0.1.0 h1:P9ggrs5xtwiqXv/FHNwntmuLMNq3KaSIG93AtAZ48xk= github.com/marten-seemann/qtls-go1-17 v0.1.0/go.mod h1:fz4HIxByo+LlWcreM4CZOYNuz3taBQ8rN2X6FqvaWo8= +github.com/marten-seemann/qtls-go1-18 v0.1.0-beta.1 h1:EnzzN9fPUkUck/1CuY1FlzBaIYMoiBsdwTNmNGkwUUM= +github.com/marten-seemann/qtls-go1-18 v0.1.0-beta.1/go.mod h1:PUhIQk19LoFt2174H4+an8TYvWOGjb/hHwphBeaDHwI= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= diff --git a/listeners_fuzz.go b/listeners_fuzz.go index 823d0beb..95f1e327 100644 --- a/listeners_fuzz.go +++ b/listeners_fuzz.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build gofuzz // +build gofuzz package caddy diff --git a/notify/notify_other.go b/notify/notify_other.go index 17f62bab..6ffec89b 100644 --- a/notify/notify_other.go +++ b/notify/notify_other.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build !linux // +build !linux package notify diff --git a/replacer_fuzz.go b/replacer_fuzz.go index 2c27f01a..a837e33f 100644 --- a/replacer_fuzz.go +++ b/replacer_fuzz.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build gofuzz // +build gofuzz package caddy diff --git a/sigtrap_nonposix.go b/sigtrap_nonposix.go index 3b4595a6..7855e13a 100644 --- a/sigtrap_nonposix.go +++ b/sigtrap_nonposix.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build windows || plan9 || nacl || js // +build windows plan9 nacl js package caddy diff --git a/sigtrap_posix.go b/sigtrap_posix.go index d5a03a94..b6c4cbfe 100644 --- a/sigtrap_posix.go +++ b/sigtrap_posix.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build !windows && !plan9 && !nacl && !js // +build !windows,!plan9,!nacl,!js package caddy