Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/fuzz-nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Nightly fuzz

on:
schedule:
# 03:00 UTC every day
- cron: "0 3 * * *"
workflow_dispatch:
inputs:
duration:
description: Seconds to run each target
default: "300"

jobs:
fuzz:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target:
- callouts
steps:
- uses: actions/checkout@v4

- name: Install Rust (nightly)
uses: dtolnay/rust-toolchain@nightly

- name: Install cargo-fuzz
uses: taiki-e/install-action@v2
with:
tool: cargo-fuzz

- name: Cache cargo
uses: Swatinem/rust-cache@v2
with:
workspaces: driver/fuzz

- name: Fuzz ${{ matrix.target }}
working-directory: driver/fuzz
run: cargo fuzz run ${{ matrix.target }} -- -max_total_time=${{ github.event.inputs.duration || '300' }}

- name: Upload crash artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: fuzz-artifacts-${{ matrix.target }}
path: driver/fuzz/artifacts/
if-no-files-found: ignore
72 changes: 72 additions & 0 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: PR checks

on:
pull_request:
push:
branches: [main]

jobs:
test:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4

- name: Install Rust (stable, MSVC)
uses: dtolnay/rust-toolchain@stable

- name: Install Go
uses: actions/setup-go@v5
with:
go-version: stable

- name: Install just
uses: taiki-e/install-action@v2
with:
tool: just

- name: Cache cargo
uses: Swatinem/rust-cache@v2

# `just test` runs:
# - kext-interface-gen (regenerate Go command fixture)
# - test-protocol (Rust protocol parsers + bounds regression tests)
# - test-kext-interface (Go <-> Rust differential on the .bin fixtures)
# - test-driver (host property tests against mock_wdk)
# None of these need the WDK / a kernel.
- name: Run tests
run: just test

# End-to-end simulation on Linux: the real driver over mock_wdk in the zf-sim
# daemon, driven by the real Go agent over a Unix domain socket. The agent
# spawns the daemon and exits with its pass/fail code. mixed_v4v6_parallel has
# no `dns` op, so the run stays offline and deterministic.
sim-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Rust (stable)
uses: dtolnay/rust-toolchain@stable

- name: Install Go
uses: actions/setup-go@v5
with:
go-version: stable

- name: Install just
uses: taiki-e/install-action@v2
with:
tool: just

- name: Cache cargo
uses: Swatinem/rust-cache@v2
with:
workspaces: sim

- name: Sim unit tests
run: just sim-test

- name: Replay scenario end-to-end
run: |
just sim-emit-samples
timeout 300 just sim-scenario ./sim/scenarios/mixed_v4v6_parallel.cbor
Loading
Loading