From e1ad43c714450820df932f048c1c1cee25d236fb Mon Sep 17 00:00:00 2001 From: Akihiro Suda Date: Fri, 15 Dec 2023 14:33:40 +0900 Subject: [PATCH] CI: install CRIU only if CONFIG_CHECKPOINT_RESTORE is enabled Signed-off-by: Akihiro Suda --- .github/workflows/test.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e87f84f4fcd..75cdd15973d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -52,12 +52,18 @@ jobs: env: PREFIX: https://download.opensuse.org/repositories/devel:/tools:/criu/xUbuntu run: | - # criu repo - REPO=${PREFIX}_$(echo ${{ matrix.os }} | sed 's/.*-//') - curl -fSsLl $REPO/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/devel_tools_criu.gpg > /dev/null - echo "deb $REPO/ /" | sudo tee /etc/apt/sources.list.d/criu.list + packages="libseccomp-dev sshfs" + if script/check-config.sh | grep -q "CONFIG_CHECKPOINT_RESTORE:\s*enabled"; then + # criu repo + REPO=${PREFIX}_$(echo ${{ matrix.os }} | sed 's/.*-//') + curl -fSsLl $REPO/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/devel_tools_criu.gpg > /dev/null + echo "deb $REPO/ /" | sudo tee /etc/apt/sources.list.d/criu.list + packages="$packages criu" + else + echo >&2 "Skipping installation of CRIU, as CONFIG_CHECKPOINT_RESTORE seems missing" + fi sudo apt update - sudo apt install -y libseccomp-dev criu sshfs + sudo apt install -y $packages - name: install deps (criu ${{ matrix.criu }}) if: matrix.criu != ''