Skip to content

Commit 02b90c9

Browse files
committed
Fixup
1 parent 80adae0 commit 02b90c9

File tree

3 files changed

+22
-8
lines changed

3 files changed

+22
-8
lines changed

.github/workflows/bench.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ jobs:
4545
echo "benches=$JSON" | tee -a $GITHUB_OUTPUT
4646
4747
# Can't persist env vars between jobs, so we pass them as an output and set them in the next job
48-
echo "env-vars=$(tail -n +2 comment.txt)" | tee -a $GITHUB_OUTPUT
48+
echo "env-vars<<EOF" >> $GITHUB_OUTPUT
49+
echo "$(tail -n +2 comment.txt)" | tee -a $GITHUB_OUTPUT
50+
echo "EOF" >> $GITHUB_OUTPUT
4951
5052
benchmark:
5153
needs: [ setup ]
@@ -57,12 +59,8 @@ jobs:
5759
steps:
5860
- name: Set env vars
5961
run: |
60-
# Trims newlines that may arise from `$GITHUB_OUTPUT`
61-
#for var in ${{ inputs.default-env }}
62-
#do
63-
# echo "$(echo $var | tr -d '\n')" | tee -a $GITHUB_ENV
64-
#done
6562
# Overrides default env vars with those specified in the `issue_comment` input if identically named
63+
# Trims newlines that may arise from `$GITHUB_OUTPUT`
6664
for var in ${{ needs.setup.outputs.env-vars }}
6765
do
6866
echo "$(echo $var | tr -d '\n')" | tee -a $GITHUB_ENV

Benchmarks/Main.lean

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,12 @@
1-
def main (_args: List String) : IO Unit := do
2-
IO.println "Hello bench"
1+
import Ix.Benchmark.Bench
2+
3+
def add' (input: Nat): IO Nat := do
4+
pure $ input + 1
5+
6+
def addBench' := bgroup "Add'" [
7+
benchIO "add' 1" add' 1,
8+
benchIO "add' 10" add' 10
9+
]
10+
11+
def main : IO Unit := do
12+
let _result ← addBench'

Main.lean

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ def addBench := bgroup "Add" [
99
benchIO "add 10" add 10
1010
] { report := false }
1111

12+
def addBench' := bgroup "Add'" [
13+
benchIO "add' 1" add 1,
14+
benchIO "add' 10" add 10
15+
]
16+
1217
def main : IO Unit := do
1318
--IO.println "hello"
1419
let _result ← addBench
20+
let _result ← addBench'

0 commit comments

Comments
 (0)