build: Enable computing C++ code coverage #838
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: [ pull_request ] | |
| jobs: | |
| pre-commit: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.13" | |
| - uses: pre-commit/[email protected] | |
| fast-tests: | |
| runs-on: ubuntu-24.04 | |
| needs: [ pre-commit ] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: DWYU Unit tests | |
| run: bazel test -- //... -//docs/... | |
| - name: Execute sanitizers | |
| run: bazel test --config=sanitize //dwyu/... | |
| - name: Execute DWYU | |
| run: bazel build --config=dwyu //dwyu/... | |
| - name: Execute clang-tidy | |
| run: bazel build --config=clang_tidy //dwyu/... | |
| - name: Ensure C++11 compatibility | |
| run: ./scripts/ensure_cpp11_compatibility.sh | |
| check-documentation: | |
| runs-on: ubuntu-24.04 | |
| needs: [ pre-commit ] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Check documentation consistency | |
| run: bazel test //docs/... | |
| sub-workspaces-tests: | |
| runs-on: ubuntu-24.04 | |
| needs: [ pre-commit ] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Aspect integration tests scripts unit tests | |
| run: ./scripts/test_aspect_tests_scripts.sh | |
| - name: Build examples | |
| run: ./scripts/build_examples.sh | |
| - name: Execute mocked CC toolchain tests | |
| run: ./scripts/test_mocked_cc_toolchains.sh | |
| integration-tests-workspace_integration: | |
| runs-on: ubuntu-24.04 | |
| needs: [ fast-tests ] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Integration tests - Workspace integration | |
| run: python test/workspace_integration/test.py | |
| integration-tests-examples: | |
| strategy: | |
| matrix: | |
| os: [ ubuntu-24.04, macos-15, windows-2022 ] | |
| fail-fast: false | |
| runs-on: ${{ matrix.os }} | |
| needs: [ fast-tests ] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Integration tests - Examples | |
| run: python examples/test.py | |
| - name: Integration tests - Examples with legacy WORKSPACE setup | |
| run: python examples/test.py --legacy-workspace | |
| integration-tests-upstream_cc_toolchains: | |
| strategy: | |
| matrix: | |
| os: [ ubuntu-24.04, macos-15, windows-2022 ] | |
| fail-fast: false | |
| runs-on: ${{ matrix.os }} | |
| needs: [ fast-tests ] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.13" | |
| - name: Integration tests - CC toolchain | |
| run: python test/cc_toolchains/upstream/test.py --ci_mode | |
| integration-tests-upstream_cc_toolchains-cpp-impl: | |
| strategy: | |
| matrix: | |
| os: [ ubuntu-24.04, macos-15, windows-2022 ] | |
| fail-fast: false | |
| runs-on: ${{ matrix.os }} | |
| needs: [ fast-tests ] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.13" | |
| - name: Integration tests - CC toolchain | |
| run: python test/cc_toolchains/upstream/test.py --ci_mode --use_cpp_impl | |
| integration-tests-aspect: | |
| strategy: | |
| matrix: | |
| os: [ ubuntu-24.04, macos-15, windows-2022 ] | |
| fail-fast: false | |
| runs-on: ${{ matrix.os }} | |
| needs: [ fast-tests, integration-tests-examples ] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Integration tests - Aspect | |
| if: runner.os != 'Windows' | |
| run: python test/aspect/execute_tests.py --no_output_base | |
| - name: Integration tests - Aspect | |
| if: runner.os == 'Windows' | |
| run: python test/aspect/execute_tests.py --only-default-version --no_output_base | |
| integration-tests-aspect-cpp-impl: | |
| strategy: | |
| matrix: | |
| os: [ ubuntu-24.04, macos-15, windows-2022 ] | |
| fail-fast: false | |
| runs-on: ${{ matrix.os }} | |
| needs: [ fast-tests, integration-tests-examples ] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Integration tests - Aspect with C++ implementation | |
| run: python test/aspect/execute_tests.py --no_output_base --only-default-version --cpp_impl_based | |
| integration-tests-apply-fixes: | |
| strategy: | |
| matrix: | |
| os: [ ubuntu-24.04, macos-15, windows-2022 ] | |
| fail-fast: false | |
| runs-on: ${{ matrix.os }} | |
| needs: [ fast-tests ] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/prepare_buildozer | |
| with: | |
| # Keep in sync with README.md | |
| version: '8.2.1' | |
| - name: Integration tests - Applying fixes | |
| run: python test/apply_fixes/execute_tests.py |