Skip to content

feat: pre commit

feat: pre commit #16

Workflow file for this run

# Copyright (c) Brandon Pacewic
# SPDX-License-Identifier: MIT
name: Lint
on:
pull_request:
branches:
- mega
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: sudo apt-get install -y clang-format cmake ccache
- name: Restore ccache
uses: actions/cache@v4
with:
path: ~/.cache/ccache
key: ccache-${{ runner.os }}-${{ hashFiles('cpl/inc/**', 'tests/**/*.cpp', 'CMakeLists.txt', 'cpl/CMakeLists.txt', 'tests/CMakeLists.txt') }}
restore-keys: ccache-${{ runner.os }}-
- name: Configure ccache
run: ccache --set-config max_size=500M
- name: Run lint
run: scripts/lint.sh
- name: Save ccache
uses: actions/cache/save@v4
if: always()
with:
path: ~/.cache/ccache
key: ccache-${{ runner.os }}-${{ hashFiles('cpl/inc/**', 'tests/**/*.cpp', 'CMakeLists.txt', 'cpl/CMakeLists.txt', 'tests/CMakeLists.txt') }}