-
-
Notifications
You must be signed in to change notification settings - Fork 109
84 lines (81 loc) · 3.13 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
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@v4
- uses: cachix/install-nix-action@v25
- name: Evaluate checks
id: eval-jobs
run: |
MATRIX=$(nix eval \
--accept-flake-config \
--json \
.#checks.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: vm-firecracker
- check: vm-firecracker-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: 'checks.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@v4
- uses: cachix/install-nix-action@v25
- uses: DeterminateSystems/magic-nix-cache-action@v3
- 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