-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (42 loc) · 1.21 KB
/
rust.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
name: Example execution
on:
pull_request:
push:
branches: [main]
jobs:
run-example:
name: Run hypervisor with example ${{ matrix.example }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
example:
- hello_part
- fuel_tank
- ping
- dev_random
env:
DURATION: 10s
RUST_LOG: trace
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v22
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- uses: cachix/cachix-action@v12
with:
name: dlr-ft
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-${{ github.job }}-${{ matrix.example }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Check CGroup
run: systemd-run --user --scope cat /proc/self/cgroup
- name: Run example ${{ matrix.example }}
run: nix develop --command systemd-run-example-${{ matrix.example }} --duration $DURATION