mirror of
https://github.com/zama-ai/tfhe-rs.git
synced 2026-01-09 14:47:56 -05:00
67 lines
2.6 KiB
YAML
67 lines
2.6 KiB
YAML
# 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,
|
|
core_crypto_bench, wasm_client_bench ]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout tfhe-rs
|
|
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Checkout Slab repo
|
|
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
|
|
with:
|
|
repository: zama-ai/slab
|
|
path: slab
|
|
token: ${{ secrets.FHE_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 }}
|