@@ -75,32 +75,14 @@ jobs:
7575 git checkout ${{ github.event.pull_request.head.sha }}
7676
7777 - name : Run PR benchmarks
78- id : benchmark
7978 run : |
8079 # Compile benchmarks
81- COMPILE_OUTPUT=$( cargo bench --bench compile_demo_art_iai -- --baseline=master --output-format=json | jq -sc | sed 's/\\"//g')
80+ cargo bench --bench compile_demo_art_iai -- --baseline=master --output-format=json | jq -sc > /tmp/compile_output.json
8281
83- # Runtime benchmarks
84- UPDATE_OUTPUT=$(cargo bench --bench update_executor_iai -- --baseline=master --output-format=json | jq -sc | sed 's/\\"//g')
85- RUN_ONCE_OUTPUT=$(cargo bench --bench run_once_iai -- --baseline=master --output-format=json | jq -sc | sed 's/\\"//g')
86- RUN_CACHED_OUTPUT=$(cargo bench --bench run_cached_iai -- --baseline=master --output-format=json | jq -sc | sed 's/\\"//g')
87-
88- # Store outputs
89- echo "COMPILE_OUTPUT<<EOF" >> $GITHUB_OUTPUT
90- echo "$COMPILE_OUTPUT" >> $GITHUB_OUTPUT
91- echo "EOF" >> $GITHUB_OUTPUT
92-
93- echo "UPDATE_OUTPUT<<EOF" >> $GITHUB_OUTPUT
94- echo "$UPDATE_OUTPUT" >> $GITHUB_OUTPUT
95- echo "EOF" >> $GITHUB_OUTPUT
96-
97- echo "RUN_ONCE_OUTPUT<<EOF" >> $GITHUB_OUTPUT
98- echo "$RUN_ONCE_OUTPUT" >> $GITHUB_OUTPUT
99- echo "EOF" >> $GITHUB_OUTPUT
100-
101- echo "RUN_CACHED_OUTPUT<<EOF" >> $GITHUB_OUTPUT
102- echo "$RUN_CACHED_OUTPUT" >> $GITHUB_OUTPUT
103- echo "EOF" >> $GITHUB_OUTPUT
82+ # Runtime benchmarks
83+ cargo bench --bench update_executor_iai -- --baseline=master --output-format=json | jq -sc > /tmp/update_output.json
84+ cargo bench --bench run_once_iai -- --baseline=master --output-format=json | jq -sc > /tmp/run_once_output.json
85+ cargo bench --bench run_cached_iai -- --baseline=master --output-format=json | jq -sc > /tmp/run_cached_output.json
10486
10587 - name : Make old comments collapsed by default
10688 uses : actions/github-script@v7
@@ -132,10 +114,12 @@ jobs:
132114 with :
133115 github-token : ${{secrets.GITHUB_TOKEN}}
134116 script : |
135- const compileOutput = JSON.parse(`${{ steps.benchmark.outputs.COMPILE_OUTPUT }}`);
136- const updateOutput = JSON.parse(`${{ steps.benchmark.outputs.UPDATE_OUTPUT }}`);
137- const runOnceOutput = JSON.parse(`${{ steps.benchmark.outputs.RUN_ONCE_OUTPUT }}`);
138- const runCachedOutput = JSON.parse(`${{ steps.benchmark.outputs.RUN_CACHED_OUTPUT }}`);
117+ const fs = require('fs');
118+
119+ const compileOutput = JSON.parse(fs.readFileSync('/tmp/compile_output.json', 'utf8'));
120+ const updateOutput = JSON.parse(fs.readFileSync('/tmp/update_output.json', 'utf8'));
121+ const runOnceOutput = JSON.parse(fs.readFileSync('/tmp/run_once_output.json', 'utf8'));
122+ const runCachedOutput = JSON.parse(fs.readFileSync('/tmp/run_cached_output.json', 'utf8'));
139123
140124 let significantChanges = false;
141125 let commentBody = "";
0 commit comments