Skip to content

Commit

Permalink
Simplify pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
jcmdln committed Oct 22, 2023
1 parent eff19f0 commit 3c29378
Showing 1 changed file with 14 additions and 20 deletions.
34 changes: 14 additions & 20 deletions .github/workflows/lint.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }
Expand All @@ -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

0 comments on commit 3c29378

Please sign in to comment.