Skip to content

Fuzz (nightly)

Fuzz (nightly) #115

Workflow file for this run

name: Fuzz (nightly)
# Sprint 3-5: nexterm-vt の cargo-fuzz ターゲットを毎晩短時間ずつ実行する。
# 4 ターゲット × 60 秒 = 4 分 + セットアップで合計 ~10 分以内に完了する。
# クラッシュ発見時はジョブが赤くなり、artifacts に再現ペイロードがアップロードされる。
on:
schedule:
# 毎日 UTC 03:00 (JST 12:00) — マスターブランチに対する追加検証
- cron: '0 3 * * *'
workflow_dispatch:
inputs:
max_total_time:
description: '各ターゲットの実行秒数 (デフォルト 60)'
required: false
default: '60'
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
fuzz:
name: Fuzz ${{ matrix.target }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target:
- vt_parser_input
- sixel_decode
- kitty_image
- osc_url
- ipc_postcard
- lua_sandbox
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Set up Rust nightly
uses: dtolnay/rust-toolchain@5b842231ba77f5c045dba54ac5560fed2db780e2 # nightly
- name: Cache Cargo artifacts
uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
with:
workspaces: |
.
nexterm-vt/fuzz
- name: Install cargo-fuzz
# --locked を外して nightly 互換の最新依存 (rustix 等) を解決する。
# cargo-fuzz 自身の Cargo.lock は古い rustix 0.36 をピン留めしており、
# nightly の内部 attribute 変更 (rustc_layout_scalar_valid_range_end など)
# で rustc がエラーになるため。
run: cargo install cargo-fuzz
- name: Run fuzz target (${{ matrix.target }})
working-directory: nexterm-vt
run: |
MAX_TIME="${{ github.event.inputs.max_total_time || '60' }}"
cargo +nightly fuzz run ${{ matrix.target }} \
-- -max_total_time="${MAX_TIME}" -timeout=10
- name: Upload crash artifacts on failure
if: failure()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: fuzz-crashes-${{ matrix.target }}
path: nexterm-vt/fuzz/artifacts/${{ matrix.target }}/
if-no-files-found: ignore
retention-days: 30