Skip to content

Commit edcb8ff

Browse files
authored
Update e2e.yml
1 parent a599c9f commit edcb8ff

File tree

1 file changed

+17
-19
lines changed

1 file changed

+17
-19
lines changed

.github/workflows/e2e.yml

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ on:
1111
description: 'Target repository to test against'
1212
required: false
1313
default: 'llvm/llvm-project'
14-
clang_version:
15-
description: 'Clang version to use'
16-
required: false
17-
default: '20'
1814
style:
1915
description: 'Clang-format style'
2016
required: false
@@ -23,16 +19,22 @@ on:
2319
jobs:
2420
e2e-test:
2521
runs-on: ubuntu-latest
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
clang_version: [13, 14, 15, 16, 17, 18, 19, 20]
26+
27+
name: Clang ${{ matrix.clang_version }}
2628
steps:
27-
- name: Checkout
29+
- name: Checkout workflow repo
2830
uses: actions/checkout@v4
2931

3032
- name: Set up Python
3133
uses: actions/setup-python@v5
3234
with:
3335
python-version: '3.13'
3436

35-
- name: Install dependencies
37+
- name: Install Python dependencies
3638
run: |
3739
python -m pip install --upgrade pip
3840
python -m pip install pre-commit
@@ -41,27 +43,23 @@ jobs:
4143
run: |
4244
git clone --depth=1 https://github.com/${{ github.event.inputs.target_repo || 'llvm/llvm-project' }}.git test-repo
4345
44-
- name: Replace pre-commit configuration
46+
- name: Generate .pre-commit-config.yaml
4547
run: |
4648
cd test-repo
4749
rm -f .pre-commit-config.yaml
48-
cat > .pre-commit-config.yaml << 'EOF'
50+
cat > .pre-commit-config.yaml << EOF
4951
repos:
50-
- repo: https://github.com/pre-commit/mirrors-clang-format
51-
rev: v20.1.7
52+
- repo: https://github.com/cpp-linter/cpp-linter-hooks
53+
rev: main
5254
hooks:
5355
- id: clang-format
56+
args: [
57+
--style=${{ github.event.inputs.style || 'file' }},
58+
--version=${{ matrix.clang_version }}
59+
]
5460
EOF
55-
# cat > .pre-commit-config.yaml << 'EOF'
56-
# repos:
57-
# - repo: https://github.com/cpp-linter/cpp-linter-hooks
58-
# rev: main
59-
# hooks:
60-
# - id: clang-format
61-
# args: [--style=${{ github.event.inputs.style || 'Google' }}, --version=${{ github.event.inputs.clang_version || '20' }}]
62-
# EOF
6361
64-
- name: Install and run hook
62+
- name: Install and run cpp-linter clang-format hook
6563
run: |
6664
cd test-repo
6765
pre-commit install

0 commit comments

Comments
 (0)