Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
e189f27
ci: add mobench v0.1.37 support
Apr 27, 2026
7cee8b0
ci: add oprf and p256 mobench fixtures
Apr 28, 2026
b90b308
ci: harden mobench sticky comment reporting
Apr 28, 2026
c94bc39
ci: run mobench smoke on low-end devices
Apr 29, 2026
c5caecc
fix: refresh mobench fixtures for main
Apr 29, 2026
65489af
fix: use compatible low-end mobench devices
Apr 29, 2026
7ef0833
fix: lower ios mobench deployment target
Apr 29, 2026
caa5338
fix: support low-end mobench CI runs
Apr 30, 2026
fee5c49
fix: use UIKit mobench runner for iOS 10
Apr 30, 2026
6f132d0
fix: avoid ios 11 json option in mobench runner
Apr 30, 2026
5dd8311
fix: run iphone 7 mobench on supported ios
Apr 30, 2026
9839862
fix: keep iphone 7 browserstack inventory target
Apr 30, 2026
25df732
fix: bound android mobench smoke runs
Apr 30, 2026
775b7c9
fix: cap android mobench step runtime
Apr 30, 2026
f0e7552
fix: cap ios mobench step runtime
Apr 30, 2026
73d5330
fix: isolate mobile benchmark fixtures
Apr 30, 2026
9508729
fix: preserve per-fixture mobench summaries
Apr 30, 2026
4a9b2a0
fix: bound android passport fixture reporting
Apr 30, 2026
76c0e55
fix: tolerate missing android mobench payloads
May 1, 2026
cf4ea8b
ci: test provekit fixtures with mobench 0.1.40
May 2, 2026
9888d0d
ci: target iphone 7 on supported ios
May 2, 2026
2c88868
ci: use browserstack iphone 7 ios 10 target
May 2, 2026
c15de2a
ci: request iphone 7 without ios pin
May 2, 2026
1c2ae38
ci: fall back ios smoke to iphone se
May 2, 2026
1157f20
ci: pin mobench ios readiness fix
May 2, 2026
4ae38bf
ci: fix mobench automation permissions
May 3, 2026
ac224d5
ci: remove stale mobench ios override
May 3, 2026
f08820c
ci: generate mobile bench fixtures in workflows
May 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ jobs:
with:
channel: nightly-2026-03-04
cache-base: main
- name: Setup Noir
uses: noir-lang/noirup@v0.1.2
with:
toolchain: v1.0.0-beta.19
- name: Generate mobile benchmark Noir artifacts
run: bench-mobile/scripts/generate-fixtures.sh
- name: Build
run: cargo build --all-targets --all-features --verbose
- name: Run tests
Expand Down
105 changes: 105 additions & 0 deletions .github/workflows/mobile-bench-pr-auto.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: Mobile Bench PR Auto

on:
pull_request:
types: [labeled]
workflow_run:
workflows: ["Cargo Build & Test"]
types: [completed]

permissions:
contents: write
actions: write
pull-requests: write
issues: write
checks: read

