Skip to content

Commit 3f9a815

Browse files
committed
.github/workflows/ci: init
1 parent 4583e23 commit 3f9a815

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

.github/workflows/ci.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: "Continuous Integration"
2+
3+
on:
4+
workflow_dispatch: # allows manual triggering
5+
push:
6+
7+
jobs:
8+
eval:
9+
runs-on: ubuntu-latest
10+
outputs:
11+
matrix: ${{ steps.eval-jobs.outputs.matrix }}
12+
steps:
13+
- uses: actions/checkout@v3
14+
- uses: cachix/install-nix-action@v20
15+
- name: Evaluate hydraJobs
16+
id: eval-jobs
17+
run: |
18+
MATRIX=$(nix eval \
19+
--accept-flake-config \
20+
--json \
21+
.#hydraJobs.x86_64-linux --apply builtins.attrNames \
22+
)
23+
echo "matrix=$MATRIX" >> $GITHUB_OUTPUT
24+
25+
build:
26+
name: ${{ matrix.check }}
27+
needs: eval
28+
strategy:
29+
fail-fast: false
30+
matrix:
31+
check: ${{ fromJson(needs.eval.outputs.matrix) }}
32+
runs-on: ubuntu-latest
33+
env:
34+
NIX_ATTR: 'hydraJobs.x86_64-linux.${{ matrix.check }}'
35+
steps:
36+
- name: Enable KVM group perms
37+
run: |
38+
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
39+
sudo udevadm control --reload-rules
40+
sudo udevadm trigger --name-match=kvm
41+
- uses: actions/checkout@v3
42+
- uses: cachix/install-nix-action@v20
43+
- name: Build ${{ matrix.check }}
44+
run: |
45+
nix build \
46+
-vL \
47+
--accept-flake-config \
48+
".#$NIX_ATTR"

0 commit comments

Comments
 (0)