Skip to content

[ci] Adding Perf Workflow #30

[ci] Adding Perf Workflow

[ci] Adding Perf Workflow #30

Workflow file for this run

# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
name: Performance Analysis
on:
pull_request:
types: [opened, synchronize]
jobs:
plot:
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
deployments: read
packages: none
pull-requests: write
security-events: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Parse Statistics
id: parse-stats
run: |
git show --format=%H -s HEAD
git rev-list --max-parents=0 HEAD
pip install --pre azure-data-tables azure-storage-blob pandas matplotlib
stats=$(python3 tools/plot.py \
--connection "${{ secrets.AZURE_STORAGE_CONNECTION_STRING }}" \
--table ${{ secrets.AZURE_STORAGE_TABLE_NAME }} \
--key ${{ secrets.AZURE_STORAGE_KEY }} \
--container ${{ secrets.AZURE_STORAGE_CONTAINER }} \
--no-plot)
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
echo "TEXT<<$EOF" >> $GITHUB_OUTPUT
echo "$stats" >> $GITHUB_OUTPUT
echo "$EOF" >> $GITHUB_OUTPUT
- name: Post Comment
uses: actions/github-script@v7
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: "${{ steps.parse-stats.outputs.TEXT }}"
})