jobs:
resolve:
name: Check compile gate and resolve context
runs-on: ubuntu-latest
if: >-
(github.event_name == 'pull_request' && github.event.action == 'labeled') ||
(github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success')
outputs:
should_run: ${{ steps.pr.outputs.should_run }}
pr_number: ${{ steps.pr.outputs.pr_number }}
head_sha: ${{ steps.pr.outputs.head_sha }}
requested_by: ${{ steps.pr.outputs.requested_by }}
steps:
- name: Resolve PR context
id: pr
env:
GH_TOKEN: ${{ github.token }}
EVENT_NAME: ${{ github.event_name }}
PR_NUMBER_EVENT: ${{ github.event.pull_request.number }}
HEAD_SHA_PR: ${{ github.event.pull_request.head.sha }}
BASE_REF_PR: ${{ github.event.pull_request.base.ref }}
HEAD_SHA_WR: ${{ github.event.workflow_run.head_sha }}
REPO: ${{ github.repository }}
run: |
set -euo pipefail

if [ "$EVENT_NAME" = "pull_request" ]; then
PR_NUMBER="$PR_NUMBER_EVENT"
HEAD_SHA="$HEAD_SHA_PR"
REQUESTED_BY="auto:pull_request"
else
pr_json=$(gh api "repos/${REPO}/pulls?state=open&sort=updated&direction=desc&per_page=50" \
--jq ".[] | select(.head.sha == \"${HEAD_SHA_WR}\") | {number, base_ref: .base.ref}" \
| head -1)
if [ -z "$pr_json" ]; then
echo "::notice::No open PR found for SHA ${HEAD_SHA_WR}, skipping"
echo "should_run=false" >> "$GITHUB_OUTPUT"
exit 0
fi

PR_NUMBER=$(jq -r '.number' <<<"$pr_json")
HEAD_SHA="$HEAD_SHA_WR"
REQUESTED_BY="auto:workflow_run"
fi

has_label=$(gh api "repos/${REPO}/issues/${PR_NUMBER}/labels" \
--jq '.[].name' | grep -qx 'bench' && echo "true" || echo "false")
if [ "$has_label" != "true" ]; then
echo "::notice::PR #${PR_NUMBER} does not have 'bench' label, skipping"
echo "should_run=false" >> "$GITHUB_OUTPUT"
exit 0
fi

if [ "$EVENT_NAME" = "workflow_run" ]; then
gate_status="success"
else
gate_status=$(gh api "repos/${REPO}/commits/${HEAD_SHA}/check-runs" \
--jq '.check_runs[] | select((.name == "Build & Test (all features)" or .name == "Build and test" or .name == "Cargo Build & Test") and .conclusion == "success") | .conclusion' \
| head -1)
fi
if [ "$gate_status" != "success" ]; then
echo "::notice::Compile gate 'Cargo Build & Test' not yet passed for ${HEAD_SHA} (status: ${gate_status:-pending})"
echo "should_run=false" >> "$GITHUB_OUTPUT"
exit 0
fi

echo "pr_number=${PR_NUMBER}" >> "$GITHUB_OUTPUT"
echo "head_sha=${HEAD_SHA}" >> "$GITHUB_OUTPUT"
echo "requested_by=${REQUESTED_BY}" >> "$GITHUB_OUTPUT"
echo "should_run=true" >> "$GITHUB_OUTPUT"

browserstack:
name: Run BrowserStack benchmarks
needs: resolve
if: needs.resolve.outputs.should_run == 'true'
uses: ./.github/workflows/mobile-bench-reusable.yml
secrets: inherit
with:
crate_path: ./bench-mobile
functions: '["bench_mobile::bench_passport_complete_age_check_prove","bench_mobile::bench_oprf_prove","bench_mobile::bench_p256_bigcurve_prove"]'
functions_ios: '["bench_mobile::bench_passport_complete_age_check_prove","bench_mobile::bench_oprf_prove","bench_mobile::bench_p256_bigcurve_prove"]'
functions_android: '["bench_mobile::bench_oprf_prove","bench_mobile::bench_p256_bigcurve_prove","bench_mobile::bench_passport_complete_age_check_prove"]'
platform: both
device_profile: triad
iterations: "2"
warmup: "1"
pr_number: ${{ needs.resolve.outputs.pr_number }}
requested_by: ${{ needs.resolve.outputs.requested_by }}
head_sha: ${{ needs.resolve.outputs.head_sha }}
118 changes: 118 additions & 0 deletions .github/workflows/mobile-bench-pr-command.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
name: Mobile Bench PR Command

on:
issue_comment:
types: [created]

permissions:
contents: write
actions: write
pull-requests: write
issues: write

jobs:
resolve:
name: Parse /mobench and resolve context
if: >-
github.event_name == 'issue_comment' &&
github.event.action == 'created' &&
github.event.issue.pull_request &&
startsWith(github.event.comment.body, '/mobench')
runs-on: ubuntu-latest
outputs:
trusted: ${{ steps.trust.outputs.trusted }}
platform: ${{ steps.parse.outputs.platform }}
device_profile: ${{ steps.parse.outputs.device_profile }}
iterations: ${{ steps.parse.outputs.iterations }}
warmup: ${{ steps.parse.outputs.warmup }}
head_sha: ${{ steps.pr.outputs.head_sha }}
pr_number: ${{ github.event.issue.number }}
requested_by: ${{ github.event.comment.user.login }}
steps:
- name: Check trust
id: trust
env:
AUTHOR_ASSOCIATION: ${{ github.event.comment.author_association }}
run: |
if echo "OWNER,MEMBER,COLLABORATOR" | tr ',' '\n' | grep -qx "$AUTHOR_ASSOCIATION"; then
echo "trusted=true" >> "$GITHUB_OUTPUT"
else
echo "::warning::Untrusted author association: $AUTHOR_ASSOCIATION"
echo "trusted=false" >> "$GITHUB_OUTPUT"
fi

- name: Parse command
if: steps.trust.outputs.trusted == 'true'
id: parse
env:
COMMENT_BODY: ${{ github.event.comment.body }}
run: |
set -euo pipefail
line=$(echo "$COMMENT_BODY" | head -1)

extract_val() {
echo "$line" | sed -n "s/.*${1}=\([^ ]*\).*/\1/p"
}

platform=$(extract_val platform)
device_profile=$(extract_val device_profile)
iterations=$(extract_val iterations)
warmup=$(extract_val warmup)

case "${platform:-both}" in
android|ios|both) platform="${platform:-both}" ;;
*) echo "::warning::Invalid platform '${platform}', defaulting to 'both'"; platform="both" ;;
esac

