checks/iperf: always run qemu with kvm #35
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Continuous Integration" | |
on: | |
workflow_dispatch: # allows manual triggering | |
push: | |
jobs: | |
eval: | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.eval-jobs.outputs.matrix }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: cachix/install-nix-action@v20 | |
- name: Evaluate hydraJobs | |
id: eval-jobs | |
run: | | |
MATRIX=$(nix eval \ | |
--accept-flake-config \ | |
--json \ | |
.#hydraJobs.x86_64-linux --apply builtins.attrNames \ | |
) | |
echo "matrix=$MATRIX" >> $GITHUB_OUTPUT | |
build: | |
name: ${{ matrix.check }} | |
needs: eval | |
strategy: | |
fail-fast: false | |
matrix: | |
check: ${{ fromJson(needs.eval.outputs.matrix) }} | |
exclude: | |
# Cannot cross-build on Github CI | |
- check: qemu-tcg-9pstore-overlay-shutdown-command | |
- check: qemu-tcg-9pstore-overlay-startup-shutdown | |
- check: qemu-tcg-9pstore-overlay-systemd-shutdown-command | |
- check: qemu-tcg-9pstore-overlay-systemd-startup-shutdown | |
- check: qemu-tcg-9pstore-shutdown-command | |
- check: qemu-tcg-9pstore-startup-shutdown | |
- check: qemu-tcg-9pstore-systemd-shutdown-command | |
- check: qemu-tcg-9pstore-systemd-startup-shutdown | |
- check: qemu-tcg-overlay-shutdown-command | |
- check: qemu-tcg-overlay-startup-shutdown | |
- check: qemu-tcg-overlay-systemd-shutdown-command | |
- check: qemu-tcg-overlay-systemd-startup-shutdown | |
- check: qemu-tcg-shutdown-command | |
- check: qemu-tcg-startup-shutdown | |
- check: qemu-tcg-systemd-shutdown-command | |
- check: qemu-tcg-systemd-startup-shutdown | |
# Known broken | |
- check: cloud-hypervisor-overlay-startup-shutdown | |
- check: cloud-hypervisor-overlay-shutdown-command | |
- check: cloud-hypervisor-overlay-systemd-startup-shutdown | |
- check: cloud-hypervisor-overlay-systemd-shutdown-command | |
- check: firecracker-overlay-shutdown-command | |
- check: firecracker-overlay-startup-shutdown | |
- check: firecracker-overlay-overlay-startup-shutdown | |
- check: stratovirt-startup-shutdown | |
- check: stratovirt-shutdown-command | |
- check: stratovirt-systemd-startup-shutdown | |
- check: vm-firecracker | |
- check: vm-firecracker-iperf | |
- check: vm-stratovirt-iperf | |
# Not finishing | |
- check: firecracker-overlay-systemd-startup-shutdown | |
- check: qemu-overlay-startup-shutdown | |
- check: qemu-overlay-systemd-startup-shutdown | |
runs-on: ubuntu-latest | |
env: | |
NIX_ATTR: 'hydraJobs.x86_64-linux.${{ matrix.check }}' | |
steps: | |
- 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 | |
- uses: actions/checkout@v3 | |
- uses: cachix/install-nix-action@v20 | |
- uses: DeterminateSystems/magic-nix-cache-action@v2 | |
- name: Build ${{ matrix.check }} | |
run: | | |
nix build \ | |
-L \ | |
--accept-flake-config \ | |
".#$NIX_ATTR" | |
if [ -e result/summary.md ]; then | |
cat result/summary.md >> $GITHUB_STEP_SUMMARY | |
fi |