feat(ffi): fake verifying range proofs #1129
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
name: Metrics Change Check | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
concurrency: | |
group: metrics-check-${{ github.event.pull_request.number }} | |
cancel-in-progress: true | |
jobs: | |
check-metrics-changes: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Fetch full history to compare changes | |
- name: Check for metric-related changes | |
id: check-metrics | |
run: | | |
# Get the base commit for comparison | |
if [ "${{ github.event_name }}" = "pull_request" ]; then | |
BASE_COMMIT="${{ github.event.pull_request.base.sha }}" | |
else | |
BASE_COMMIT="${{ github.event.before }}" | |
fi | |
# Check if Grafana dashboard was modified - exit early if so | |
if git diff --name-only $BASE_COMMIT..HEAD | grep -q "benchmark/Grafana-dashboard.json"; then | |
echo "benchmark/Grafana-dashboard.json was modified - skipping metrics check" | |
exit 0 | |
fi | |
# Regex pattern to match metric-related code changes | |
METRIC_REGEX_PATTERN="(counter!|gauge!|histogram!|#\\[metrics\\])" # ci trigger | |
# Check for metric-related changes | |
METRIC_CHANGES=$(git diff $BASE_COMMIT..HEAD --unified=0 | grep -E "$METRIC_REGEX_PATTERN" || true) | |
if [ -n "$METRIC_CHANGES" ]; then | |
echo "⚠️ WARNING: Found metric-related changes, but no dashboard modification:" | |
echo "$METRIC_CHANGES" | |
else | |
echo "✅ No metric-related changes found" | |
fi | |
# Set output variables for the comment step | |
echo "metric_changes_found=$([ -n "$METRIC_CHANGES" ] && echo "true" || echo "false")" >> $GITHUB_OUTPUT | |
echo "metric_changes<<EOF" >> $GITHUB_OUTPUT | |
echo "$METRIC_CHANGES" >> $GITHUB_OUTPUT | |
echo "EOF" >> $GITHUB_OUTPUT | |
- name: Look for previous comment | |
if: github.repository == github.event.pull_request.head.repo.full_name && steps.check-metrics.outputs.metric_changes_found == 'true' | |
id: find-comment | |
uses: peter-evans/find-comment@v3 | |
with: | |
issue-number: ${{ github.event.pull_request.number }} | |
comment-author: github-actions[bot] | |
body-includes: "## Metrics Change Detection ⚠️" | |
- name: Comment on PR (if applicable) | |
if: github.repository == github.event.pull_request.head.repo.full_name && steps.check-metrics.outputs.metric_changes_found == 'true' | |
uses: peter-evans/create-or-update-comment@v4 | |
with: | |
issue-number: ${{ github.event.pull_request.number }} | |
body: | | |
## Metrics Change Detection ⚠️ | |
This PR contains changes related to metrics: | |
``` | |
${{ steps.check-metrics.outputs.metric_changes }} | |
``` | |
However, the dashboard was not modified. | |
You may need to update `benchmark/Grafana-dashboard.json` accordingly. | |
--- | |
*This check is automated to help maintain the dashboard.* | |
edit-mode: replace | |
comment-id: ${{ steps.find-comment.outputs.comment-id }} |