Skip to content

Keywords self-tests with QEMU #7449

Keywords self-tests with QEMU

Keywords self-tests with QEMU #7449

# SPDX-FileCopyrightText: 2025 3mdeb <[email protected]>
#
# SPDX-License-Identifier: Apache-2.0
name: Keywords self-tests with QEMU
on:
schedule:
- cron: '0 0 * * *' # Every day at midnight
workflow_dispatch:
pull_request:
branches:
- develop
- main
paths:
- 'lib/**'
- 'keywords.robot'
- '.github/workflows/qemu-self-test.yml'
- 'scripts/ci/qemu-self-test.sh'
- 'scripts/ci/qemu-run.sh'
- 'requirements.txt'
jobs:
qemu:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Chceckout submodules
run: |
git submodule update --init --checkout --recursive
- name: Set up QEMU
run: |
sudo apt-get update
sudo apt-get install qemu-system-x86-64 swtpm
# Based on: https://github.blog/changelog/2023-02-23-hardware-accelerated-android-virtualization-on-actions-windows-and-linux-larger-hosted-runners/
# It mentiones enteprise large-runners, let's see if it works
# on regular public runners as well
- name: Enable KVM group perms
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Start QEMU in background
run: |
./scripts/ci/qemu-run.sh nographic firmware &
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Set up git-annex
uses: jstritch/setup-git-annex@v1
- name: Set up osfv-test-data
working-directory: osfv-test-data
run: |
set +e
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git annex pull
./setup.sh
- name: Start keywords self-tests with QEMU
run: |
./scripts/ci/qemu-self-test.sh
- name: Save artifacts
if: '!cancelled()'
uses: actions/upload-artifact@v4
with:
name: "qemu-logs"
path: |
./logs/
retention-days: 30