|
1 | | -name: Build |
| 1 | +name: Plugin Test |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | push: |
5 | | - branches: |
6 | | - - main |
| 5 | + branches: [main] |
7 | 6 | pull_request: |
8 | 7 |
|
9 | 8 | jobs: |
10 | 9 | plugin_test: |
11 | 10 | name: asdf plugin test |
12 | 11 | strategy: |
13 | 12 | matrix: |
14 | | - os: [ubuntu-latest, macos-latest] |
15 | | - plugin: |
16 | | - - clang-format |
17 | | - - clang-tidy |
18 | | - - clang-query |
19 | | - - clang-apply-replacements |
20 | | - include: |
21 | | - - plugin: clang-format |
22 | | - command: clang-format --version |
23 | | - - plugin: clang-tidy |
24 | | - command: clang-tidy --version |
25 | | - - plugin: clang-query |
26 | | - command: clang-query --version |
27 | | - - plugin: clang-apply-replacements |
28 | | - command: clang-apply-replacements --version |
| 13 | + os: [ubuntu-latest, macos-13] |
| 14 | + tool: |
| 15 | + - { plugin: clang-format, command: "clang-format --version" } |
| 16 | + - { plugin: clang-query, command: "clang-query --version" } |
| 17 | + - { plugin: clang-tidy, command: "clang-tidy --version" } |
| 18 | + - { plugin: clang-apply-replacements, command: "clang-apply-replacements --version" } |
| 19 | + version: ["18", "19", "20"] |
| 20 | + |
29 | 21 | runs-on: ${{ matrix.os }} |
| 22 | + |
30 | 23 | steps: |
31 | | - - name: Test ${{ matrix.plugin }} |
32 | | - uses: asdf-vm/actions/plugin-test@v1 |
| 24 | + - name: Install asdf |
| 25 | + uses: asdf-vm/actions/setup@v4 |
| 26 | + |
| 27 | + - name: Add plugin ${{ matrix.tool.plugin }} |
| 28 | + run: | |
| 29 | + asdf plugin add ${{ matrix.tool.plugin }} https://github.com/cpp-linter/asdf-clang-tools.git |
| 30 | +
|
| 31 | + - name: Install and set ${{ matrix.tool.plugin }} to ${{ matrix.version }} |
| 32 | + run: | |
| 33 | + asdf install ${{ matrix.tool.plugin }} ${{ matrix.version }} |
| 34 | + asdf set ${{ matrix.tool.plugin }} ${{ matrix.version }} --home |
33 | 35 | env: |
34 | 36 | ASDF_CLANG_TOOLS_MACOS_DEQUARANTINE: 1 |
35 | | - with: |
36 | | - plugin: ${{ matrix.plugin }} |
37 | | - command: ${{ matrix.command }} |
| 37 | + |
| 38 | + - name: Run ${{ matrix.tool.plugin }} version check |
| 39 | + run: ${{ matrix.tool.command }} |
0 commit comments