From 76d288d6062ec2a86292cbcca239275180d8635f Mon Sep 17 00:00:00 2001 From: Pavel Abramov Date: Tue, 24 Oct 2023 17:30:21 +0200 Subject: [PATCH] GitHub Actions handle accelaration based on runner capabilities Signed-off-by: Pavel Abramov --- .github/actions/setup-environment/action.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/actions/setup-environment/action.yml b/.github/actions/setup-environment/action.yml index 4b520e200..42b7fd86f 100644 --- a/.github/actions/setup-environment/action.yml +++ b/.github/actions/setup-environment/action.yml @@ -34,7 +34,7 @@ runs: - name: Install Packages run: | sudo add-apt-repository ppa:stefanberger/swtpm-jammy - sudo apt install -y qemu-utils qemu-system-x86 jq swtpm + sudo apt install -y qemu-utils qemu-system-x86 jq swtpm util-linux shell: bash - name: Build tests run: | @@ -44,7 +44,11 @@ runs: - name: Configure run: | ./eden config add default - ./eden config set default --key=eve.accel --value=false + if lscpu | grep -oEq "vmx|svm"; then + ./eden config set default --key=eve.accel --value=true + else + ./eden config set default --key=eve.accel --value=false + fi ./eden config set default --key=eve.tpm --value=${{ inputs.tpm_enabled }} ./eden config set default --key=eve.cpu --value=2 shell: bash