Skip to content
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
23 changes: 19 additions & 4 deletions .github/workflows/kernel-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,25 @@ jobs:
KBUILD_OUTPUT: ${{ github.workspace }}/kbuild-output
KERNEL: ${{ inputs.kernel }}
KERNEL_ROOT: ${{ github.workspace }}
REFERENCE_REPO_PATH: /libbpfci/mirrors/linux
REPO_PATH: ""
REPO_ROOT: ${{ github.workspace }}
RUNNER_TYPE: ${{ contains(fromJSON(inputs.runs_on), 'codebuild') && 'codebuild' || 'default' }}
steps:

# git version 2.43.0 (current Ubuntu 24 installation)
# does not support git clone --revision option
# so make sure latest git is installed
- name: Install latest git
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y software-properties-common
sudo add-apt-repository -y ppa:git-core/ppa
sudo apt-get update
sudo apt-get install -y git
git --version

- uses: actions/checkout@v4
with:
fetch-depth: ${{ inputs.download_sources && 1 || env.BPF_NEXT_FETCH_DEPTH }}
Expand All @@ -87,7 +102,7 @@ jobs:

- uses: ./prepare-incremental-build
with:
repo-root: ${{ inputs.download_sources && '.kernel' || env.REPO_ROOT }}
repo-root: '.kernel'
base-branch: >-
${{ inputs.download_sources && env.BPF_NEXT_BASE_BRANCH
|| github.event_name == 'pull_request' && github.base_ref
Expand All @@ -96,12 +111,12 @@ jobs:
arch: ${{ inputs.arch }}
toolchain_full: ${{ inputs.toolchain_full }}
kbuild-output: ${{ env.KBUILD_OUTPUT }}
- if: ${{ inputs.download_sources }}
name: Move linux source in place

- name: Move linux source in place
shell: bash
run: |
cd .kernel
rm -rf .git
rm -rf .git .github ci
mv -t .. $(ls -A)
cd ..
rmdir .kernel
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/kernel-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ jobs:
KERNEL_TEST: ${{ inputs.test }}
SELFTESTS_BPF: ${{ github.workspace }}/selftests/bpf
VMTEST_CONFIGS: ${{ github.workspace }}/ci/vmtest/configs
VMTEST_MEMORY: 5G
VMTEST_NUM_CPUS: 2
TEST_PROGS_TRAFFIC_MONITOR: ${{ inputs.arch == 'x86_64' && 'true' || '' }}
TEST_PROGS_WATCHDOG_TIMEOUT: 600
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:
build_runs_on: ["ubuntu-24.04"]
arch: ["x86_64"]
kernel_compiler: ["gcc", "llvm"]
gcc_version: [15]
llvm_version: [20]
gcc_version: [14]
llvm_version: [21]
kernel: ["LATEST"]
build_release: [false]
tests:
Expand All @@ -28,7 +28,7 @@ jobs:
- {"test": "test_progs_no_alu32", "continue_on_error": false, "timeout_minutes": 360}
- {"test": "test_verifier", "continue_on_error": false, "timeout_minutes": 360}
- {"test": "test_maps", "continue_on_error": false, "timeout_minutes": 360}
- {"test": "sched_ext", "continue_on_error": false, "timeout_minutes": 360}
# - {"test": "sched_ext", "continue_on_error": false, "timeout_minutes": 360}
# - {"test": "test_progs-bpf_gcc", "continue_on_error": false, "timeout_minutes": 360}
fail-fast: false

Expand Down
1 change: 1 addition & 0 deletions build-selftests/build_selftests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ MAKE_OPTS=$(cat <<EOF
CROSS_COMPILE=${CROSS_COMPILE}
CLANG=clang-${LLVM_VERSION}
LLC=llc-${LLVM_VERSION}
LLVM_CONFIG=llvm-config-${LLVM_VERSION}
LLVM_STRIP=llvm-strip-${LLVM_VERSION}
VMLINUX_BTF=${VMLINUX_BTF}
VMLINUX_H=${VMLINUX_H}
Expand Down
4 changes: 3 additions & 1 deletion run-vmtest/install-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ sudo chmod 755 /usr/bin/vmtest

sudo apt-get update -y
sudo -E apt-get install --no-install-recommends -y \
binutils cpu-checker ethtool gawk iproute2 iptables iputils-ping keyutils libpcap-dev make
binutils cpu-checker ethtool gawk iproute2 iptables iputils-ping \
keyutils libpcap-dev llvm-dev libz3-4 make zlib1g

sudo -E apt-get install --no-install-recommends -y \
qemu-guest-agent qemu-kvm qemu-system-arm qemu-system-s390x qemu-system-x86 qemu-utils
2 changes: 1 addition & 1 deletion setup-build-env/action.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export GITHUB_ACTION_PATH=${GITHUB_ACTION_PATH:-$(pwd)}
export PAHOLE_BRANCH=${PAHOLE_BRANCH:-master}
export PAHOLE_ORIGIN=${PAHOLE_ORIGIN:-https://git.kernel.org/pub/scm/devel/pahole/pahole.git}
export GCC_VERSION=${GCC_VERSION:-15}
export LLVM_VERSION=${LLVM_VERSION:-20}
export LLVM_VERSION=${LLVM_VERSION:-21}
export TARGET_ARCH=${TARGET_ARCH:-$(uname -m)}

# gcc >= 15 is not available in Ubuntu 24
Expand Down
8 changes: 3 additions & 5 deletions setup-build-env/build_pahole.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,9 @@ git remote add origin ${PAHOLE_ORIGIN}
git fetch --depth=1 origin "${PAHOLE_BRANCH}"
git checkout "${PAHOLE_BRANCH}"

mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -D__LIB=lib ..
make -j$((4*$(nproc)))
sudo make install
cmake -Bbuild -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr
make -C build -j$(nproc)
sudo make -C build install

export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:-}:/usr/local/lib
ldd $(which pahole)
Expand Down
2 changes: 1 addition & 1 deletion setup-build-env/install_clang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ sudo -E apt-get install --no-install-recommends -y \

curl -O https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh ${LLVM_VERSION}
sudo ./llvm.sh ${LLVM_VERSION} all

foldable end install_clang
21 changes: 12 additions & 9 deletions setup-build-env/install_cross_compilation_toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,31 +20,34 @@ source /etc/os-release
DEB_ARCH="$(platform_to_deb_arch "${TARGET_ARCH}")"
DEB_HOST_ARCH="$(dpkg --print-architecture)"
GCC_VERSION=${GCC_VERSION:-14}
UBUNTU_CODENAME=${UBUNTU_CODENAME:-noble}

if [ "${GCC_VERSION}" -ge 15 ]; then
UBUNTU_CODENAME=${UBUNTU_CODENAME_OVERRIDE}
fi
if [ "${ID}" == "ubuntu" ]; then
UBUNTU_CODENAME=${UBUNTU_CODENAME:-noble}
if [ "${GCC_VERSION}" -ge 15 ]; then
UBUNTU_CODENAME=${UBUNTU_CODENAME_OVERRIDE}
fi

# Disable other apt sources for foreign architectures to avoid 404 errors
# Only allow fetching packages for the added architecture from ports.ubuntu.com
sudo tee /etc/apt/apt.conf.d/99-no-foreign-arch <<APT_CONF
# Disable other apt sources for foreign architectures to avoid 404 errors
# Only allow fetching packages for the added architecture from ports.ubuntu.com
sudo tee /etc/apt/apt.conf.d/99-no-foreign-arch <<APT_CONF
APT::Architectures "${DEB_HOST_ARCH}";
APT::Architectures:: "${DEB_ARCH}";
APT_CONF

sudo dpkg --add-architecture "$DEB_ARCH"
cat <<EOF | sudo tee /etc/apt/sources.list.d/xcompile.sources
cat <<EOF | sudo tee /etc/apt/sources.list.d/xcompile.sources
Types: deb
URIs: http://ports.ubuntu.com/ubuntu-ports
Suites: ${UBUNTU_CODENAME} ${UBUNTU_CODENAME}-updates ${UBUNTU_CODENAME}-security
Components: main restricted universe multiverse
Architectures: ${DEB_ARCH}
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
EOF
fi

sudo dpkg --add-architecture "$DEB_ARCH"
sudo apt-get update -y
sudo apt-get install -y --no-install-recommends \
binfmt-support qemu-user-static \
"gcc-${GCC_VERSION}-${TARGET_ARCH}-linux-gnu" \
"g++-${GCC_VERSION}-${TARGET_ARCH}-linux-gnu" \
"linux-libc-dev:${DEB_ARCH}" \
Expand Down
12 changes: 7 additions & 5 deletions setup-build-env/install_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ foldable start install_packages

source /etc/os-release

if [[ "$GCC_VERSION" -ge 15 && "${UBUNTU_CODENAME}" != "${UBUNTU_CODENAME_OVERRIDE}" ]]; then
if [[ "$ID" == "ubuntu" && $GCC_VERSION -ge 15 && "${UBUNTU_CODENAME}" != "${UBUNTU_CODENAME_OVERRIDE}" ]]; then
UBUNTU_CODENAME=${UBUNTU_CODENAME_OVERRIDE}
cat <<EOF | sudo tee /etc/apt/sources.list.d/${UBUNTU_CODENAME}.list
deb http://archive.ubuntu.com/ubuntu ${UBUNTU_CODENAME} main universe
Expand All @@ -28,10 +28,12 @@ fi

sudo apt-get update -y

# add git-core/ppa to install latest git version
sudo -E apt-get install -y software-properties-common
sudo add-apt-repository -y ppa:git-core/ppa
sudo apt-get update -y
if [[ "$ID" == "ubuntu" ]]; then
# add git-core/ppa to install latest git version
sudo -E apt-get install -y software-properties-common
sudo add-apt-repository -y ppa:git-core/ppa
sudo apt-get update -y
fi

sudo -E apt-get install --no-install-recommends -y \
bc bison build-essential cmake cpu-checker curl dumb-init \
Expand Down
Loading