okami.mom/ultraviolet

git clone https://git.nkp.pet/okami.mom/ultraviolet

Kieran Klukasci(conformance): build libghostty-vt at the commit go.mod pins3d151a2

upstream
2.5 KiB77 linesraw
1name: conformance
2
3# Fuzz tests that drive the renderer against real terminal emulators.
4#
5# They live in their own module (internal/conformance) because the reference
6# emulator is a cgo package with a newer Go requirement, and neither cost
7# belongs in the library that ships to users. That also means the root module's
8# CI never runs them, so they get their own workflow here.
9
10# push is scoped to main so a push to a PR branch fires only the
11# pull_request run, not both. Merges to main still run via push.
12on:
13  push:
14    branches: [main]
15  pull_request:
16  schedule:
17    # A nightly coverage-guided run, so new bugs are found without waiting for
18    # someone to run -fuzz by hand.
19    - cron: "0 6 * * *"
20  workflow_dispatch: {}
21
22jobs:
23  test:
24    runs-on: ubuntu-latest
25    steps:
26      - uses: actions/checkout@v7
27
28      - uses: actions/setup-go@v7
29        with:
30          go-version-file: ./internal/conformance/go.mod
31          cache: true
32
33      # Builds or restores libghostty-vt and puts it on PKG_CONFIG_PATH.
34      - uses: ./.github/actions/libghostty-vt
35
36      - name: Test
37        working-directory: ./internal/conformance
38        run: go test -count=1 -timeout 10m ./...
39
40
41  # Coverage-guided fuzzing. This is deliberately not run on every push; it is
42  # slow and its job is to find new bugs, not to gate commits. The test job
43  # above already replays every known failing input on each push.
44  fuzz:
45    if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
46    runs-on: ubuntu-latest
47    strategy:
48      fail-fast: false
49      matrix:
50        target:
51          - FuzzRenderer
52          - FuzzRendererIdempotent
53          - FuzzRedrawResyncs
54          - FuzzScreenShowsContent
55    steps:
56      - uses: actions/checkout@v7
57
58      - uses: actions/setup-go@v7
59        with:
60          go-version-file: ./internal/conformance/go.mod
61          cache: true
62
63      - uses: ./.github/actions/libghostty-vt
64
65      - name: Fuzz ${{ matrix.target }}
66        working-directory: ./internal/conformance
67        run: go test -run='XXX' -fuzz='${{ matrix.target }}$' -fuzztime=15m
68
69      # A new crasher is written under testdata/ on failure. Upload it so it can
70      # be committed as a regression test rather than lost with the runner.
71      - name: Upload new crashers
72        if: failure()
73        uses: actions/upload-artifact@v7
74        with:
75          name: crashers-${{ matrix.target }}
76          path: internal/conformance/testdata/fuzz/
77          if-no-files-found: ignore