mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
Increase the number of parallel integration tests in CI to save ~3-5 minutes per x86_64 run. The thread limit is driven by RAM and disk space constraints, not CPU availability. A new `PARALLEL_INTEGRATION_TESTS_NUM` environment variable controls the thread count. In CI it is set explicitly (12 for x86_64, 25 for ARM64); locally it falls back to `nproc / 4`, preserving the previous behavior. Only the first test group (`common_parallel`, `live_migration_parallel`) uses the overridden value - subsequent groups (dbus_api, fw_cfg, ivshmem, aarch64_acpi) continue to use the `nproc / 4` default. On-behalf-of: SAP philipp.schuster@sap.com Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
59 lines
3.1 KiB
YAML
59 lines
3.1 KiB
YAML
name: Cloud Hypervisor Tests (x86-64)
|
|
on: [pull_request, merge_group]
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ github.event_name }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build:
|
|
timeout-minutes: 80
|
|
env:
|
|
# Our runner has 16 cores (nproc).
|
|
# We limit parallelism only to avoid exhausting disk space and memory
|
|
# resources, not to save CPU resources.
|
|
PARALLEL_INTEGRATION_TESTS_NUM: 12
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
runner: ['garm-jammy', "garm-jammy-amd"]
|
|
libc: ["musl", 'gnu']
|
|
name: Tests (x86-64)
|
|
runs-on: ${{ github.event_name == 'pull_request' && !(matrix.runner == 'garm-jammy' && matrix.libc == 'gnu') && 'ubuntu-latest' || format('{0}-16', matrix.runner) }}
|
|
steps:
|
|
- name: Code checkout
|
|
if: ${{ github.event_name != 'pull_request' || (matrix.runner == 'garm-jammy' && matrix.libc == 'gnu') }}
|
|
uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Install Docker
|
|
if: ${{ github.event_name != 'pull_request' || (matrix.runner == 'garm-jammy' && matrix.libc == 'gnu') }}
|
|
run: |
|
|
set -eufo pipefail
|
|
sudo apt-get update
|
|
sudo apt-get -y install ca-certificates curl gnupg
|
|
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
|
|
sudo chmod a+r /usr/share/keyrings/docker-archive-keyring.gpg
|
|
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
|
|
sudo apt-get update
|
|
sudo apt install -y docker-ce docker-ce-cli
|
|
- name: Prepare for VDPA
|
|
if: ${{ github.event_name != 'pull_request' || (matrix.runner == 'garm-jammy' && matrix.libc == 'gnu') }}
|
|
run: scripts/prepare_vdpa.sh
|
|
- name: Run unit tests
|
|
if: ${{ github.event_name != 'pull_request' || (matrix.runner == 'garm-jammy' && matrix.libc == 'gnu') }}
|
|
run: scripts/dev_cli.sh tests --unit --libc ${{ matrix.libc }}
|
|
- name: Load openvswitch module
|
|
if: ${{ github.event_name != 'pull_request' || (matrix.runner == 'garm-jammy' && matrix.libc == 'gnu') }}
|
|
run: sudo modprobe openvswitch
|
|
- name: Run integration tests
|
|
if: ${{ github.event_name != 'pull_request' || (matrix.runner == 'garm-jammy' && matrix.libc == 'gnu') }}
|
|
timeout-minutes: 60
|
|
run: scripts/dev_cli.sh tests --integration --libc ${{ matrix.libc }}
|
|
- name: Run live-migration integration tests
|
|
if: ${{ github.event_name != 'pull_request' || (matrix.runner == 'garm-jammy' && matrix.libc == 'gnu') }}
|
|
timeout-minutes: 20
|
|
run: scripts/dev_cli.sh tests --integration-live-migration --libc ${{ matrix.libc }}
|
|
- name: Skipping build for PR
|
|
if: ${{ github.event_name == 'pull_request' && matrix.runner != 'garm-jammy' && matrix.libc != 'gnu' }}
|
|
run: echo "Skipping build for PR"
|