-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (33 loc) · 1.17 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:
pull_request:
push:
paths-ignore:
- 'docs/**'
branches: [main]
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: '🐍 Setup python'
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: '📥 Load .env file'
if: hashFiles('.github/workflows/.env') != ''
uses: xom9ikk/dotenv@v2
with:
path: .github/workflows
- name: '${{ matrix.icon }} Setup CMake'
uses: jwlawson/[email protected]
with:
cmake-version: '${{env.CMAKE_VERSION}}'
github-api-token: ${{ secrets.GITHUB_TOKEN }}
- name: 'Install packages'
run: sudo apt-get install cmake lcov clang-tidy cppcheck iwyu clang clang-format cppcheck
- name: 'Install packages with pip'
run: pip install --user cpplint
- name: '🔧 Configure'
run: cmake -S . -B ${{ env.CMAKE_BUILD_PREFIX }} -D CMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} -DBUILD_TESTS=${{ env.BUILD_TESTS }} -DBUILD_DOCS=${{ env.BUILD_DOCS }} -DBUILD_EXAMPLES=${{ env.BUILD_EXAMPLES }} -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
- uses: pre-commit/[email protected]