diff --git a/.github/workflows/kernel-build.yml b/.github/workflows/kernel-build.yml index c66d041d..1d66869a 100644 --- a/.github/workflows/kernel-build.yml +++ b/.github/workflows/kernel-build.yml @@ -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 }} @@ -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 @@ -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 diff --git a/.github/workflows/kernel-test.yml b/.github/workflows/kernel-test.yml index 4c298516..2bd4daac 100644 --- a/.github/workflows/kernel-test.yml +++ b/.github/workflows/kernel-test.yml @@ -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: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f7b176ea..11600753 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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: @@ -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 diff --git a/build-selftests/build_selftests.sh b/build-selftests/build_selftests.sh index 03049bb4..103d24f9 100755 --- a/build-selftests/build_selftests.sh +++ b/build-selftests/build_selftests.sh @@ -39,6 +39,7 @@ MAKE_OPTS=$(cat <= 15 is not available in Ubuntu 24 diff --git a/setup-build-env/build_pahole.sh b/setup-build-env/build_pahole.sh index 9e607232..8f403d84 100755 --- a/setup-build-env/build_pahole.sh +++ b/setup-build-env/build_pahole.sh @@ -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) diff --git a/setup-build-env/install_clang.sh b/setup-build-env/install_clang.sh index 62447ee2..97e78816 100755 --- a/setup-build-env/install_clang.sh +++ b/setup-build-env/install_clang.sh @@ -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 diff --git a/setup-build-env/install_cross_compilation_toolchain.sh b/setup-build-env/install_cross_compilation_toolchain.sh index 17b2e072..79ba982e 100755 --- a/setup-build-env/install_cross_compilation_toolchain.sh +++ b/setup-build-env/install_cross_compilation_toolchain.sh @@ -20,21 +20,21 @@ 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 <