This repository was archived by the owner on Sep 11, 2026. It is now read-only.
Print test failure diffs inline, remove testlog.txt #140
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: Build | |
| on: | |
| pull_request: | |
| branches: [main] | |
| env: | |
| LLVM_DEPS: llvm-19 llvm-19-dev clang-19 python3 ninja-build cmake | |
| jobs: | |
| filter: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| compiler: ${{ steps.filter.outputs.compiler }} | |
| steps: | |
| - uses: dorny/paths-filter@v3 | |
| id: filter | |
| with: | |
| filters: | | |
| compiler: | |
| - 'compiler/**' | |
| - 'tools/**' | |
| build: | |
| needs: filter | |
| runs-on: ubuntu-latest | |
| steps: | |
| - if: needs.filter.outputs.compiler != 'true' | |
| run: echo "No compiler changes, skipping build." | |
| - if: needs.filter.outputs.compiler == 'true' | |
| uses: actions/checkout@v4 | |
| - if: needs.filter.outputs.compiler == 'true' | |
| uses: awalsh128/cache-apt-pkgs-action@v1 | |
| with: | |
| packages: ${{ env.LLVM_DEPS }} | |
| version: 1.0 | |
| - if: needs.filter.outputs.compiler == 'true' | |
| name: Configure | |
| run: | | |
| cmake -S . -B build \ | |
| -G Ninja \ | |
| -DCMAKE_BUILD_TYPE=Release \ | |
| -DLLVM_DIR=/usr/lib/llvm-19 \ | |
| -DCMAKE_C_COMPILER=clang-19 \ | |
| -DCMAKE_CXX_COMPILER=clang++-19 | |
| - if: needs.filter.outputs.compiler == 'true' | |
| name: Build | |
| run: cmake --build build | |
| - if: needs.filter.outputs.compiler == 'true' | |
| name: Test | |
| run: cmake --build build --target test | |
| tidy: | |
| needs: filter | |
| runs-on: ubuntu-latest | |
| steps: | |
| - if: needs.filter.outputs.compiler != 'true' | |
| run: echo "No compiler changes, skipping tidy." | |
| - if: needs.filter.outputs.compiler == 'true' | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - if: needs.filter.outputs.compiler == 'true' | |
| uses: awalsh128/cache-apt-pkgs-action@v1 | |
| with: | |
| packages: ${{ env.LLVM_DEPS }} clang-tidy-19 | |
| version: 1.0 | |
| - if: needs.filter.outputs.compiler == 'true' | |
| name: Configure | |
| run: | | |
| cmake -S . -B build \ | |
| -G Ninja \ | |
| -DCMAKE_BUILD_TYPE=Release \ | |
| -DLLVM_DIR=/usr/lib/llvm-19 \ | |
| -DCMAKE_C_COMPILER=clang-19 \ | |
| -DCMAKE_CXX_COMPILER=clang++-19 \ | |
| -DCMAKE_EXPORT_COMPILE_COMMANDS=ON | |
| - if: needs.filter.outputs.compiler == 'true' | |
| name: Tidy changed files | |
| run: | | |
| git fetch origin "${{ github.base_ref }}" | |
| files=$(git diff --name-only --diff-filter=ACM \ | |
| "origin/${{ github.base_ref }}...HEAD" \ | |
| -- 'compiler/*.cpp' 'tools/*.cpp') | |
| if [ -z "$files" ]; then | |
| echo "No C++ files changed; skipping tidy." | |
| exit 0 | |
| fi | |
| echo "$files" | xargs -P "$(nproc)" -n 1 clang-tidy-19 -p build | |
| format: | |
| needs: filter | |
| runs-on: ubuntu-latest | |
| steps: | |
| - if: needs.filter.outputs.compiler != 'true' | |
| run: echo "No compiler changes, skipping format." | |
| - if: needs.filter.outputs.compiler == 'true' | |
| uses: actions/checkout@v4 | |
| - if: needs.filter.outputs.compiler == 'true' | |
| uses: awalsh128/cache-apt-pkgs-action@v1 | |
| with: | |
| packages: clang-format-19 | |
| version: 1.0 | |
| - if: needs.filter.outputs.compiler == 'true' | |
| name: Check formatting | |
| run: | | |
| find compiler tools \( -name '*.cpp' -o -name '*.hpp' \) -print0 \ | |
| | xargs -0 clang-format-19 --dry-run --Werror |