Skip to content

Commit deafa00

Browse files
Copilotpetesramek
andauthored
fix: use standard env var name, xargs -r, and Any CPU platform in benchmark steps
Agent-Logs-Url: https://github.com/petesramek/polyline-algorithm-csharp/sessions/1c7e3b25-3784-4e15-8f10-1bed76e67480 Co-authored-by: petesramek <2333452+petesramek@users.noreply.github.com>
1 parent 88f4ee1 commit deafa00

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

.github/workflows/publish-documentation.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,25 +99,26 @@ jobs:
9999
- name: 'Run benchmarks for v${{ env.friendly-version }}'
100100
shell: bash
101101
env:
102-
benchmarks-artifacts: /tmp/benchmarks
102+
BENCHMARKS_ARTIFACTS: /tmp/benchmarks
103103
run: |
104104
dotnet run \
105105
--project benchmarks/PolylineAlgorithm.Benchmarks/PolylineAlgorithm.Benchmarks.csproj \
106106
--configuration Release \
107+
/p:Platform="Any CPU" \
107108
--framework ${{ vars.DEFAULT_BUILD_FRAMEWORK || 'net10.0' }} \
108109
-- --filter ${{ vars.BENCHMARKDOTNET_FILTER || '*' }} \
109110
--exporters GitHub \
110111
--memory \
111112
--iterationTime 100 \
112113
--join \
113-
--artifacts ${{ env.benchmarks-artifacts }}/
114+
--artifacts $BENCHMARKS_ARTIFACTS/
114115
115116
- name: 'Inject benchmark results into guide for v${{ env.friendly-version }}'
116117
shell: bash
117118
env:
118-
benchmarks-artifacts: /tmp/benchmarks
119+
BENCHMARKS_ARTIFACTS: /tmp/benchmarks
119120
run: |
120-
find ${{ env.benchmarks-artifacts }} -name "*-report-github.md" | sort | xargs cat > /tmp/benchmark_results.md
121+
find "$BENCHMARKS_ARTIFACTS" -name "*-report-github.md" | sort | xargs -r cat > /tmp/benchmark_results.md
121122
awk '/{benchmarks_section}/{while((getline line < "/tmp/benchmark_results.md") > 0) print line; close("/tmp/benchmark_results.md"); next} {print}' \
122123
"api-reference/${{ env.friendly-version }}/guide/benchmarks.md" > /tmp/benchmarks.md
123124
mv /tmp/benchmarks.md "api-reference/${{ env.friendly-version }}/guide/benchmarks.md"

0 commit comments

Comments
 (0)