Implement efficient adjacency graph from bipartite #113
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: Benchmark | |
on: | |
pull_request: | |
types: [labeled, opened, synchronize, reopened] | |
permissions: | |
pull-requests: write | |
jobs: | |
Benchmark: | |
runs-on: ubuntu-latest | |
if: contains(github.event.pull_request.labels.*.name, 'benchmark') | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: julia-actions/setup-julia@v2 | |
with: | |
version: "1" | |
- uses: julia-actions/cache@v2 | |
- name: Extract Package Name from Project.toml | |
id: extract-package-name | |
run: | | |
PACKAGE_NAME=$(grep "^name" Project.toml | sed 's/^name = "\(.*\)"$/\1/') | |
echo "::set-output name=package_name::$PACKAGE_NAME" | |
- name: Build AirspeedVelocity | |
run: | | |
# Lightweight build step, as sometimes the runner runs out of memory: | |
julia -e 'ENV["JULIA_PKG_PRECOMPILE_AUTO"]=0; import Pkg; Pkg.add("AirspeedVelocity")' | |
julia -e 'ENV["JULIA_PKG_PRECOMPILE_AUTO"]=0; import Pkg; Pkg.build("AirspeedVelocity")' | |
- name: Add ~/.julia/bin to PATH | |
run: | | |
echo "$HOME/.julia/bin" >> $GITHUB_PATH | |
- name: Run benchmarks | |
run: | | |
echo $PATH | |
ls -l ~/.julia/bin | |
mkdir results | |
benchpkg ${{ steps.extract-package-name.outputs.package_name }} --rev="${{github.event.repository.default_branch}},${{github.event.pull_request.head.sha}}" --url=${{ github.event.repository.clone_url }} --bench-on="${{github.event.repository.default_branch}}" --output-dir=results/ --tune | |
- name: Create markdown table from benchmarks | |
run: | | |
benchpkgtable ${{ steps.extract-package-name.outputs.package_name }} --rev="${{github.event.repository.default_branch}},${{github.event.pull_request.head.sha}}" --input-dir=results/ --ratio > table.md | |
echo '### Benchmark Results' > body.md | |
echo '' >> body.md | |
echo '' >> body.md | |
cat table.md >> body.md | |
echo '' >> body.md | |
echo '' >> body.md | |
- name: Find Comment | |
uses: peter-evans/find-comment@v3 | |
id: fcbenchmark | |
with: | |
issue-number: ${{ github.event.pull_request.number }} | |
comment-author: 'github-actions[bot]' | |
body-includes: Benchmark Results | |
- name: Comment on PR | |
uses: peter-evans/create-or-update-comment@v4 | |
with: | |
comment-id: ${{ steps.fcbenchmark.outputs.comment-id }} | |
issue-number: ${{ github.event.pull_request.number }} | |
body-path: body.md | |
edit-mode: replace |