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

Update Go to v1.19 #4106

Merged
merged 2 commits into from
Aug 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
10 changes: 5 additions & 5 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ jobs:
name: GoBenchmark
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.17
uses: actions/setup-go@v3
with:
go-version: 1.17

- name: Check out code into the Go module directory
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Go using version from go.mod
uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'

- name: Install benchci
run: curl -sfL https://raw.githubusercontent.com/antrea-io/benchci/main/install.sh | sudo sh -s -- -b /usr/local/bin

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/clair.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.17
go-version-file: 'go.mod'
- name: Scan Antrea Docker image for vulnerabilities
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_SES }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ jobs:
if: ${{ github.actor == 'dependabot[bot]' && contains(github.event.pull_request.labels.*.name, 'dependencies') && contains(github.event.pull_request.labels.*.name, 'go') }}
runs-on: [ubuntu-latest]
steps:
- name: Set up Go 1.17
uses: actions/setup-go@v3
with:
go-version: 1.17
- uses: actions/checkout@v3
with:
# Check out the pull request HEAD
ref: ${{ github.event.pull_request.head.sha }}
token: ${{ secrets.ANTREA_BOT_WRITE_PAT }}
- name: Set up Go using version from go.mod
uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
- name: Run go mod tidy
# the checks above (Github actor and PR labels) ensure that a malicious
# actor cannot open a PR with a modified "tidy" Makefile target and
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docker_update_base_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push Docker images
if: ${{ github.event.inputs.push == true }}
if: ${{ github.event.inputs.push == "true" }}
run: |
./hack/build-antrea-windows-all.sh --pull --push-base-images
shell: bash
- name: Build Docker images without pushing
if: ${{ github.event.inputs.push == false }}
if: ${{ github.event.inputs.push == "false" }}
run: |
./hack/build-antrea-windows-all.sh --pull
shell: bash
80 changes: 40 additions & 40 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ jobs:
name: Unit test (ubuntu-latest)
runs-on: [ubuntu-latest]
steps:
- name: Set up Go 1.17
uses: actions/setup-go@v3
with:
go-version: 1.17
- name: Check-out code
uses: actions/checkout@v3
- name: Set up Go using version from go.mod
uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
- uses: actions/cache@v3
with:
# In order:
Expand Down Expand Up @@ -74,12 +74,12 @@ jobs:
name: Unit test (windows-2019)
runs-on: [windows-2019]
steps:
- name: Set up Go 1.17
uses: actions/setup-go@v3
with:
go-version: 1.17
- name: Check-out code
uses: actions/checkout@v3
- name: Set up Go using version from go.mod
uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
- uses: actions/cache@v3
with:
# In order:
Expand Down Expand Up @@ -110,12 +110,12 @@ jobs:
name: Integration test
runs-on: [ubuntu-latest]
steps:
- name: Set up Go 1.17
uses: actions/setup-go@v3
with:
go-version: 1.17
- name: Check-out code
uses: actions/checkout@v3
- name: Set up Go using version from go.mod
uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
- uses: actions/cache@v3
with:
# In order:
Expand Down Expand Up @@ -155,12 +155,12 @@ jobs:
name: Golangci-lint (ubuntu-latest)
runs-on: [ubuntu-latest]
steps:
- name: Set up Go 1.17
uses: actions/setup-go@v3
with:
go-version: 1.17
- name: Check-out code
uses: actions/checkout@v3
- name: Set up Go using version from go.mod
uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
- uses: actions/cache@v3
with:
# In order:
Expand All @@ -187,12 +187,12 @@ jobs:
name: Golangci-lint (macos-latest)
runs-on: [macos-latest]
steps:
- name: Set up Go 1.17
uses: actions/setup-go@v3
with:
go-version: 1.17
- name: Check-out code
uses: actions/checkout@v3
- name: Set up Go using version from go.mod
uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
- uses: actions/cache@v3
with:
# In order:
Expand All @@ -219,12 +219,12 @@ jobs:
name: Build Antrea and antctl binaries
runs-on: [ubuntu-latest]
steps:
- name: Set up Go 1.17
uses: actions/setup-go@v3
with:
go-version: 1.17
- name: Check-out code
uses: actions/checkout@v3
- name: Set up Go using version from go.mod
uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
- uses: actions/cache@v3
with:
# In order:
Expand Down Expand Up @@ -258,12 +258,12 @@ jobs:
name: Build Antrea Windows binaries
runs-on: [ubuntu-latest]
steps:
- name: Set up Go 1.17
uses: actions/setup-go@v3
with:
go-version: 1.17
- name: Check-out code
uses: actions/checkout@v3
- name: Set up Go using version from go.mod
uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
- uses: actions/cache@v3
with:
# In order:
Expand All @@ -287,12 +287,12 @@ jobs:
name: Check tidy, code generation and manifest
runs-on: [ubuntu-latest]
steps:
- name: Set up Go 1.17
uses: actions/setup-go@v3
with:
go-version: 1.17
- name: Check-out code
uses: actions/checkout@v3
- name: Set up Go using version from go.mod
uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
# tidy check need to be run before code generation which will regenerate codes.
- name: Check tidy
run: make test-tidy
Expand All @@ -307,12 +307,12 @@ jobs:
name: Verify docs and spelling
runs-on: [ubuntu-latest]
steps:
- name: Set up Go 1.17
uses: actions/setup-go@v3
with:
go-version: 1.17
- name: Check-out code
uses: actions/checkout@v3
- name: Set up Go using version from go.mod
uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
- name: Run verify scripts
run: make verify
- name: Checking for broken Markdown links
Expand Down Expand Up @@ -343,11 +343,11 @@ jobs:
name: Go benchmark test
runs-on: [ubuntu-latest]
steps:
- name: Set up Go 1.17
uses: actions/setup-go@v3
with:
go-version: 1.17
- name: Check-out code
uses: actions/checkout@v3
- name: Set up Go using version from go.mod
uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
- name: Run Go benchmark test
run: go test -run '^$' -bench . -benchtime 1x -timeout 10m -cpu 4 -v -benchmem ./pkg/...
6 changes: 3 additions & 3 deletions .github/workflows/golicense.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ jobs:
if: ${{ needs.check-changes.outputs.has_changes == 'yes' || github.event_name != 'pull_request' }}
runs-on: [ubuntu-latest]
steps:
- name: Set up Go 1.17
- uses: actions/checkout@v3
- name: Set up Go using version from go.mod
uses: actions/setup-go@v3
with:
go-version: 1.17
- uses: actions/checkout@v3
go-version-file: 'go.mod'
- name: Cache licensing information for dependencies
uses: actions/cache@v3
id: cache
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.17
go-version-file: 'go.mod'
- name: Download Antrea image from previous job
uses: actions/download-artifact@v3
with:
Expand Down Expand Up @@ -136,7 +136,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.17
go-version-file: 'go.mod'
- name: Download Antrea image from previous job
uses: actions/download-artifact@v3
with:
Expand Down Expand Up @@ -194,7 +194,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.17
go-version-file: 'go.mod'
- name: Download Antrea image from previous job
uses: actions/download-artifact@v3
with:
Expand Down Expand Up @@ -253,7 +253,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.17
go-version-file: 'go.mod'
- name: Download Antrea image from previous job
uses: actions/download-artifact@v3
with:
Expand Down Expand Up @@ -311,7 +311,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.17
go-version-file: 'go.mod'
- name: Download Antrea image from previous job
uses: actions/download-artifact@v3
with:
Expand Down Expand Up @@ -369,7 +369,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.17
go-version-file: 'go.mod'
- name: Download Antrea image from previous job
uses: actions/download-artifact@v3
with:
Expand Down Expand Up @@ -434,7 +434,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.17
go-version-file: 'go.mod'
- name: Download Antrea image from previous job
uses: actions/download-artifact@v3
with:
Expand Down Expand Up @@ -477,7 +477,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.17
go-version-file: 'go.mod'
- name: Download Antrea image from previous job
uses: actions/download-artifact@v3
with:
Expand Down Expand Up @@ -520,7 +520,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.17
go-version-file: 'go.mod'
- name: Download Antrea image from previous job
uses: actions/download-artifact@v3
with:
Expand Down Expand Up @@ -563,7 +563,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.17
go-version-file: 'go.mod'
- name: Download Antrea image from previous job
uses: actions/download-artifact@v3
with:
Expand Down Expand Up @@ -606,7 +606,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.17
go-version-file: 'go.mod'
- name: Download Antrea image from previous job
uses: actions/download-artifact@v3
with:
Expand Down Expand Up @@ -641,7 +641,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.17
go-version-file: 'go.mod'
- name: Download Antrea image from previous job
uses: actions/download-artifact@v3
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/process_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ jobs:
upload-release-assets:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.17
- uses: actions/checkout@v3
- name: Set up Go using version from go.mod
uses: actions/setup-go@v3
with:
go-version: 1.17
- uses: actions/checkout@v3
go-version-file: 'go.mod'
- name: Build assets
env:
TAG: ${{ github.ref }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/verify_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:
name: Verify docs and spelling
runs-on: [ubuntu-latest]
steps:
- name: Set up Go 1.17
uses: actions/setup-go@v3
with:
go-version: 1.17
- name: Check-out code
uses: actions/checkout@v3
- name: Set up Go using version from go.mod
uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
- name: Run verify scripts
run: make verify
- name: Checking for broken Markdown links for main branch
Expand Down
Loading