Benchmarks #1040
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: "Benchmarks" | |
| on: | |
| schedule: | |
| - cron: "0 8,20 * * 1-5" | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| permissions: read-all | |
| jobs: | |
| benchmark_virtual: | |
| name: Benchmark Virtual | |
| runs-on: | |
| [ | |
| self-hosted, | |
| 1ES.Pool=gha-vmss-d16av5-ci, | |
| "JobId=bench_virtual-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}", | |
| ] | |
| container: | |
| image: mcr.microsoft.com/azurelinux/base/core:3.0 | |
| options: --user root | |
| steps: | |
| - name: "Checkout dependencies" | |
| shell: bash | |
| run: | | |
| gpg --import /etc/pki/rpm-gpg/MICROSOFT-RPM-GPG-KEY | |
| tdnf -y update | |
| tdnf -y install ca-certificates git | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: "Install dependencies" | |
| shell: bash | |
| run: | | |
| set -ex | |
| ./scripts/setup-ci.sh | |
| - name: "Confirm running on Virtual" | |
| run: | | |
| set -ex | |
| python3 tests/infra/platform_detection.py virtual | |
| shell: bash | |
| - name: Build and run virtual perf tests | |
| run: | | |
| git config --global --add safe.directory /__w/CCF/CCF | |
| mkdir build | |
| cd build | |
| cmake -GNinja -DWORKER_THREADS=2 .. | |
| ninja | |
| # Microbenchmarks | |
| ./tests.sh -VV -L benchmark | |
| # End to end performance tests | |
| ./tests.sh -VV -L perf -C perf | |
| # Convert microbenchmark output to bencher json | |
| source env/bin/activate | |
| PYTHONPATH=../tests python convert_pico_to_bencher.py | |
| shell: bash | |
| - uses: bencherdev/bencher@main | |
| - name: Track base branch benchmarks with Bencher | |
| run: | | |
| bencher run \ | |
| --project ccf \ | |
| --token '${{ secrets.BENCHER_API_TOKEN }}' \ | |
| --branch main \ | |
| --testbed gha-vmss-d16av5-ci \ | |
| --adapter json \ | |
| --err \ | |
| --file build/bencher.json | |
| benchmark_snp: | |
| name: Benchmark SNP | |
| runs-on: | |
| [ | |
| self-hosted, | |
| 1ES.Pool=gha-c-aci-ci, | |
| "JobId=bench_snp-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}", | |
| ] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: "Confirm running on SEV-SNP" | |
| run: | | |
| set -ex | |
| python3 tests/infra/platform_detection.py snp | |
| shell: bash | |
| - name: Build and run SNP perf tests | |
| run: | | |
| git config --global --add safe.directory /__w/CCF/CCF | |
| mkdir build | |
| cd build | |
| cmake -GNinja -DWORKER_THREADS=2 .. | |
| ninja | |
| # Microbenchmarks | |
| ./tests.sh -VV -L benchmark -E task_bench | |
| # End to end performance tests | |
| ./tests.sh -VV -L perf -C perf | |
| # Convert microbenchmark output to bencher json | |
| source env/bin/activate | |
| PYTHONPATH=../tests python convert_pico_to_bencher.py | |
| shell: bash | |
| - uses: bencherdev/bencher@main | |
| - name: Track base branch benchmarks with Bencher | |
| run: | | |
| bencher run \ | |
| --project ccf \ | |
| --token '${{ secrets.BENCHER_API_TOKEN }}' \ | |
| --branch main \ | |
| --testbed gha-c-aci-ci \ | |
| --adapter json \ | |
| --err \ | |
| --file build/bencher.json |