File tree Expand file tree Collapse file tree 3 files changed +52
-6
lines changed
Expand file tree Collapse file tree 3 files changed +52
-6
lines changed Original file line number Diff line number Diff line change 2323 - name : Install Dependencies
2424 run : forge install
2525
26+ # NOTE: skipping solc 0.8.32 due to compiler bug
27+ # https://github.com/argotorg/solidity/issues/16360
2628 - name : Run Tests with ${{ matrix.profile }}
2729 run : >
2830 ( [ "${{ matrix.profile }}" = "via-ir-0" ] &&
4547 forge test --use 0.8.16 --via-ir &&
4648 forge test --use 0.8.17 --via-ir
4749 ) ||
48- # NOTE: skipping solc 0.8.32 due to compiler bug
49- # https://github.com/argotorg/solidity/issues/16360
5050 ( [ "${{ matrix.profile }}" = "via-ir-3" ] &&
5151 forge test --use 0.8.33 --via-ir &&
5252 forge test --use 0.8.31 --via-ir &&
Original file line number Diff line number Diff line change @@ -139,11 +139,19 @@ jobs:
139139 - name : Generate gas diff
140140141141 id : gas_diff
142- - name : Add gas diff to sticky comment
143- uses : marocchino/sticky-pull-request-comment@v2
142+ - name : Save gas diff output
143+ if : steps.gas_diff.outputs.markdown
144+ run : |
145+ mkdir -p ./gas-diff
146+ echo "${{ steps.gas_diff.outputs.markdown }}" > ./gas-diff/comment.md
147+ echo "${{ github.event.number }}" > ./gas-diff/pr-number.txt
148+ - name : Upload gas diff artifact
149+ if : steps.gas_diff.outputs.markdown
150+ uses : actions/upload-artifact@v4
144151 with :
145- delete : ${{ !steps.gas_diff.outputs.markdown }}
146- message : ${{ steps.gas_diff.outputs.markdown }}
152+ name : gas-diff
153+ path : gas-diff/
154+
147155
148156 prep-checker :
149157 runs-on : ${{ matrix.os }}
Original file line number Diff line number Diff line change 1+ name : Post Gas Diff Comment
2+
3+ on :
4+ workflow_run :
5+ workflows : ["ci"]
6+ types :
7+ - completed
8+
9+ jobs :
10+ comment :
11+ if : github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success'
12+ runs-on : ubuntu-latest
13+ permissions :
14+ pull-requests : write
15+ steps :
16+ - name : Download gas diff artifact
17+ uses : actions/download-artifact@v4
18+ with :
19+ name : gas-diff
20+ github-token : ${{ secrets.GITHUB_TOKEN }}
21+ run-id : ${{ github.event.workflow_run.id }}
22+ - name : Read PR number
23+ id : pr
24+ run : echo "number=$(cat pr-number.txt)" >> $GITHUB_OUTPUT
25+ - name : Read gas diff
26+ id : gas_diff
27+ run : |
28+ if [ -f comment.md ]; then
29+ echo "markdown<<EOF" >> $GITHUB_OUTPUT
30+ cat comment.md >> $GITHUB_OUTPUT
31+ echo "EOF" >> $GITHUB_OUTPUT
32+ fi
33+ - name : Add gas diff to sticky comment
34+ uses : marocchino/sticky-pull-request-comment@v2
35+ with :
36+ number : ${{ steps.pr.outputs.number }}
37+ delete : ${{ !steps.gas_diff.outputs.markdown }}
38+ message : ${{ steps.gas_diff.outputs.markdown }}
You can’t perform that action at this time.
0 commit comments