Skip to content

Commit

Permalink
ci: improve the output
Browse files Browse the repository at this point in the history
The markup ##[...] makes GHA groups outputs together, making it easy to
compare results across runs.
  • Loading branch information
sorawee committed Aug 31, 2023
1 parent 37605c0 commit 110d6eb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/circomlib-test.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

(define-check (check-result filename expected)
(printf "=== checking ~a ===\n" filename)
(printf "##[group]~a\n" filename)
(define-values (in out) (make-pipe))
(define orig-out (current-output-port))
(define string-port (open-output-string))
Expand All @@ -25,9 +26,12 @@
(format "~a.r1cs" filename))))]
[current-output-port out])
(define thd (thread (λ () (copy-port in orig-out string-port))))
(time (dynamic-require picus #f))
(match-define-values (_ cpu real gc)
(time-apply (λ () (dynamic-require picus #f)) '()))
(close-output-port out)
(thread-wait thd))
(thread-wait thd)
(printf "##[endgroup]\n")
(printf "cpu: ~a; real: ~a; gc: ~a\n" cpu real gc))
(check-regexp-match
(match expected
['safe #px"(?m:^# weak uniqueness: safe\\.$)"]
Expand Down

0 comments on commit 110d6eb

Please sign in to comment.