Skip to content

Commit

Permalink
Experiment with job outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanhuhta committed Aug 2, 2024
1 parent 211464b commit 0ff5718
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions .github/workflows/bench.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ jobs:
test:
name: Bench
runs-on: ubuntu-latest
steps:
outputs:
flame_graph_ids: ${{ steps.run_benchmarks.outputs.flame_graph_ids }}

steps:
- name: Set up Go 1.22
uses: actions/setup-go@v5
with:
Expand All @@ -17,12 +19,14 @@ jobs:
with:
fetch-depth: 1024

# Commenting out this step for now while we test the PR comment portion
# # TODO: Pin release
# # TODO: Remove git-base
# # TODO: Provide output
# - name: Run Benchmark
# run: go run github.com/grafana/pyrobench@65a9bc2 -v compare --git-base 5eca05b1e4cf63df5d007ec6b13ce7394a0fffe3
# TODO: Pin release
# TODO: Remove git-base
# TODO: Provide output
- name: Run Benchmark
id: run_benchmarks
run: |
IDS=$(go run github.com/grafana/pyrobench@65a9bc2 -v compare --git-base 5eca05b1e4cf63df5d007ec6b13ce7394a0fffe3)
echo 'flame_graph_ids="${IDS}"' >> "$GITHUB_OUTPUT"
- uses: actions/github-script@v7
id: create-comment
Expand All @@ -36,4 +40,9 @@ jobs:
});
- name: Get result
run: echo '${{steps.create-comment.outputs.result}}'
if: ${{ github.event_name == 'pull_request' }}
needs:
- run_benchmarks
run: |
echo '${{steps.create-comment.outputs.result}}'
echo '${{needs.run_benchmarks.outputs.flame_graph_ids}}'

0 comments on commit 0ff5718

Please sign in to comment.