okami.mom/ultraviolet

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

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

main
1.8 KiB49 linesraw
1name: lint
2# push is scoped to main so a push to a PR branch fires only the
3# pull_request run, not both. Merges to main still lint via push.
4on:
5  push:
6    branches: [main]
7  pull_request:
8
9jobs:
10  lint:
11    uses: charmbracelet/meta/.github/workflows/lint.yml@main
12    with:
13      golangci_path: .golangci.yml
14      golangci_version: latest
15      timeout: 10m
16
17  # The conformance tests are a separate module, so the root lint job's ./...
18  # never reaches them. Lint them here with the same config.
19  #
20  # The module imports go.mitchellh.com/libghostty, a cgo package. golangci-lint
21  # typechecks cgo files, which runs pkg-config and compiles the C preamble far
22  # enough to need the real headers. So, contrary to intuition, a C toolchain IS
23  # required: we restore the prebuilt libghostty-vt (headers plus .pc file) from
24  # the same cache conformance.yml populates and point pkg-config at it. No
25  # linking happens during typecheck, so the static archive itself is unused.
26  #
27  # This is a standalone job rather than the shared meta workflow because that
28  # workflow cannot restore a cache or set PKG_CONFIG_PATH for its lint step.
29  lint-conformance:
30    runs-on: ubuntu-latest
31    steps:
32      - uses: actions/checkout@v7
33
34      - uses: actions/setup-go@v7
35        with:
36          go-version-file: ./internal/conformance/go.mod
37          cache: true
38
39      # The same cache conformance.yml populates, keyed the same way, so a
40      # warm cache there is a cache hit here and no rebuild happens.
41      - uses: ./.github/actions/libghostty-vt
42
43      - name: golangci-lint
44        uses: golangci/golangci-lint-action@ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a # v9.3.0
45        with:
46          working-directory: internal/conformance
47          args: |
48            --config="../../.golangci.yml" --timeout=10m ./...
49          version: latest