ci: update to Go 1.22.0 (#4312)

This commit is contained in:
Marten Seemann
2024-02-08 09:15:56 +07:00
committed by GitHub
parent 43baf2db7a
commit 013949cda3
10 changed files with 16 additions and 18 deletions

View File

@@ -1,15 +1,15 @@
version: 2.1 version: 2.1
executors: executors:
test-go121: test-go122:
docker: docker:
- image: "cimg/go:1.21" - image: "cimg/go:1.22"
environment: environment:
runrace: true runrace: true
TIMESCALE_FACTOR: 3 TIMESCALE_FACTOR: 3
jobs: jobs:
"test": &test "test": &test
executor: test-go121 executor: test-go122
steps: steps:
- checkout - checkout
- run: - run:
@@ -33,10 +33,10 @@ jobs:
- run: - run:
name: "Run version negotiation tests with qlog" name: "Run version negotiation tests with qlog"
command: go run github.com/onsi/ginkgo/v2/ginkgo -v -randomize-all -trace integrationtests/versionnegotiation -- -qlog command: go run github.com/onsi/ginkgo/v2/ginkgo -v -randomize-all -trace integrationtests/versionnegotiation -- -qlog
go121: go122:
<<: *test <<: *test
workflows: workflows:
workflow: workflow:
jobs: jobs:
- go121 - go122

View File

@@ -3,7 +3,7 @@ FROM gcr.io/oss-fuzz-base/base-builder-go:v1
ARG TARGETPLATFORM ARG TARGETPLATFORM
RUN echo "TARGETPLATFORM: ${TARGETPLATFORM}" RUN echo "TARGETPLATFORM: ${TARGETPLATFORM}"
ENV GOVERSION=1.21.5 ENV GOVERSION=1.22.0
RUN platform=$(echo ${TARGETPLATFORM} | tr '/' '-') && \ RUN platform=$(echo ${TARGETPLATFORM} | tr '/' '-') && \
filename="go${GOVERSION}.${platform}.tar.gz" && \ filename="go${GOVERSION}.${platform}.tar.gz" && \

View File

@@ -4,7 +4,7 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
go: [ "1.21.x", "1.22.0-rc.2" ] go: [ "1.21.x", "1.22.x" ]
runs-on: ${{ fromJSON(vars['CROSS_COMPILE_RUNNER_UBUNTU'] || '"ubuntu-latest"') }} runs-on: ${{ fromJSON(vars['CROSS_COMPILE_RUNNER_UBUNTU'] || '"ubuntu-latest"') }}
name: "Cross Compilation (Go ${{matrix.go}})" name: "Cross Compilation (Go ${{matrix.go}})"
steps: steps:

View File

@@ -6,7 +6,7 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
os: [ "ubuntu" ] os: [ "ubuntu" ]
go: [ "1.21.x", "1.22.0-rc.2" ] go: [ "1.21.x", "1.22.x" ]
include: include:
- os: "windows" - os: "windows"
go: "1.21.x" go: "1.21.x"

View File

@@ -7,7 +7,7 @@ jobs:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-go@v5 - uses: actions/setup-go@v5
with: with:
go-version: "1.21.x" go-version: "1.22.x"
- name: Check that no non-test files import Ginkgo or Gomega - name: Check that no non-test files import Ginkgo or Gomega
run: .github/workflows/no_ginkgo.sh run: .github/workflows/no_ginkgo.sh
- name: Check for //go:build ignore in .go files - name: Check for //go:build ignore in .go files
@@ -38,7 +38,7 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
go: [ "1.21.x", "1.22.0-rc.2" ] go: [ "1.21.x", "1.22.x" ]
name: golangci-lint (Go ${{ matrix.go }}) name: golangci-lint (Go ${{ matrix.go }})
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4

View File

@@ -7,7 +7,7 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
os: [ "ubuntu", "windows", "macos" ] os: [ "ubuntu", "windows", "macos" ]
go: [ "1.21.x", "1.22.0-rc.2" ] go: [ "1.21.x", "1.22.x" ]
runs-on: ${{ fromJSON(vars[format('UNIT_RUNNER_{0}', matrix.os)] || format('"{0}-latest"', matrix.os)) }} runs-on: ${{ fromJSON(vars[format('UNIT_RUNNER_{0}', matrix.os)] || format('"{0}-latest"', matrix.os)) }}
name: Unit tests (${{ matrix.os}}, Go ${{ matrix.go }}) name: Unit tests (${{ matrix.os}}, Go ${{ matrix.go }})
steps: steps:

View File

@@ -1,5 +1,3 @@
//go:build go1.21
package qtls package qtls
import ( import (

View File

@@ -9,7 +9,7 @@ import (
. "github.com/onsi/gomega" . "github.com/onsi/gomega"
) )
var _ = Describe("Go 1.21", func() { var _ = Describe("interface go crypto/tls", func() {
It("converts to tls.EncryptionLevel", func() { It("converts to tls.EncryptionLevel", func() {
Expect(ToTLSEncryptionLevel(protocol.EncryptionInitial)).To(Equal(tls.QUICEncryptionLevelInitial)) Expect(ToTLSEncryptionLevel(protocol.EncryptionInitial)).To(Equal(tls.QUICEncryptionLevelInitial))
Expect(ToTLSEncryptionLevel(protocol.EncryptionHandshake)).To(Equal(tls.QUICEncryptionLevelHandshake)) Expect(ToTLSEncryptionLevel(protocol.EncryptionHandshake)).To(Equal(tls.QUICEncryptionLevelHandshake))

View File

@@ -5,7 +5,7 @@ RUN echo "TARGETPLATFORM: ${TARGETPLATFORM}"
RUN apt-get update && apt-get install -y wget tar git RUN apt-get update && apt-get install -y wget tar git
ENV GOVERSION=1.21.4 ENV GOVERSION=1.22.0
RUN platform=$(echo ${TARGETPLATFORM} | tr '/' '-') && \ RUN platform=$(echo ${TARGETPLATFORM} | tr '/' '-') && \
filename="go${GOVERSION}.${platform}.tar.gz" && \ filename="go${GOVERSION}.${platform}.tar.gz" && \

View File

@@ -3,12 +3,12 @@
# Install Go manually, since oss-fuzz ships with an outdated Go version. # Install Go manually, since oss-fuzz ships with an outdated Go version.
# See https://github.com/google/oss-fuzz/pull/10643. # See https://github.com/google/oss-fuzz/pull/10643.
export CXX="${CXX} -lresolv" # required by Go 1.20 export CXX="${CXX} -lresolv" # required by Go 1.20
wget https://go.dev/dl/go1.21.5.linux-amd64.tar.gz \ wget https://go.dev/dl/go1.22.0.linux-amd64.tar.gz \
&& mkdir temp-go \ && mkdir temp-go \
&& rm -rf /root/.go/* \ && rm -rf /root/.go/* \
&& tar -C temp-go/ -xzf go1.21.5.linux-amd64.tar.gz \ && tar -C temp-go/ -xzf go1.22.0.linux-amd64.tar.gz \
&& mv temp-go/go/* /root/.go/ \ && mv temp-go/go/* /root/.go/ \
&& rm -rf temp-go go1.21.5.linux-amd64.tar.gz && rm -rf temp-go go1.22.0.linux-amd64.tar.gz
( (
# fuzz qpack # fuzz qpack