Skip to content

pre-commit

pre-commit #344

Workflow file for this run

name: pre-commit
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cvmfs-contrib/github-action-cvmfs@v4
- name: Setup Key4hep nightlies
run: source /cvmfs/sw-nightlies.hsf.org/key4hep
- name: Setup pre-commit
run: |
python -m venv pre-commit-venv
source pre-commit-venv/bin/activate
pip install pre-commit pylint==2.17.7 flake8
- name: Run CMake
run: |
cmake -S . -B build -DENABLE-SIO=ON \
-DENABLE_JULIA=ON \
-DENABLE_RNTUPLE=ON \
-DENABLE_DATASOURCE=ON \
-DCMAKE_CXX_STANDARD=20 \
-DCMAKE_CXX_FLAGS=" -fdiagnostics-color=always -Werror "\
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DUSE_EXTERNAL_CATCH2=OFF
ln -s build/compile_commands.json compile_commands.json
- name: Run pre-commit
run: |
pre-commit run --show-diff-on-failure \
--color=always \
--all-files