Skip to content

Commit 4b180e3

Browse files
committed
Fixed building benchmarks
Benchmarks are also should build on CI.
1 parent 33f980a commit 4b180e3

File tree

3 files changed

+16
-8
lines changed

3 files changed

+16
-8
lines changed

.github/workflows/haskell.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,9 @@ jobs:
107107
restore-keys: cache-dist-${{ env.CACHE_VERSION }}-${{ runner.os }}-${{ matrix.ghc }}
108108

109109
- name: Build dependencies
110-
run: cabal build --only-dependencies all
110+
run: |
111+
cabal build --only-dependencies io-sim
112+
cabal build --only-dependencies io-classes
111113
112114
- name: Build projects [build]
113115
run: cabal build all

cabal.project

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,20 @@ packages: ./io-sim
55
./strict-stm
66

77
package io-sim
8-
tests: True
9-
-- NOTE: to enable benchmarks, one needs to disable tests for --
10-
-- `typed-protocols-examples`. This won't be a problem, once `io-sim` lands
11-
-- in its own repository.
12-
benchmarks: False
8+
flags: +asserts
139

1410
package io-classes
1511
flags: +asserts
1612

1713
package strict-stm
1814
flags: +asserts
15+
16+
source-repository-package
17+
type: git
18+
location: https://github.com/input-output-hk/typed-protocols
19+
tag: b00ba45ed0c81284378ddea9a42c96e8ccb855e0
20+
--sha256: 1qdp1wbvbmcs8z0c8phjz58w1zfwb1lkb0bjh7ksfy3hyrzcs07i
21+
subdir:
22+
typed-protocols
23+
typed-protocols-cborg
24+
typed-protocols-examples

io-sim/bench/Main.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import Control.Monad.Class.MonadSay
1111
import Control.Monad.Class.MonadThrow
1212
import Control.Monad.Class.MonadTimer
1313
import Control.Monad.IOSim
14-
import Control.Tracer (Tracer (..), nullTracer)
14+
import Control.Tracer (Tracer (..), emit, nullTracer)
1515

1616
import Criterion
1717
import Criterion.Main
@@ -104,7 +104,7 @@ main = defaultMain
104104
, bench "events" $
105105
nf id ( selectTraceEventsSay
106106
$ runSimTrace
107-
$ prop_channel Nothing n (Tracer $ say . show))
107+
$ prop_channel Nothing n (Tracer $ emit $ say . show))
108108
]
109109
, env (pure ()) $ \_ ->
110110
bgroup "delays"

0 commit comments

Comments
 (0)