-
Notifications
You must be signed in to change notification settings - Fork 24
83 lines (77 loc) · 2.55 KB
/
self-test.yml
File metadata and controls
83 lines (77 loc) · 2.55 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Self test action
on:
push:
branches: [main]
paths:
- 'action.yml'
- '.python-version'
- 'uv.lock'
- 'docs/examples/demo/**'
- '.github/workflows/self-test.yml'
pull_request:
branches: [main]
paths:
- 'action.yml'
- '.python-version'
- 'uv.lock'
- 'docs/examples/demo/**'
- '.github/workflows/self-test.yml'
# pull_request_target:
# branches: [main]
# paths:
# - 'action.yml'
# - '.python-version'
# - 'uv.lock'
# - 'docs/examples/demo/**'
# - '.github/workflows/self-test.yml'
jobs:
test:
permissions:
contents: write
pull-requests: write
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
clang-version: ['11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22']
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Cache the build artifacts
id: cache-build
uses: actions/cache@v5
with:
path: build
key: ${{ runner.os }}-${{ hashFiles('docs/examples/demo/**') }}
- name: Generate compilation database
if: steps.cache-build.outputs.cache-hit != 'true'
run: mkdir build && cmake -Bbuild docs/examples/demo
- name: Self test action
uses: ./
id: linter
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
style: file
files-changed-only: false
# to ignore all build folder contents
ignore: build|venv
database: build
verbosity: debug
version: ${{ matrix.clang-version }}
thread-comments: ${{ github.event_name == 'pull_request' && matrix.clang-version == '16' && 'update' }}
file-annotations: ${{ runner.os == 'Linux' && matrix.clang-version == '16' }}
step-summary: ${{ matrix.clang-version == '16' }}
extra-args: -std=c++14 -Wall
- name: Fail fast?!
# if: steps.linter.outputs.checks-failed > 0
run: |
echo "some linter checks failed"
echo "total checks-failed: ${{ steps.linter.outputs.checks-failed }}"
echo "clang-tidy checks-failed: ${{ steps.linter.outputs.clang-tidy-checks-failed }}"
echo "clang-format checks-failed: ${{ steps.linter.outputs.clang-format-checks-failed }}"
# for actual deployment
# run: exit 1