Start full suite benchmarks #10
This file contains 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
# Start all benchmark jobs, including full shortint and integer, on Slab CI bot. | |
name: Start full suite benchmarks | |
on: | |
schedule: | |
# Weekly benchmarks will be triggered each Saturday at 1a.m. | |
- cron: '0 1 * * 6' | |
# Quarterly benchmarks will be triggered right before end of quarter, the 25th of the current month at 4a.m. | |
# These benchmarks are far longer to execute hence the reason to run them only four time a year. | |
- cron: '0 4 25 MAR,JUN,SEP,DEC *' | |
workflow_dispatch: | |
inputs: | |
benchmark_type: | |
description: 'Benchmark type' | |
required: true | |
default: 'weekly' | |
type: choice | |
options: | |
- weekly | |
- quarterly | |
jobs: | |
start-benchmarks: | |
if: ${{ (github.event_name == 'schedule' && github.repository == 'zama-ai/tfhe-rs') || github.event_name == 'workflow_dispatch' }} | |
strategy: | |
matrix: | |
command: [ boolean_bench, shortint_full_bench, integer_full_bench, | |
signed_integer_full_bench, pbs_bench, wasm_client_bench ] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout tfhe-rs | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
with: | |
fetch-depth: 0 | |
- name: Checkout Slab repo | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
with: | |
repository: zama-ai/slab | |
path: slab | |
token: ${{ secrets.CONCRETE_ACTIONS_TOKEN }} | |
- name: Set benchmarks type as weekly | |
if: (github.event_name == 'workflow_dispatch' && inputs.benchmark_type == 'weekly') || github.event.schedule == '0 1 * * 6' | |
run: | | |
echo "BENCH_TYPE=weekly_benchmarks" >> "${GITHUB_ENV}" | |
- name: Set benchmarks type as quarterly | |
if: (github.event_name == 'workflow_dispatch' && inputs.benchmark_type == 'quarterly') || github.event.schedule == '0 4 25 MAR,JUN,SEP,DEC *' | |
run: | | |
echo "BENCH_TYPE=quarterly_benchmarks" >> "${GITHUB_ENV}" | |
- name: Start AWS job in Slab | |
shell: bash | |
run: | | |
echo -n '{"command": "${{ matrix.command }}", "git_ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "user_inputs": "${{ env.BENCH_TYPE }}"}' > command.json | |
SIGNATURE="$(slab/scripts/hmac_calculator.sh command.json '${{ secrets.JOB_SECRET }}')" | |
curl -v -k \ | |
--fail-with-body \ | |
-H "Content-Type: application/json" \ | |
-H "X-Slab-Repository: ${{ github.repository }}" \ | |
-H "X-Slab-Command: start_aws" \ | |
-H "X-Hub-Signature-256: sha256=${SIGNATURE}" \ | |
-d @command.json \ | |
${{ secrets.SLAB_URL }} |