-
Notifications
You must be signed in to change notification settings - Fork 37
42 lines (40 loc) · 1.47 KB
/
benchmarks.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# name: Run Benchmarks
# on:
# push:
# pull_request:
# jobs:
# benchmark:
# runs-on: 7950x3d
# steps:
# - uses: actions/checkout@v4
# with:
# fetch-depth: 0
# - name: Set up Python
# run: python3 --version
# - name: update toolchain
# uses: actions-rs/toolchain@v1
# with:
# toolchain: stable
# - name: 'Authenticate to Google Cloud'
# uses: 'google-github-actions/auth@v1'
# with:
# credentials_json: '${{ secrets.GCP_SA_KEY }}'
# - name: Set up Google Cloud SDK
# uses: google-github-actions/setup-gcloud@v1
# with:
# project_id: ${{ secrets.GCP_PROJECT_ID }}
# - name: Install criterion
# run: cargo install cargo-criterion
# - name: setup
# run: cargo run --bin=dev-setup --release
# - name: Run benchmark
# run: RUSTFLAGS="-C target-cpu=native" cargo criterion --message-format=json > benchmark_results.json
# - name: Clean benchmark results
# run: |
# wget https://raw.githubusercontent.com/PolyhedraZK/Expander-rs/main/scripts/parse_benchmark_result.py
# python3 parse_benchmark_result.py benchmark_results.json benchmark_results_clean.json
# - name: Upload benchmark results to Google Cloud Storage
# run: |
# commit_hash=$(git rev-parse HEAD)
# repo_name="${GITHUB_REPOSITORY#*/}"
# gsutil cp benchmark_results_clean.json gs://github_micro_bench/${repo_name}/benchmark_${commit_hash}.json