It somehow works out don't judge #10
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: PipeSort CI | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| workflow_dispatch: {} | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install build dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y cmake ninja-build gcc | |
| - name: Clean build directory | |
| run: | | |
| rm -rf build | |
| - name: Configure (Release) | |
| run: | | |
| cmake -S . -B build \ | |
| -G Ninja \ | |
| -DCMAKE_BUILD_TYPE=Release | |
| - name: Build | |
| run: | | |
| cmake --build build | |
| - name: Run correctness test (psort vs qsort) | |
| run: | | |
| TEST_ALL=$(find build -type f -executable -name test_all | head -n 1 || true) | |
| if [ -z "$TEST_ALL" ]; then | |
| echo "test_all executable not found" | |
| find build -type f | |
| exit 1 | |
| fi | |
| "$TEST_ALL" 5000000 123 | |
| - name: 5M benchmark vs qsort (manual only) | |
| if: github.event_name == 'workflow_dispatch' | |
| run: | | |
| BENCH=$(find build -type f -executable -name bench_u128_qsort | head -n 1 || true) | |
| if [ -z "$BENCH" ]; then | |
| echo "bench_u128_qsort executable not found" | |
| exit 1 | |
| fi | |
| "$BENCH" 5000000 123 | |