Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(go): update Go version to 1.19 #1225

Merged
merged 8 commits into from
Oct 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 9 additions & 13 deletions .github/workflows/assets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,16 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: '1.16.3'
go-version: '1.19.2'
- uses: actions/checkout@v3
- name: Init submodule
run: git submodule init && git submodule update
- name: Set raw version
id: raw_tag
# Strips the 'v' from the actual semver version.
run: echo ::set-output name=raw_version::"${TAG_NAME#v}"
- name: Install protoc
run: |
mkdir protobuf
curl -sSL https://github.com/protocolbuffers/protobuf/releases/download/v3.15.0/protoc-3.15.0-linux-x86_64.zip > protobuf/protoc.zip
unzip -d protobuf protobuf/protoc.zip
echo "./protobuf/bin" >> $GITHUB_PATH
- name: Install Protoc
uses: arduino/setup-protoc@v1
- name: Compile proto release assets
run: go run ./util/cmd/release -version=${{ steps.raw_tag.outputs.raw_version }}
- name: Upload proto release assets
Expand Down Expand Up @@ -56,22 +52,22 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: '1.16.3'
go-version: '1.19.2'
- name: Install gox
run: go install github.com/mitchellh/gox@latest
- uses: actions/checkout@v3
- name: Set raw version
id: raw_tag
# Strips the 'v' from the actual semver version.
run: echo ::set-output name=raw_version::"${TAG_NAME#v}"
# The generator does not use these, but we need them to build the
# The generator does not use this, but we need it to build the
# binaries.
#
# Mousetrap is installed individually because it is needed for the
# Windows build. Since we are building on Linux, it is not installed
# automatically as a dependency.
- name: Install the cross-platform build tool.
run: |
go get github.com/mitchellh/gox
go get github.com/inconshreveable/mousetrap
- name: Install the cross-platform build dependency.
run: go get github.com/inconshreveable/mousetrap
- name: Build for the ${{ matrix.osarch.os }}/${{ matrix.osarch.arch }} platform.
run: |
gox -osarch ${{ matrix.osarch.os }}/${{ matrix.osarch.arch }} -output gapic-showcase ./cmd/gapic-showcase && \
Expand Down
39 changes: 18 additions & 21 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,21 @@ jobs:
outputs:
modified_files: ${{ steps.mod.outputs.modified_files }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '1.16.3'
- name: Checkout common protos
run: git submodule init && git submodule update
- name: Install protoc
run: |
mkdir protobuf
curl -sSL https://github.com/protocolbuffers/protobuf/releases/download/v3.15.0/protoc-3.15.0-linux-x86_64.zip > protobuf/protoc.zip
unzip -d protobuf protobuf/protoc.zip
echo "./protobuf/bin" >> $GITHUB_PATH
go-version: '1.19.2'
- name: Install Protoc
uses: arduino/setup-protoc@v1
- name: Install external generators
run: |
go mod download
go install github.com/golang/protobuf/protoc-gen-go
go get github.com/googleapis/gapic-generator-go/cmd/protoc-gen-go_cli
go get github.com/googleapis/gapic-generator-go/cmd/protoc-gen-go_gapic
go install github.com/golang/protobuf/protoc-gen-go@latest
go install github.com/googleapis/gapic-generator-go/cmd/protoc-gen-go_cli@latest
go install github.com/googleapis/gapic-generator-go/cmd/protoc-gen-go_gapic@latest
- uses: actions/checkout@v3
- name: Checkout common protos
run: git submodule init && git submodule update
- name: Download go deps
run: go mod download
- name: Install REST server generator
run: go install ./util/cmd/protoc-gen-go_rest_server
- name: Regenerate sources
Expand All @@ -51,10 +48,12 @@ jobs:
needs: regenerate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '1.16.3'
go-version: '1.19.2'
- name: Install golint
run: go install golang.org/x/lint/golint@latest
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
if: needs.regenerate.outputs.modified_files
with:
Expand All @@ -65,9 +64,7 @@ jobs:
tar xvzf regen.tgz
rm regen.tgz
- name: Check formatting
run: gofmt -l ./ > gofmt.txt && ! [ -s gofmt.txt ]
- name: Install golint
run: go get -u golang.org/x/lint/golint
run: gofmt -l ./server/services > gofmt.txt && ! [ -s gofmt.txt ]
if: ${{ always() }}
- name: Lint service implementations
run: golint ./server/services >> golint.txt && ! [ -s golint.txt ]
Expand All @@ -92,7 +89,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '1.16.3'
go-version: '1.19.2'
- uses: actions/download-artifact@v3
if: needs.regenerate.outputs.modified_files
with:
Expand All @@ -118,7 +115,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '1.16.3'
go-version: '1.19.2'
- uses: actions/download-artifact@v3
if: needs.regenerate.outputs.modified_files
with:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.17-alpine AS builder
FROM golang:1.19-alpine AS builder

# Install git and gcc.
RUN apk add --no-cache git gcc musl-dev
Expand Down
28 changes: 27 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,30 @@ require (
google.golang.org/protobuf v1.28.1
)

go 1.16
require (
cloud.google.com/go/compute v1.7.0 // indirect
github.com/fsnotify/fsnotify v1.5.4 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/magiconair/properties v1.8.6 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.1 // indirect
github.com/spf13/afero v1.8.2 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.3.0 // indirect
go.opencensus.io v0.23.0 // indirect
golang.org/x/net v0.0.0-20220909164309-bea034e7d591 // indirect
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 // indirect
golang.org/x/text v0.3.7 // indirect
google.golang.org/appengine v1.6.7 // indirect
gopkg.in/ini.v1 v1.66.4 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.0 // indirect
)

go 1.19
Loading