-
Notifications
You must be signed in to change notification settings - Fork 60
42 lines (40 loc) · 1.22 KB
/
pre-commit.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: pre-commit
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cvmfs-contrib/github-action-cvmfs@v3
- uses: aidasoft/run-lcg-view@v4
with:
release-platform: LCG_102/x86_64-centos7-clang12-opt
run: |
echo "::group::Setup pre-commit"
export PYTHONPATH=$(python -m site --user-site):$PYTHONPATH
export PATH=/root/.local/bin:$PATH
pip install pre-commit
# Use virtualenv from the LCG release
pip uninstall --yes virtualenv
echo "::endgroup::"
echo "::group::Run CMake"
mkdir build
cd build
cmake .. -DENABLE_SIO=ON \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_CXX_FLAGS=" -fdiagnostics-color=always -Werror "\
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DUSE_EXTERNAL_CATCH2=OFF
ln -s $(pwd)/compile_commands.json ../
cd ..
echo "::endgroup::"
echo "::group::Run pre-commit"
pre-commit run --show-diff-on-failure \
--color=always \
--all-files
echo "::endgroup::"