Skip to content

Commit 8c6700d

Browse files
authored
Split test and bench out to separate packages (#43)
1 parent 1c43de8 commit 8c6700d

File tree

109 files changed

+353
-269
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+353
-269
lines changed

.github/workflows/build.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ on:
1212
- package.yaml
1313
- stack.yaml
1414
- stack.yaml.lock
15-
- "src/**/*.hs"
16-
- "test/**/*.hs"
15+
- "bitcoin/**/*.hs"
16+
- "bitcoin-test/**/*.hs"
1717
- ".github/workflows/build.yaml"
1818
types:
1919
- synchronize
@@ -27,14 +27,13 @@ on:
2727
- package.yaml
2828
- stack.yaml
2929
- stack.yaml.lock
30-
- "src/**/*.hs"
31-
- "test/**/*.hs"
30+
- "bitcoin/**/*.hs"
31+
- "bitcoin-test/**/*.hs"
3232
- ".github/workflows/build.yaml"
3333
workflow_dispatch:
3434
inputs: {}
3535

3636
jobs:
37-
3837
build:
3938
strategy:
4039
fail-fast: false

.github/workflows/hlint.yaml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ on:
1212
paths:
1313
- stack.yaml
1414
- .hlint.yaml
15-
- "src/**/*.hs"
16-
- "test/**/*.hs"
15+
- "bitcoin/**/*.hs"
16+
- "bitcoin-test/**/*.hs"
17+
- "bitcoin-bench/**/*.hs"
1718
- ".github/workflows/hlint.yaml"
1819
types:
1920
- synchronize
@@ -26,8 +27,8 @@ on:
2627
paths:
2728
- stack.yaml
2829
- .hlint.yaml
29-
- "src/**/*.hs"
30-
- "test/**/*.hs"
30+
- "bitcoin/**/*.hs"
31+
- "bitcoin-test/**/*.hs"
3132
- ".github/workflows/hlint.yaml"
3233
workflow_dispatch:
3334
inputs: {}
@@ -39,14 +40,14 @@ jobs:
3940
steps:
4041
- uses: actions/checkout@v3
4142

42-
- name: 'Set up HLint'
43+
- name: "Set up HLint"
4344
uses: haskell/actions/hlint-setup@v2
4445
with:
45-
version: '3.5'
46+
version: "3.5"
4647

47-
- name: 'Run HLint'
48+
- name: "Run HLint"
4849
uses: haskell/actions/hlint-run@v2
4950
with:
5051
# For some reason this has to be a string containing JSON rather than a YAML sequence
51-
path: '[ "src/", "test/"]'
52+
path: '[ "bitcoin/", "bitcoin-test/", "bitcoin-bench/" ]'
5253
fail-on: warning
File renamed without changes.

bitcoin-bench/bitcoin-bench.cabal

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
cabal-version: 1.12
2+
3+
-- This file has been generated from package.yaml by hpack version 0.35.0.
4+
--
5+
-- see: https://github.com/sol/hpack
6+
7+
name: bitcoin-bench
8+
version: 0.1.0
9+
synopsis: Bitcoin benchmark library for Haskell
10+
description: Please see the README on GitHub at <https://github.com/haskell-bitcoin/bitcoin#readme>
11+
category: Bitcoin, Finance, Network
12+
homepage: http://github.com/haskell-bitcoin/bitcoin#readme
13+
bug-reports: http://github.com/haskell-bitcoin/bitcoin/issues
14+
author: Philippe Laprade,
15+
Jean-Pierre Rupp,
16+
Matthew Wraith,
17+
Keagan McClelland
18+
maintainer: [email protected]
19+
license: BSD3
20+
build-type: Simple
21+
extra-source-files:
22+
./data/block-758000.dat
23+
./data/block-758100.dat
24+
./data/block-758200.dat
25+
./data/block-758300.dat
26+
./data/tx-A.dat
27+
./data/tx-B.dat
28+
./data/tx-C.dat
29+
30+
source-repository head
31+
type: git
32+
location: git://github.com/haskell-bitcoin/bitcoin.git
33+
34+
benchmark benchmark
35+
type: exitcode-stdio-1.0
36+
main-is: Main.hs
37+
other-modules:
38+
Paths_bitcoin_bench
39+
build-depends:
40+
base >=4.9 && <5
41+
, binary >=0.8.8
42+
, bitcoin
43+
, bytestring >=0.10.10.0
44+
, criterion >=1.5 && <1.7
45+
, deepseq >=1.4.4.0
46+
, text >=1.2.3.0
47+
default-language: Haskell2010
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

bitcoin-bench/package.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: bitcoin-bench
2+
version: 0.1.0
3+
synopsis: Bitcoin benchmark library for Haskell
4+
description: Please see the README on GitHub at <https://github.com/haskell-bitcoin/bitcoin#readme>
5+
category: Bitcoin, Finance, Network
6+
author:
7+
- Philippe Laprade
8+
- Jean-Pierre Rupp
9+
- Matthew Wraith
10+
- Keagan McClelland
11+
maintainer: [email protected]
12+
license: BSD3
13+
homepage: http://github.com/haskell-bitcoin/bitcoin#readme
14+
git: git://github.com/haskell-bitcoin/bitcoin.git
15+
bug-reports: http://github.com/haskell-bitcoin/bitcoin/issues
16+
extra-source-files:
17+
- ./data/*.dat # raw data for benchmarks
18+
benchmarks:
19+
benchmark:
20+
main: Main.hs
21+
dependencies:
22+
- bitcoin
23+
- criterion >=1.5 && <1.7
24+
- base >=4.9 && <5
25+
- binary >= 0.8.8
26+
- bytestring >= 0.10.10.0
27+
- deepseq >= 1.4.4.0
28+
- text >= 1.2.3.0

bitcoin-test/bitcoin-test.cabal

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
cabal-version: 1.12
2+
3+
-- This file has been generated from package.yaml by hpack version 0.35.0.
4+
--
5+
-- see: https://github.com/sol/hpack
6+
7+
name: bitcoin-test
8+
version: 0.1.0
9+
synopsis: Bitcoin test library for Haskell
10+
description: Please see the README on GitHub at <https://github.com/haskell-bitcoin/bitcoin#readme>
11+
category: Bitcoin, Finance, Network
12+
homepage: http://github.com/haskell-bitcoin/bitcoin#readme
13+
bug-reports: http://github.com/haskell-bitcoin/bitcoin/issues
14+
author: Philippe Laprade,
15+
Jean-Pierre Rupp,
16+
Matthew Wraith,
17+
Keagan McClelland
18+
maintainer: [email protected]
19+
license: BSD3
20+
build-type: Simple
21+
extra-source-files:
22+
./data/bip341.json
23+
./data/complex_psbt.json
24+
./data/forkid_script_tests.json
25+
./data/forkid_sighash.json
26+
./data/key_io_invalid.json
27+
./data/key_io_valid.json
28+
./data/rfc6979abc.json
29+
./data/rfc6979core.json
30+
./data/rfc6979DERabc.json
31+
./data/rfc6979DERcore.json
32+
./data/script_tests.json
33+
./data/sig_nonstrict.json
34+
./data/sig_strict.json
35+
./data/sighash.json
36+
37+
source-repository head
38+
type: git
39+
location: git://github.com/haskell-bitcoin/bitcoin.git
40+
41+
library
42+
exposed-modules:
43+
Bitcoin.Address.Bech32Spec
44+
Bitcoin.AddressSpec
45+
Bitcoin.BlockSpec
46+
Bitcoin.Crypto.HashSpec
47+
Bitcoin.Crypto.SignatureSpec
48+
Bitcoin.Keys.ExtendedSpec
49+
Bitcoin.Keys.MnemonicSpec
50+
Bitcoin.KeysSpec
51+
Bitcoin.NetworkSpec
52+
Bitcoin.Orphans
53+
Bitcoin.ScriptSpec
54+
Bitcoin.Transaction.PartialSpec
55+
Bitcoin.Transaction.TaprootSpec
56+
Bitcoin.TransactionSpec
57+
Bitcoin.Util.Arbitrary
58+
Bitcoin.Util.Arbitrary.Address
59+
Bitcoin.Util.Arbitrary.Block
60+
Bitcoin.Util.Arbitrary.Crypto
61+
Bitcoin.Util.Arbitrary.Keys
62+
Bitcoin.Util.Arbitrary.Message
63+
Bitcoin.Util.Arbitrary.Network
64+
Bitcoin.Util.Arbitrary.Script
65+
Bitcoin.Util.Arbitrary.Transaction
66+
Bitcoin.Util.Arbitrary.Util
67+
Bitcoin.UtilSpec
68+
hs-source-dirs:
69+
lib
70+
build-depends:
71+
HUnit >=1.6.0.0
72+
, QuickCheck >=2.13.2
73+
, aeson >=1.4.6.0
74+
, base >=4.9 && <5
75+
, base64 ==0.4.*
76+
, binary >=0.8.8
77+
, bitcoin
78+
, bytestring >=0.10.10.0
79+
, containers >=0.6.2.1
80+
, hspec >=2.7.1
81+
, memory >=0.15.0
82+
, scientific >=0.3.6.2
83+
, secp256k1-haskell >=0.4.0
84+
, string-conversions >=0.4.0.1
85+
, text >=1.2.3.0
86+
, time >=1.9.3
87+
, transformers >=0.5.6.2
88+
, unordered-containers >=0.2.10.0
89+
default-language: Haskell2010
90+
91+
test-suite spec
92+
type: exitcode-stdio-1.0
93+
main-is: Spec.hs
94+
other-modules:
95+
Paths_bitcoin_test
96+
hs-source-dirs:
97+
exec
98+
build-depends:
99+
HUnit >=1.6.0.0
100+
, QuickCheck >=2.13.2
101+
, aeson >=1.4.6.0
102+
, base >=4.9 && <5
103+
, base64 ==0.4.*
104+
, binary >=0.8.8
105+
, bitcoin
106+
, bitcoin-test
107+
, bytestring >=0.10.10.0
108+
, containers >=0.6.2.1
109+
, hspec >=2.7.1
110+
, memory >=0.15.0
111+
, scientific >=0.3.6.2
112+
, secp256k1-haskell >=0.4.0
113+
, string-conversions >=0.4.0.1
114+
, text >=1.2.3.0
115+
, time >=1.9.3
116+
, transformers >=0.5.6.2
117+
, unordered-containers >=0.2.10.0
118+
default-language: Haskell2010
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

bitcoin-test/package.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: bitcoin-test
2+
version: 0.1.0
3+
synopsis: Bitcoin test library for Haskell
4+
description: Please see the README on GitHub at <https://github.com/haskell-bitcoin/bitcoin#readme>
5+
category: Bitcoin, Finance, Network
6+
author:
7+
- Philippe Laprade
8+
- Jean-Pierre Rupp
9+
- Matthew Wraith
10+
- Keagan McClelland
11+
maintainer: [email protected]
12+
license: BSD3
13+
homepage: http://github.com/haskell-bitcoin/bitcoin#readme
14+
git: git://github.com/haskell-bitcoin/bitcoin.git
15+
bug-reports: http://github.com/haskell-bitcoin/bitcoin/issues
16+
extra-source-files:
17+
- ./data/*.json # raw data for tests
18+
dependencies:
19+
- bitcoin
20+
- aeson >= 1.4.6.0
21+
- base >=4.9 && <5
22+
- base64 ^>= 0.4
23+
- binary >= 0.8.8
24+
- bytestring >= 0.10.10.0
25+
- containers >= 0.6.2.1
26+
- hspec >= 2.7.1
27+
- memory >= 0.15.0
28+
- scientific >= 0.3.6.2
29+
- secp256k1-haskell >= 0.4.0
30+
- string-conversions >= 0.4.0.1
31+
- text >= 1.2.3.0
32+
- time >= 1.9.3
33+
- transformers >= 0.5.6.2
34+
- unordered-containers >= 0.2.10.0
35+
- HUnit >= 1.6.0.0
36+
- QuickCheck >= 2.13.2
37+
library:
38+
source-dirs: lib
39+
when:
40+
- condition: false
41+
other-modules: Paths_bitcoin_test
42+
tests:
43+
spec:
44+
source-dirs: exec
45+
main: Spec.hs
46+
dependencies:
47+
- bitcoin-test

0 commit comments

Comments
 (0)