|
18 | 18 | - name: Checkout repository |
19 | 19 | uses: actions/checkout@v4 |
20 | 20 |
|
21 | | - - name: Set bazel version to 6.5.0 |
22 | | - run: echo "6.5.0" > .bazelversion |
23 | | - |
24 | 21 | - name: Setup Bazel |
25 | 22 | uses: bazel-contrib/setup-bazel@0.15.0 |
26 | 23 |
|
|
48 | 45 | "CodeChecker finds different analyzers when running in " \ |
49 | 46 | "bazel's sandbox environment!" |
50 | 47 | CodeChecker analyzers |
| 48 | +
|
| 49 | + # TODO: Move installation of tools to a composite action (or use a docker img) |
| 50 | + # TODO: Generalize to handle multiple projects |
| 51 | + # TODO: Add script to run tests locally |
| 52 | + # TODO: Document how to add new project to the list. |
| 53 | + foss_test: |
| 54 | + name: "Test rules on FOSS project: yaml-cpp" |
| 55 | + runs-on: ubuntu-24.04 |
| 56 | + |
| 57 | + steps: |
| 58 | + - name: Checkout repository |
| 59 | + uses: actions/checkout@v4 |
| 60 | + |
| 61 | + - name: Set bazel version to 6.5.0 |
| 62 | + run: echo "6.5.0" > .bazelversion |
| 63 | + |
| 64 | + - name: Setup Bazel |
| 65 | + uses: bazel-contrib/setup-bazel@0.15.0 |
| 66 | + |
| 67 | + - name: Install python |
| 68 | + uses: actions/setup-python@v5 |
| 69 | + with: |
| 70 | + python-version: '3.12' |
| 71 | + |
| 72 | + - name: Install CodeChecker analyzers |
| 73 | + run: | |
| 74 | + sudo apt-get update --quiet |
| 75 | + sudo apt-get install --no-install-recommends \ |
| 76 | + clang \ |
| 77 | + clang-tools \ |
| 78 | + clang-tidy |
| 79 | +
|
| 80 | + - name: Install CodeChecker |
| 81 | + run: pip3 install codechecker |
| 82 | + |
| 83 | + - name: Setup yaml-cpp |
| 84 | + run: | |
| 85 | + cd test/foss/yaml-cpp |
| 86 | + sh init.sh |
| 87 | +
|
| 88 | + - name: Run Bazel CodeChecker |
| 89 | + run: | |
| 90 | + cd test/foss/yaml-cpp/test-proj |
| 91 | + bazel build :codechecker_test |
| 92 | +
|
| 93 | + - name: Run Per-File Bazel CodeChecker |
| 94 | + run: | |
| 95 | + cd test/foss/yaml-cpp/test-proj |
| 96 | + bazel build :code_checker_test |
0 commit comments