[ci] Adding Perf Workflow #48
Workflow file for this run
This file contains 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
# 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 "MESSAGE<<$EOF" >> $GITHUB_OUTPUT | |
echo "$stats" >> $GITHUB_OUTPUT | |
echo "$EOF" >> $GITHUB_OUTPUT | |
echo "$stats" | |
echo "$EOF" | |
- name: Post Comment | |
uses: actions/github-script@v7 | |
with: | |
github-token: ${{secrets.GITHUB_TOKEN}} | |
script: | | |
const message = '${{ steps.parse-stats.outputs.MESSAGE }}' | |
github.rest.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: message | |
}) |