-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update golang to 1.20 and its dependencies
Signed-off-by: amaslennikov <[email protected]>
- Loading branch information
1 parent
3bf8604
commit 7f0eca3
Showing
15 changed files
with
593 additions
and
642 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: go-build-and-test-amd64 | ||
on: | ||
push: | ||
pull_request: | ||
schedule: | ||
- cron: "0 8 * * 0" # every sunday | ||
jobs: | ||
build: | ||
name: build | ||
strategy: | ||
matrix: | ||
go-version: [1.20.x] | ||
os: [ubuntu-22.04] | ||
goos: [linux] | ||
goarch: [amd64] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
- name: check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
- name: build test for ${{ matrix.goarch }} | ||
env: | ||
GOARCH: ${{ matrix.goarch }} | ||
GOOS: ${{ matrix.goos }} | ||
run: make build | ||
|
||
test: | ||
name: test | ||
runs-on: ubuntu-22.04 | ||
needs: build | ||
steps: | ||
- name: set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.20.x | ||
- name: check out code into the Go module directory | ||
uses: actions/checkout@v3 | ||
- name: run unit-test | ||
run: make test | ||
|
||
coverage: | ||
runs-on: ubuntu-22.04 | ||
needs: build | ||
name: coverage | ||
steps: | ||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.20.x | ||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
- name: Go test with coverage | ||
run: make test-coverage # sudo needed for netns change in test | ||
- name: Coveralls | ||
uses: coverallsapp/github-action@v2 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
file: accelerated-bridge.cover |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: "CodeQL" | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
schedule: | ||
- cron: "14 4 * * 4" | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: [ go ] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v2 | ||
with: | ||
languages: ${{ matrix.language }} | ||
queries: +security-and-quality | ||
|
||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v2 | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v2 | ||
with: | ||
category: "/language:${{ matrix.language }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
name: "push images on merge to master" | ||
|
||
env: | ||
IMAGE_NAME: ghcr.io/${{ github.repository }} | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
build-and-push-amd64-accelerated-bridge-cni: | ||
name: image push amd64 | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: check out the repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: login to Docker | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: build and push accelerated-bridge-cni | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
push: true | ||
platforms: linux/amd64 | ||
tags: | | ||
${{ env.IMAGE_NAME }}:latest-amd64 | ||
${{ env.IMAGE_NAME }}:${{ github.sha }} | ||
file: ./Dockerfile | ||
|
||
build-and-push-arm64-accelerated-bridge-cni: | ||
name: image push arm64 | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: check out the repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: login to Docker | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: build and push accelerated-bridge-cni | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
push: true | ||
platforms: linux/arm64 | ||
tags: | | ||
${{ env.IMAGE_NAME }}:latest-arm64 | ||
file: ./Dockerfile.arm64 | ||
|
||
build-and-push-ppc64le-accelerated-bridge-cni: | ||
name: image Push ppc64le | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: check out the repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: login to Docker | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: build and push accelerated-bridge-cni | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
push: true | ||
platforms: linux/ppc64le | ||
tags: | | ||
${{ env.IMAGE_NAME }}:latest-ppc64le | ||
file: ./Dockerfile.ppc64le | ||
|
||
push-manifest: | ||
runs-on: ubuntu-22.04 | ||
needs: [build-and-push-amd64-accelerated-bridge-cni,build-and-push-arm64-accelerated-bridge-cni,build-and-push-ppc64le-accelerated-bridge-cni] | ||
steps: | ||
- name: set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: login to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Create manifest for multi-arch images | ||
run: | | ||
docker buildx imagetools create -t ${{ env.IMAGE_NAME }}:latest \ | ||
${{ env.IMAGE_NAME }}:latest-amd64 \ | ||
${{ env.IMAGE_NAME }}:latest-arm64 \ | ||
${{ env.IMAGE_NAME }}:latest-ppc64le |
Oops, something went wrong.