chore(deps): update bpfman to 406afbb #667
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
name: pull request checks | |
on: | |
pull_request: | |
branches: ['*'] | |
jobs: | |
check-license: | |
runs-on: ubuntu-latest | |
timeout-minutes: 3 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check License Header | |
uses: apache/skywalking-eyes@cd7b195c51fd3d6ad52afceb760719ddc6b3ee91 | |
build-lint-test: | |
name: Build (Go ${{ matrix.go }} - ${{ matrix.arch.arch }}) | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
go: ['1.22'] | |
arch: | |
- arch: amd64 | |
filename: linux-x86_64 | |
- arch: arm64 | |
filename: linux-arm64 | |
- arch: ppc64le | |
filename: linux-ppc64le | |
- arch: s390x | |
filename: linux-s390x | |
steps: | |
- name: Install go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: Checkout bpfman-operator | |
uses: actions/checkout@v4 | |
- name: Check format | |
if: ${{ matrix.arch.arch == 'amd64' }} | |
run: make fmt && git add -A && git diff --exit-code | |
- name: Build Operator and Agent | |
run: GOARCH=${{ matrix.arch.arch }} make build | |
- name: Run lint | |
if: ${{ matrix.arch.arch == 'amd64' }} | |
run: make lint | |
- name: Verify Autogenerated Code | |
if: ${{ matrix.arch.arch == 'amd64' }} | |
run: make verify | |
- name: Run test | |
if: ${{ matrix.arch.arch == 'amd64' }} | |
run: make test | |
- name: Archive Go code coverage results | |
if: ${{ matrix.arch.arch == 'amd64' && matrix.go == '1.22' }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: coverage-go | |
path: cover.out | |
if-no-files-found: error | |
- name: Check clean vendors | |
if: ${{ matrix.arch.arch == 'amd64' }} | |
run: go mod vendor | |
- name: Verify generated bundle manifest | |
if: ${{ matrix.arch.arch == 'amd64' }} | |
run: | | |
make bundle | |
git diff --exit-code -I'^ createdAt: ' bundle | |
kubernetes-integration-tests: | |
name: Kubernetes Integration Tests (Go ${{ matrix.go }} - amd64 - ${{ matrix.oci_bin }}) | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
go: ['1.22'] | |
oci_bin: ['docker', 'podman'] | |
env: | |
BPFMAN_AGENT_IMG: quay.io/bpfman/bpfman-agent:int-test | |
BPFMAN_OPERATOR_IMG: quay.io/bpfman/bpfman-operator:int-test | |
XDP_PASS_PRIVATE_IMAGE_CREDS: ${{ secrets.XDP_PASS_PRIVATE_IMAGE_CREDS }} | |
steps: | |
- name: Check disk space | |
run: df -h | |
- name: Free up space | |
run: | | |
sudo rm -rf /usr/share/dotnet | |
sudo rm -rf /opt/ghc | |
sudo rm -rf "/usr/local/share/boost" | |
sudo rm -rf "$AGENT_TOOLSDIRECTORY" | |
sudo rm -rf /usr/local/lib/android | |
- name: Check disk space again | |
run: df -h | |
- name: Install go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: cache go modules | |
uses: actions/cache@v4 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-build-codegen-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-build-codegen- | |
- name: Checkout bpfman-operator | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install OCI runtime (Docker or Podman) | |
run: | | |
if [ "${{ matrix.oci_bin }}" = "podman" ]; then | |
sudo apt-get update && sudo apt-get install -y podman | |
fi | |
- name: Build Operator and Agent images with ${{ matrix.oci_bin }} | |
run: | | |
make OCI_BIN=${{ matrix.oci_bin }} build-images | |
# Run integration tests only if OCI_BIN is Docker. | |
- name: Run integration tests | |
if: ${{ matrix.oci_bin == 'docker' }} | |
run: | | |
make test-integration | |
- name: Check disk space | |
run: df -h | |
## Upload diagnostics if integration test step failed. | |
- name: Upload diagnostics | |
if: ${{ failure() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: kubernetes-integration-test-diag | |
path: /tmp/ktf-diag* | |
if-no-files-found: ignore | |
coverage: | |
needs: [build-lint-test] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download golang coverage artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: coverage-go | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
with: | |
files: ./cover.out | |
flags: unittests | |
fail_ci_if_error: false | |
verbose: true | |
build-workflow-complete: | |
needs: | |
[ | |
check-license, | |
build-lint-test, | |
coverage, | |
kubernetes-integration-tests, | |
] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Build Complete | |
run: echo "Build Complete" |