case "${device_profile:-triad}" in
smoke|triad|worst) device_profile="${device_profile:-triad}" ;;
*) echo "::warning::Invalid device_profile '${device_profile}', defaulting to 'triad'"; device_profile="triad" ;;
esac

if ! [[ "${iterations:-2}" =~ ^[0-9]+$ ]]; then
echo "::warning::Invalid iterations '${iterations}', defaulting to '2'"
iterations="2"
else
iterations="${iterations:-2}"
fi

if ! [[ "${warmup:-1}" =~ ^[0-9]+$ ]]; then
echo "::warning::Invalid warmup '${warmup}', defaulting to '1'"
warmup="1"
else
warmup="${warmup:-1}"
fi

echo "platform=${platform}" >> "$GITHUB_OUTPUT"
echo "device_profile=${device_profile}" >> "$GITHUB_OUTPUT"
echo "iterations=${iterations}" >> "$GITHUB_OUTPUT"
echo "warmup=${warmup}" >> "$GITHUB_OUTPUT"

- name: Resolve PR refs
if: steps.trust.outputs.trusted == 'true'
id: pr
env:
GH_TOKEN: ${{ github.token }}
PR_URL: ${{ github.event.issue.pull_request.url }}
run: |
head_sha=$(gh api "$PR_URL" --jq '.head.sha')
echo "head_sha=${head_sha}" >> "$GITHUB_OUTPUT"

browserstack:
name: Run BrowserStack benchmarks
needs: resolve
if: needs.resolve.outputs.trusted == 'true'
uses: ./.github/workflows/mobile-bench-reusable.yml
secrets: inherit
with:
crate_path: ./bench-mobile
functions: '["bench_mobile::bench_passport_complete_age_check_prove","bench_mobile::bench_oprf_prove","bench_mobile::bench_p256_bigcurve_prove"]'
functions_ios: '["bench_mobile::bench_passport_complete_age_check_prove","bench_mobile::bench_oprf_prove","bench_mobile::bench_p256_bigcurve_prove"]'
functions_android: '["bench_mobile::bench_oprf_prove","bench_mobile::bench_p256_bigcurve_prove","bench_mobile::bench_passport_complete_age_check_prove"]'
platform: ${{ needs.resolve.outputs.platform }}
device_profile: ${{ needs.resolve.outputs.device_profile }}
iterations: ${{ needs.resolve.outputs.iterations }}
warmup: ${{ needs.resolve.outputs.warmup }}
pr_number: ${{ needs.resolve.outputs.pr_number }}
requested_by: ${{ needs.resolve.outputs.requested_by }}
head_sha: ${{ needs.resolve.outputs.head_sha }}
Loading
Loading