Skip to content

Commit 1da6a9e

Browse files
committed
install more tools, more guidelines
1 parent a2356b9 commit 1da6a9e

4 files changed

Lines changed: 56 additions & 19 deletions

File tree

.github/scripts/download-gcc-bpf.sh

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,7 @@ INSTALL_DIR=$(realpath $2)
77

88
cd /tmp
99

10-
if ! command -v gh &> /dev/null; then
11-
# https://github.com/cli/cli/blob/trunk/docs/install_linux.md
12-
(type -p wget >/dev/null || (sudo apt update && sudo apt install wget -y)) \
13-
&& sudo mkdir -p -m 755 /etc/apt/keyrings \
14-
&& out=$(mktemp) && wget -nv -O$out https://cli.github.com/packages/githubcli-archive-keyring.gpg \
15-
&& cat $out | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \
16-
&& sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \
17-
&& sudo mkdir -p -m 755 /etc/apt/sources.list.d \
18-
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
19-
&& sudo apt update \
20-
&& sudo apt install gh -y
21-
fi
10+
$(dirname $0)/install-github-cli.sh
2211

2312
tag=$(gh release list -L 1 -R ${GCC_BPF_RELEASE_GH_REPO} --json tagName -q .[].tagName)
2413
if [[ -z "$tag" ]]; then
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
3+
set -euo pipefail
4+
5+
if ! command -v gh &> /dev/null; then
6+
# https://github.com/cli/cli/blob/trunk/docs/install_linux.md
7+
(type -p wget >/dev/null || (sudo apt update && sudo apt install wget -y)) \
8+
&& sudo mkdir -p -m 755 /etc/apt/keyrings \
9+
&& out=$(mktemp) && wget -nv -O$out https://cli.github.com/packages/githubcli-archive-keyring.gpg \
10+
&& cat $out | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \
11+
&& sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \
12+
&& sudo mkdir -p -m 755 /etc/apt/sources.list.d \
13+
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
14+
&& sudo apt update \
15+
&& sudo apt install gh -y
16+
fi

.github/workflows/ai-agent.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,17 @@ jobs:
121121
restore-keys: |
122122
notes-md-${{ github.repository }}-
123123
124+
- name: Install misc tools
125+
shell: bash
126+
env:
127+
GCC_VERSION: 14
128+
LLVM_VERSION: 19
129+
run: |
130+
sudo apt-get update -y
131+
${{ github.workspace }}/.github/scripts/install-github-cli.sh
132+
${{ github.workspace }}/ci/kernel-patches/runner/install-dependencies.sh all
133+
sudo apt-get install python3 jq
134+
124135
- uses: anthropics/claude-code-action@v1
125136
with:
126137
show_full_output: true
@@ -143,6 +154,12 @@ jobs:
143154
name: output
144155
path: output/
145156

157+
- name: Copy NOTES.md to the output
158+
shell: bash
159+
run: |
160+
mkdir -p output
161+
cp NOTES.md output/NOTES.md
162+
146163
- name: Save NOTES.md to cache
147164
if: always()
148165
uses: actions/cache/save@v5

ci/claude/bpf-ci-agent.md

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,36 @@ You have access to:
1919
- `dependencies` directory with the source code of various tools used
2020
in the CI testing
2121
- BPF CI worklow job logs accessible via GitHub
22+
- You should have access to github cli (gh) and github tools via MCP
23+
- BPF CI workflows run in kernel-patches/bpf GitHub repository
2224
- Your own notes stored in NOTES.md from the previous runs
2325

2426
## Guidelines
2527

2628
Your exploration should be driven by these principles:
27-
- Long term impact: will addressing a particular issue solve an actual
28-
problem Linux Kernel developers and users care about?
29-
- Human-prompted: was this issue ever brought up on the mailing list
30-
or in commit messages by developers? If yes, it's likely worth
31-
investigating.
32-
- Better signal-to-noise ratio
29+
- Focus on testing quality and coverage. Do not do the job of the
30+
Linux Kernel developers:
31+
- BPF CI is testing proposed code changes under active development,
32+
and it is expected that submitted patches may have bugs causing
33+
test failures. If a failure is clearly caused by the specific
34+
patch series, then **do not consider** it for the
35+
investigation. It is the job of the patch submitter to make sure
36+
the CI testing passes for their change.
37+
- On the other hand, if the same test failure happens across
38+
independent patches (PRs), then you **should** consider it for
39+
investigation. Because then this is either a regression caused by
40+
change already applied upstream, or a CI specific issue.
41+
- Long term impact: will addressing the issue solve an actual problem
42+
Linux Kernel developers and users care about?
43+
- Human-prompted: was this issue ever mentioned on the mailing list,
44+
in commit messages or in code comments by developers? If yes, it's
45+
likely worth investigating.
46+
- Better signal-to-noise ratio:
3347
- Is this issue flaky? Flaky issues are bad, because they make
3448
developers numb to the CI failures.
3549
- Is this issue caused by an external dependency? If a failure was
36-
caused by a github outage, it's not worth investigating.
50+
caused by a github outage, for example, then it's not worth
51+
investigating.
3752

3853
You are free to use the existing CI scripts and Linux code, and write,
3954
compile and run your own code to investigate, experiment and test.

0 commit comments

Comments
 (0)