From 648f92b0c6c05d206b4ed2b4612e11c80de826dd Mon Sep 17 00:00:00 2001 From: Ihor Solodrai Date: Tue, 5 Nov 2024 14:10:49 -0800 Subject: [PATCH] run-vmtest@v2: modify CI workflows for newer run-vmtest scripts Signed-off-by: Ihor Solodrai --- .github/workflows/kernel-build.yml | 1 + .github/workflows/kernel-test.yml | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/.github/workflows/kernel-build.yml b/.github/workflows/kernel-build.yml index 071e9ff..1819a2f 100644 --- a/.github/workflows/kernel-build.yml +++ b/.github/workflows/kernel-build.yml @@ -56,6 +56,7 @@ jobs: KERNEL: ${{ inputs.kernel }} REPO_PATH: "" REPO_ROOT: ${{ github.workspace }} + KERNEL_ROOT: ${{ github.workspace }} steps: - uses: actions/checkout@v4 # We fetch an actual bit of history here to facilitate incremental diff --git a/.github/workflows/kernel-test.yml b/.github/workflows/kernel-test.yml index 21efc04..f2386ce 100644 --- a/.github/workflows/kernel-test.yml +++ b/.github/workflows/kernel-test.yml @@ -38,21 +38,46 @@ jobs: runs-on: ${{ fromJSON(inputs.runs_on) }} timeout-minutes: 100 env: + ARCH: ${{ inputs.arch }} KERNEL: ${{ inputs.kernel }} REPO_ROOT: ${{ github.workspace }} REPO_PATH: "" # https://github.com/actions/runner/issues/1483#issuecomment-1031671517 # booleans are weird in GH. CONTINUE_ON_ERROR: ${{ inputs.continue_on_error }} + DEPLOYMENT: ${{ github.repository == 'kernel-patches/bpf' && 'prod' || 'rc' }} + ALLOWLIST_FILE: /tmp/allowlist + DENYLIST_FILE: /tmp/denylist steps: - uses: actions/checkout@v4 + - uses: actions/download-artifact@v4 with: name: vmlinux-${{ inputs.arch }}-${{ inputs.toolchain_full }} path: . + - name: Untar artifacts # zstd is installed by default in the runner images. run: zstd -d -T0 vmlinux-${{ inputs.arch }}-${{ inputs.toolchain_full }}.tar.zst --stdout | tar -xf - + + - name: Prepare ALLOW/DENYLIST + env: + SELFTESTS_BPF: ${{ github.workspace }}/selftests/bpf + VMTEST_CONFIGS: ${{ github.workspace }}/ci/vmtest/configs + run: | + cat "${SELFTESTS_BPF}/ALLOWLIST" \ + "${SELFTESTS_BPF}/ALLOWLIST.${ARCH}" \ + "${VMTEST_CONFIGS}/ALLOWLIST" \ + "${VMTEST_CONFIGS}/ALLOWLIST.${ARCH}" \ + 2> /dev/null > "${ALLOWLIST_FILE}" || true + + cat "${SELFTESTS_BPF}/DENYLIST" \ + "${SELFTESTS_BPF}/DENYLIST.${ARCH}" \ + "${VMTEST_CONFIGS}/DENYLIST" \ + "${VMTEST_CONFIGS}/DENYLIST.${ARCH}" \ + "${VMTEST_CONFIGS}/DENYLIST.${DEPLOYMENT}" \ + 2> /dev/null > "${DENYLIST_FILE}" || true + - name: Run selftests uses: ./run-vmtest # https://github.com/actions/runner/issues/1483#issuecomment-1031671517