chore: enable strict compiler flags for tests and integration #69
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: Benchmarking | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| paths: | |
| - 'include/**' | |
| - 'benchmark/**' | |
| - 'ci/benchmarking/**' | |
| - '.github/workflows/benchmarks.yml' | |
| pull_request: | |
| branches: [ "main" ] | |
| paths: | |
| - 'include/**' | |
| - 'benchmark/**' | |
| - 'ci/benchmarking/**' | |
| - '.github/workflows/benchmarks.yml' | |
| jobs: | |
| Measure: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install packages | |
| run: sudo apt-get -qq install libbenchmark-dev libgmp3-dev libcrypto++-dev libcrypto++-doc libcrypto++-utils | |
| - name: Set reusable strings | |
| id: strings | |
| shell: bash | |
| run: | | |
| echo "ci=${{ github.workspace }}/ci/benchmarking" >> "$GITHUB_OUTPUT" | |
| echo "benchmark=${{ github.workspace }}/benchmark" >> "$GITHUB_OUTPUT" | |
| echo "build=${{ github.workspace }}/benchmark/cmake-build-release" >> "$GITHUB_OUTPUT" | |
| - name: Load CMake configuration | |
| run: > | |
| cmake -B ${{ steps.strings.outputs.build }} | |
| -DCMAKE_CXX_COMPILER=g++ | |
| -DCMAKE_C_COMPILER=gcc | |
| -DCMAKE_BUILD_TYPE=Release | |
| -S ${{ steps.strings.outputs.benchmark }} | |
| - name: Build executable | |
| run: cmake --build ${{ steps.strings.outputs.build }} --target Benchmarking -j8 | |
| - name: Run benchmark analysis | |
| working-directory: ${{ steps.strings.outputs.build }} | |
| run: ./Benchmarking --benchmark_out=benchmarks.json --benchmark_out_format=json | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| - name: Write job summary | |
| run: | | |
| echo "## Benchmark Results" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| python ${{ steps.strings.outputs.ci }}/make_summary.py \ | |
| ${{ steps.strings.outputs.build }}/benchmarks.json >> $GITHUB_STEP_SUMMARY | |
| - name: Upload benchmark results | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: benchmark-results | |
| path: ${{ steps.strings.outputs.build }}/benchmarks.json | |