benchmark_wasm_client #2081
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
| # Run WASM client benchmarks on an instance and return parsed results to Slab CI bot. | |
| name: benchmark_wasm_client | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| schedule: | |
| # Weekly benchmarks will be triggered each Saturday at 1a.m. | |
| - cron: '0 1 * * 6' | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RESULTS_FILENAME: parsed_benchmark_results_${{ github.sha }}.json | |
| ACTION_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
| RUST_BACKTRACE: "full" | |
| RUST_MIN_STACK: "8388608" | |
| SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }} | |
| SLACK_ICON: https://pbs.twimg.com/profile_images/1274014582265298945/OjBKP9kn_400x400.png | |
| SLACK_USERNAME: ${{ secrets.BOT_USERNAME }} | |
| SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | |
| permissions: {} | |
| # zizmor: ignore[concurrency-limits] only Zama organization members and GitHub can trigger this workflow | |
| jobs: | |
| should-run: | |
| name: benchmark_wasm_client/should-run | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'workflow_dispatch' || | |
| (github.event_name != 'workflow_dispatch' && github.repository == 'zama-ai/tfhe-rs') | |
| permissions: | |
| pull-requests: read # Needed to check for file change | |
| outputs: | |
| wasm_bench: ${{ steps.changed-files.outputs.wasm_bench_any_changed }} | |
| steps: | |
| - name: Checkout tfhe-rs | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: 'false' | |
| token: ${{ secrets.REPO_CHECKOUT_TOKEN }} | |
| - name: Check for file changes | |
| id: changed-files | |
| uses: tj-actions/changed-files@9426d40962ed5378910ee2e21d5f8c6fcbf2dd96 # v47.0.6 | |
| with: | |
| files_yaml: | | |
| wasm_bench: | |
| - tfhe/Cargo.toml | |
| - tfhe-csprng/** | |
| - tfhe-zk-pok/** | |
| - tfhe/src/** | |
| - '!tfhe/src/c_api/**' | |
| - tfhe/web_wasm_parallel_tests/** | |
| - .github/workflows/wasm_client_benchmark.yml | |
| run-benchmarks-cpu-zk-client: | |
| name: benchmark_documentation/run-benchmarks-cpu-zk-client | |
| uses: ./.github/workflows/benchmark_wasm_client_common.yml | |
| needs: should-run | |
| if: github.event_name == 'workflow_dispatch' || | |
| (github.event_name == 'schedule' && github.repository == 'zama-ai/tfhe-rs') || | |
| (github.event_name == 'push' && github.repository == 'zama-ai/tfhe-rs' && needs.should-run.outputs.wasm_bench) | |
| secrets: | |
| BOT_USERNAME: ${{ secrets.BOT_USERNAME }} | |
| SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }} | |
| SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | |
| REPO_CHECKOUT_TOKEN: ${{ secrets.REPO_CHECKOUT_TOKEN }} | |
| JOB_SECRET: ${{ secrets.JOB_SECRET }} | |
| SLAB_ACTION_TOKEN: ${{ secrets.SLAB_ACTION_TOKEN }} | |
| SLAB_URL: ${{ secrets.SLAB_URL }} | |
| SLAB_BASE_URL: ${{ secrets.SLAB_BASE_URL }} |