From 92316f5072149469803e3a3319e5293756dfb7c1 Mon Sep 17 00:00:00 2001 From: Manu Bretelle Date: Wed, 21 Aug 2024 14:36:48 -0700 Subject: [PATCH] ci: Pass llvm-version as an input and enforce passing it to build-selftests action Signed-off-by: Manu Bretelle --- .github/actions/build-selftests/action.yml | 5 +++++ .github/actions/build-selftests/build_selftests.sh | 5 ----- .github/actions/vmtest/action.yml | 6 ++++++ 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/actions/build-selftests/action.yml b/.github/actions/build-selftests/action.yml index c677fe0..7874229 100644 --- a/.github/actions/build-selftests/action.yml +++ b/.github/actions/build-selftests/action.yml @@ -12,6 +12,9 @@ inputs: description: 'where is vmlinux file' required: true default: '${{ github.workspace }}/vmlinux' + llvm-version: + description: 'llvm version' + required: true runs: using: "composite" @@ -28,4 +31,6 @@ runs: export REPO_ROOT="${{ github.workspace }}" export REPO_PATH="${{ inputs.repo-path }}" export VMLINUX_BTF="${{ inputs.vmlinux }}" + export LLVM_VERSION="${{ inputs.llvm-version }}" + ${{ github.action_path }}/build_selftests.sh diff --git a/.github/actions/build-selftests/build_selftests.sh b/.github/actions/build-selftests/build_selftests.sh index 512d7d7..54ad055 100755 --- a/.github/actions/build-selftests/build_selftests.sh +++ b/.github/actions/build-selftests/build_selftests.sh @@ -10,15 +10,10 @@ foldable start prepare_selftests "Building selftests" LIBBPF_PATH="${REPO_ROOT}" -llvm_default_version() { - echo "17" -} - llvm_latest_version() { echo "19" } -LLVM_VERSION=$(llvm_default_version) if [[ "${LLVM_VERSION}" == $(llvm_latest_version) ]]; then REPO_DISTRO_SUFFIX="" else diff --git a/.github/actions/vmtest/action.yml b/.github/actions/vmtest/action.yml index fcd1a78..6bf6cdb 100644 --- a/.github/actions/vmtest/action.yml +++ b/.github/actions/vmtest/action.yml @@ -13,6 +13,10 @@ inputs: description: 'pahole rev or master' required: true default: 'master' + llvm-version: + description: 'llvm version' + required: false + default: '17' runs: using: "composite" steps: @@ -38,6 +42,7 @@ runs: with: pahole: ${{ inputs.pahole }} arch: ${{ inputs.arch }} + llvm-version: ${{ inputs.llvm-version }} # 1. download CHECKPOINT kernel source - name: Get checkpoint commit shell: bash @@ -93,6 +98,7 @@ runs: with: repo-path: '.kernel' kernel: ${{ inputs.kernel }} + llvm-version: ${{ inputs.llvm-version }} # 4. prepare rootfs - name: prepare rootfs uses: libbpf/ci/prepare-rootfs@main