Skip to content

Ninja package is ninja-build #82

Ninja package is ninja-build

Ninja package is ninja-build #82

Workflow file for this run

# 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
- .prettierrc.yml
- include/**/*.h
- meson.build
- src/**/*.c
- src/**/meson.build
push:
paths:
- .clang-format
- .clang-tidy
- .clangd
- .github/workflows/lint.yml
- .prettierrc.yml
- include/**/*.h
- meson.build
- src/**/*.c
- src/**/meson.build
workflow_dispatch:
jobs:
lint:
strategy:
fail-fast: false
matrix:
linter:
- name: clang-format
- name: clang-tidy
os:
- name: ubuntu-latest
deps: clang clang-format clang-tidy cmake git libasan5 libubsan1 lld ninja-build
name: ${{ matrix.linter.name }} (${{ matrix.os.name }})
runs-on: ${{ matrix.os.name }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Setup build cache
uses: actions/cache@v3
id: build
with:
key: build-${{ hashFiles('**/CMakeLists.txt', '**/*.c', '**/*.h') }}
path: build/
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-{recommends,suggests} ${{ matrix.os.deps }}
# TODO(jcmdln): Test ploy
- name: Build Ploy (Debug)
env:
CC: clang
CC_LD: lld
NINJA: ninja
run: |
mkdir build
cd build
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Debug
ninja -C build
- name: Run ${{ matrix.linter.name }}
run: |
ninja -C build ${{ matrix.linter.name }}