Fixing bug on PTDF calculation with distributed slack #53
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
name: 'Performance Comparison' | |
on: | |
pull_request: | |
jobs: | |
comparison: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: julia-actions/setup-julia@latest | |
- uses: actions/checkout@v1 | |
- name: Run Perfomance Test Main | |
run: | | |
julia --project=test -e 'using Pkg; Pkg.add(PackageSpec(name="PowerNetworkMatrices", rev="main")); Pkg.instantiate()' | |
julia --project=test test/performance/performance_test.jl "Main" | |
- name: Run Perfomance Test Branch | |
run: | | |
julia --project=test -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()' | |
julia --project=test test/performance/performance_test.jl "This Branch" | |
- name: Read precompile results | |
id: precompile_results | |
run: | | |
body="$(cat precompile_time.txt)" | |
body="${body//'%'/'%25'}" | |
body="${body//$'\n'/'%0A'}" | |
body="${body//$'\r'/'%0D'}" | |
echo "::set-output name=body::$body" | |
- name: Read execute results | |
id: execute_results | |
run: | | |
body="$(cat execute_time.txt)" | |
body="${body//'%'/'%25'}" | |
body="${body//$'\n'/'%0A'}" | |
body="${body//$'\r'/'%0D'}" | |
echo "::set-output name=body::$body" | |
- name: Find Comment | |
uses: peter-evans/find-comment@v1 | |
id: fc | |
with: | |
issue-number: ${{ github.event.pull_request.number }} | |
comment-author: 'github-actions[bot]' | |
body-includes: Performance Results | |
- name: Create comment | |
if: steps.fc.outputs.comment-id == '' | |
uses: peter-evans/create-or-update-comment@v1 | |
with: | |
issue-number: ${{ github.event.pull_request.number }} | |
body: | | |
Performance Results | |
| Version | Precompile Time | | |
| :--- | :----: | | |
${{ steps.precompile_results.outputs.body }} | |
| Version | Run Time | | |
| :--- | :----: | | |
${{ steps.execute_results.outputs.body }} | |
- name: Update comment | |
if: steps.fc.outputs.comment-id != '' | |
uses: peter-evans/create-or-update-comment@v1 | |
with: | |
comment-id: ${{ steps.fc.outputs.comment-id }} | |
body: | | |
Performance Results | |
| Version | Precompile Time | | |
| :--- | :----: | | |
${{ steps.precompile_results.outputs.body }} | |
| Version | Execute Time | | |
| :--- | :----: | | |
${{ steps.execute_results.outputs.body }} | |
edit-mode: replace |