-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
14 additions
and
20 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,15 +2,15 @@ | |
# | ||
# Copyright (c) 2023 Johnathan C Maudlin <[email protected]> | ||
--- | ||
name: Lint | ||
name: Test | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- .clang-format | ||
- .clang-tidy | ||
- .clangd | ||
- .github/workflows/lint.yml | ||
- .github/workflows/test.yml | ||
- meson.build | ||
- include/**/*.h | ||
- src/**/*.c | ||
|
@@ -20,35 +20,26 @@ on: | |
- .clang-format | ||
- .clang-tidy | ||
- .clangd | ||
- .github/workflows/lint.yml | ||
- .github/workflows/test.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 }} | ||
|
||
linux: | ||
name: linux | ||
runs-on: ubuntu-latest | ||
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 }} | ||
sudo apt-get install -y --no-install-{recommends,suggests} \ | ||
clang{,-{format,tidy}} git lld meson ninja-build \ | ||
libgc-dev libreadline-dev libasan5 libubsan1 | ||
- name: Build Ploy | ||
env: { CC: clang, CC_LD: lld, NINJA: ninja } | ||
|
@@ -59,6 +50,9 @@ jobs: | |
- name: Test Ploy | ||
run: ninja -C builddir test | ||
|
||
- name: clang-format | ||
run: ninja -C builddir clang-format | ||
|
||
# TODO(jcmdln): Only in actions, clang-tidy warns about suppressed warnings | ||
- name: Run ${{ matrix.linter }} | ||
run: ninja -C builddir ${{ matrix.linter }} | ||
- name: clang-tidy | ||
run: ninja -C builddir clang-tidy |