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

ci: Run BPF lints on workflow definition changes #28122

Merged
merged 1 commit into from
Sep 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 6 additions & 3 deletions .github/workflows/lint-bpf-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
bpf-tree: ${{ steps.changes.outputs.bpf-tree }}
coccinelle: ${{ steps.changes.outputs.coccinelle }}
bpf-tests-runner: ${{ steps.changes.outputs.bpf-tests-runner }}
workflow-description: ${{ steps.changes.outputs.workflow-description }}
steps:
- name: Checkout code
if: ${{ !github.event.pull_request }}
Expand All @@ -43,6 +44,8 @@ jobs:
bpf-tests-runner:
- 'test/bpf_tests/**'
- 'pkg/bpf/**'
workflow-description:
- '.github/workflows/lint-bpf-checks.yaml'

checkpatch:
name: Check Patch
Expand All @@ -60,7 +63,7 @@ jobs:
# Runs only if code under bpf/ or contrib/coccinnelle/ is changed.
coccicheck:
needs: check_changes
if: ${{ needs.check_changes.outputs.bpf-tree == 'true' || needs.check_changes.outputs.coccinelle == 'true' }}
if: ${{ needs.check_changes.outputs.bpf-tree == 'true' || needs.check_changes.outputs.coccinelle == 'true' || needs.check_changes.outputs.workflow-description == 'true' }}
name: Run coccicheck
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -92,7 +95,7 @@ jobs:
# Runs only if code under bpf/ is changed.
build_all:
needs: [check_changes, set_clang_dir]
if: ${{ needs.check_changes.outputs.bpf-tree == 'true' }}
if: ${{ needs.check_changes.outputs.bpf-tree == 'true' || needs.check_changes.outputs.workflow-description == 'true' }}
name: Build Datapath
runs-on: ubuntu-22.04
steps:
Expand Down Expand Up @@ -130,7 +133,7 @@ jobs:

bpf_tests:
needs: [check_changes, set_clang_dir]
if: ${{ needs.check_changes.outputs.bpf-tree == 'true' || needs.check_changes.outputs.bpf-tests-runner == 'true' }}
if: ${{ needs.check_changes.outputs.bpf-tree == 'true' || needs.check_changes.outputs.bpf-tests-runner == 'true' || needs.check_changes.outputs.workflow-description == 'true' }}
name: BPF unit/integration Tests
runs-on: ubuntu-22.04
steps:
Expand Down