Skip to content

Dev/ci

Dev/ci #452

Workflow file for this run

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
- ping_queue
- redirect_stdio
env:
DURATION: 10s
RUST_LOG: trace
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v30
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- uses: cachix/cachix-action@v15
with:
name: dlr-ft
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- uses: actions/cache@v4
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: Build Devshell
run: nix build .#devShells.x86_64-linux.default
- name: Run example ${{ matrix.example }}
shell: nix develop --command {0}
run: >-
echo "RUN_OUTPUT=$(
systemd-run-example-${{ matrix.example }} --duration $DURATION |
tee /dev/tty
)"