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
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
build_runs_on: ["ubuntu-24.04"]
arch: ["x86_64"]
kernel_compiler: ["gcc", "llvm"]
gcc_version: [14]
gcc_version: [15]
llvm_version: [20]
kernel: ["LATEST"]
build_release: [false]
Expand Down
1 change: 1 addition & 0 deletions ci/vmtest/configs/DENYLIST
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ connect_force_port # unreliably fails
sockmap_ktls/sockmap_ktls disconnect_after_delete* # https://lore.kernel.org/bpf/20250415163332.1836826-1-ihor.solodrai@linux.dev/
verif_scale_pyperf600 # llvm 20 generates code that fails verification
arena_spin_lock # llvm 20 generates code that fails verification
perf_branches/perf_branches_no_hw # this fails on github-hosted runners
1 change: 0 additions & 1 deletion ci/vmtest/configs/DENYLIST.test_progs-no_alu32

This file was deleted.

21 changes: 21 additions & 0 deletions setup-build-env/action.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

set -x -euo pipefail

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 TARGET_ARCH=${TARGET_ARCH:-$(uname -m)}

# gcc >= 15 is not available in Ubuntu 24
# use this variable to set up alternative apt repositories
export UBUNTU_CODENAME_OVERRIDE=plucky # Ubuntu 25.04 with GCC 15.0.1

${GITHUB_ACTION_PATH}/install_packages.sh
${GITHUB_ACTION_PATH}/install_clang.sh
${GITHUB_ACTION_PATH}/build_pahole.sh

${GITHUB_ACTION_PATH}/install_cross_compilation_toolchain.sh $TARGET_ARCH
19 changes: 2 additions & 17 deletions setup-build-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,10 @@ runs:
shell: bash
env:
GCC_VERSION: ${{ inputs.gcc-version }}
run: |
${GITHUB_ACTION_PATH}/install_packages.sh
- name: Install clang
shell: bash
env:
LLVM_VERSION: ${{ inputs.llvm-version }}
run: |
${GITHUB_ACTION_PATH}/install_clang.sh
- name: Install pahole
shell: bash
env:
PAHOLE_BRANCH: ${{ inputs.pahole }}
PAHOLE_ORIGIN: ${{ inputs.pahole-origin }}
TARGET_ARCH: ${{ inputs.arch }}
run: |
${GITHUB_ACTION_PATH}/build_pahole.sh
${GITHUB_ACTION_PATH}/action.sh
echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH:-}:/usr/local/lib" >> $GITHUB_ENV
- name: Install cross compilation toolchain
shell: bash
env:
GCC_VERSION: ${{ inputs.gcc-version }}
run: |
${GITHUB_ACTION_PATH}/install_cross_compilation_toolchain.sh ${{ inputs.arch }}
32 changes: 17 additions & 15 deletions setup-build-env/install_cross_compilation_toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,19 @@ source /etc/os-release

DEB_ARCH="$(platform_to_deb_arch "${TARGET_ARCH}")"
DEB_HOST_ARCH="$(dpkg --print-architecture)"
UBUNTU_CODENAME=${VERSION_CODENAME:-noble}
GCC_VERSION=${GCC_VERSION:-14}
UBUNTU_CODENAME=${UBUNTU_CODENAME:-noble}

cat <<EOF | sudo tee /etc/apt/sources.list.d/ubuntu.sources
Types: deb
URIs: http://archive.ubuntu.com/ubuntu/
Suites: ${UBUNTU_CODENAME} ${UBUNTU_CODENAME}-updates ${UBUNTU_CODENAME}-backports
Components: main restricted universe multiverse
Architectures: ${DEB_HOST_ARCH}
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
if [ "${GCC_VERSION}" -ge 15 ]; then
UBUNTU_CODENAME=${UBUNTU_CODENAME_OVERRIDE}
fi

Types: deb
URIs: http://security.ubuntu.com/ubuntu/
Suites: ${UBUNTU_CODENAME}-security
Components: main restricted universe multiverse
Architectures: ${DEB_HOST_ARCH}
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
EOF
# 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
Expand All @@ -61,10 +56,17 @@ sudo update-alternatives --install \
/usr/bin/${TARGET_ARCH}-linux-gnu-gcc \
${TARGET_ARCH}-linux-gnu-gcc \
/usr/bin/${TARGET_ARCH}-linux-gnu-gcc-${GCC_VERSION} 10
sudo update-alternatives --set \
${TARGET_ARCH}-linux-gnu-gcc \
/usr/bin/${TARGET_ARCH}-linux-gnu-gcc-${GCC_VERSION}


sudo update-alternatives --install \
/usr/bin/${TARGET_ARCH}-linux-gnu-g++ \
${TARGET_ARCH}-linux-gnu-g++ \
/usr/bin/${TARGET_ARCH}-linux-gnu-g++-${GCC_VERSION} 10
sudo update-alternatives --set \
${TARGET_ARCH}-linux-gnu-g++ \
/usr/bin/${TARGET_ARCH}-linux-gnu-g++-${GCC_VERSION}

foldable end install_crosscompile
27 changes: 25 additions & 2 deletions setup-build-env/install_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,35 @@ export GCC_VERSION=${GCC_VERSION:-14}

foldable start install_packages

source /etc/os-release

if [[ "$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
deb http://archive.ubuntu.com/ubuntu ${UBUNTU_CODENAME}-updates main universe
deb http://archive.ubuntu.com/ubuntu ${UBUNTU_CODENAME}-security main universe
EOF
cat <<EOF | sudo tee /etc/apt/preferences.d/${UBUNTU_CODENAME}
Package: *
Pin: release n=${UBUNTU_CODENAME}
Pin-Priority: 999
EOF
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

sudo -E apt-get install --no-install-recommends -y \
bc bison build-essential cmake cpu-checker curl dumb-init \
elfutils ethtool ethtool flex gawk git iproute2 iptables \
iputils-ping jq keyutils libguestfs-tools pkg-config \
python3-docutils python3-minimal rsync software-properties-common \
sudo texinfo tree tzdata wget xxd xz-utils zstd
python3-docutils python3-minimal rsync sudo texinfo tree \
tzdata wget xxd xz-utils zstd

sudo -E apt-get install --no-install-recommends -y \
binutils-dev libcap-dev libdw-dev libelf-dev libpcap-dev \
Expand All @@ -30,5 +51,7 @@ sudo -E apt-get install --no-install-recommends -y \
sudo apt-get install -y gcc-${GCC_VERSION} g++-${GCC_VERSION}
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${GCC_VERSION} 10
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-${GCC_VERSION} 10
sudo update-alternatives --set gcc /usr/bin/gcc-${GCC_VERSION}
sudo update-alternatives --set g++ /usr/bin/g++-${GCC_VERSION}

foldable end install_packages
Loading