Implement predict, returned, logjoint, ... with OnlyAccsVarInfo
#1093
Workflow file for this run
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: Benchmarking | |
| on: | |
| pull_request: | |
| jobs: | |
| benchmark-base: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| results: ${{ steps.benchmark.outputs.results }} | |
| sha: ${{ steps.benchmark.outputs.sha }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| ref: ${{ github.base_ref }} | |
| - uses: julia-actions/setup-julia@v2 | |
| with: | |
| version: '1.11' | |
| - uses: julia-actions/cache@v2 | |
| - name: Run benchmarks | |
| id: benchmark | |
| working-directory: ./benchmarks | |
| run: | | |
| # github output can't handle more than 1 line, hence the tail | |
| julia --project=. -e 'using Pkg; Pkg.instantiate()' | |
| results=$(julia --project=. benchmarks.jl json | tail -n 1 || true) | |
| echo $results | |
| echo "results=$results" >> "$GITHUB_OUTPUT" | |
| echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT" | |
| benchmark-head: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| results: ${{ steps.benchmark.outputs.results }} | |
| sha: ${{ steps.benchmark.outputs.sha }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| - uses: julia-actions/setup-julia@v2 | |
| with: | |
| version: '1.11' | |
| - uses: julia-actions/cache@v2 | |
| - name: Run benchmarks | |
| id: benchmark | |
| working-directory: ./benchmarks | |
| run: | | |
| # github output can't handle more than 1 line, hence the tail | |
| julia --project=. -e 'using Pkg; Pkg.instantiate()' | |
| results=$(julia --project=. benchmarks.jl json | tail -n 1 || true) | |
| echo $results | |
| echo "results=$results" >> "$GITHUB_OUTPUT" | |
| echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT" | |
| combine-results: | |
| runs-on: ubuntu-latest | |
| needs: [benchmark-base, benchmark-head] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| - uses: julia-actions/setup-julia@v2 | |
| with: | |
| version: '1.11' | |
| - uses: julia-actions/cache@v2 | |
| - name: Combine benchmark results | |
| working-directory: ./benchmarks | |
| run: | | |
| version_info=$(julia -e 'using InteractiveUtils; versioninfo()') | |
| echo "$version_info" | |
| echo "VERSION_INFO<<EOF" >> $GITHUB_ENV | |
| echo "$version_info" >> $GITHUB_ENV | |
| echo "EOF" >> $GITHUB_ENV | |
| # save outputs of previous jobs to json file | |
| echo "Base results" | |
| echo "--------------------------------------------------------" | |
| echo '${{needs.benchmark-base.outputs.results}}' | |
| echo '${{needs.benchmark-base.outputs.results}}' > base.json | |
| echo "Head results" | |
| echo "--------------------------------------------------------" | |
| echo '${{needs.benchmark-head.outputs.results}}' | |
| echo '${{needs.benchmark-head.outputs.results}}' > head.json | |
| # combine them and save the output as an env var for later steps | |
| julia --project=. -e 'using Pkg; Pkg.instantiate()' | |
| results=$(julia --project=. benchmarks.jl combine head.json base.json) | |
| echo "Combined results" | |
| echo "--------------------------------------------------------" | |
| echo "$results" | |
| echo "BENCHMARK_OUTPUT<<EOF" >> $GITHUB_ENV | |
| echo "$results" >> $GITHUB_ENV | |
| echo "EOF" >> $GITHUB_ENV | |
| - name: Find existing benchmark comment | |
| uses: peter-evans/find-comment@v4 | |
| id: find_comment | |
| with: | |
| issue-number: ${{ github.event.pull_request.number }} | |
| comment-author: github-actions[bot] | |
| - name: Create or update benchmark comment | |
| uses: peter-evans/create-or-update-comment@v5 | |
| with: | |
| issue-number: ${{ github.event.pull_request.number }} | |
| body: | | |
| ## Benchmark Report | |
| - this PR's head: `${{ needs.benchmark-head.outputs.sha }}` | |
| - base branch: `${{ needs.benchmark-base.outputs.sha }}` | |
| ### Computer Information | |
| ``` | |
| ${{ env.VERSION_INFO }} | |
| ``` | |
| ### Benchmark Results | |
| ${{ env.BENCHMARK_OUTPUT }} | |
| comment-id: ${{ steps.find_comment.outputs.comment-id }} | |
| edit-mode: replace |