Back to Meson #87
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-License-Identifier: ISC | |
# | |
# Copyright (c) 2023 Johnathan C Maudlin <[email protected]> | |
--- | |
name: Lint | |
on: | |
pull_request: | |
paths: | |
- .clang-format | |
- .clang-tidy | |
- .clangd | |
- .github/workflows/lint.yml | |
- meson.build | |
- include/**/*.h | |
- src/**/*.c | |
- src/**/meson.build | |
push: | |
paths: | |
- .clang-format | |
- .clang-tidy | |
- .clangd | |
- .github/workflows/lint.yml | |
- meson.build | |
- include/**/*.h | |
- src/**/*.c | |
- src/**/meson.build | |
workflow_dispatch: | |
jobs: | |
lint: | |
strategy: | |
fail-fast: false | |
matrix: | |
linter: [clang-format, clang-tidy] | |
os: | |
- name: ubuntu-latest | |
deps: > | |
clang{,-{format,tidy}} git lld meson ninja-build | |
libgc-dev libreadline-dev libasan5 libubsan1 | |
name: ${{ matrix.linter }} (${{ matrix.os.name }}) | |
runs-on: ${{ matrix.os.name }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install system dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y --no-install-{recommends,suggests} ${{ matrix.os.deps }} | |
- name: Build Ploy | |
env: { CC: clang, CC_LD: lld, NINJA: ninja } | |
run: | | |
meson setup builddir -Db_sanitize=address,undefined -Dbuildtype=debugoptimized | |
ninja -C builddir | |
- name: Test Ploy | |
run: ninja -C builddir test | |
# TODO(jcmdln): Only in actions, clang-tidy warns about suppressed warnings | |
- name: Run ${{ matrix.linter }} | |
run: ninja -C builddir ${{ matrix.linter }} |