Skip to content

Commit 0d9937f

Browse files
Add a deprecated-tests flag, move dev-no-opt CI to Linux
The deprecated Prelude tests were built only with the dev flag, in the macOS dev-no-opt job, where Prelude.Async and Prelude.WAsync took about 6 minutes each. Build them with the new deprecated-tests flag instead, in the ubuntu 9.8.4 ci job. The macOS stack job still runs the tests on macOS.
1 parent f986d69 commit 0d9937f

2 files changed

Lines changed: 23 additions & 15 deletions

File tree

‎.github/workflows/haskell.yml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ jobs:
194194

195195
# This includes the debug flag as well
196196
- name: dev-no-opt
197-
runner: macos-latest
197+
runner: ubuntu-latest
198198
command: cabal
199199
ghc_version: 9.14.1
200200
# WARNING! cannot use # comments inside pack_options.
@@ -246,9 +246,11 @@ jobs:
246246
runner: ubuntu-latest
247247
command: cabal
248248
ghc_version: 9.8.4
249+
# The deprecated tests need the deprecated modules of streamly.
249250
# WARNING! cannot use # comments inside pack_options.
250251
pack_options: >-
251252
CABAL_PROJECT=cabal.project
253+
CABAL_BUILD_OPTIONS="--flag deprecated-tests --constraint=streamly+internal-dev"
252254
ignore_error: false
253255

254256
- name: streamly-sdist

‎test/streamly-tests.cabal‎

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ flag dev
3535
manual: True
3636
default: False
3737

38+
flag deprecated-tests
39+
description: Include the tests of deprecated modules, requires the
40+
internal-dev flag of streamly
41+
manual: True
42+
default: False
43+
3844
flag has-llvm
3945
description: Use llvm backend for better performance
4046
manual: True
@@ -204,7 +210,7 @@ library
204210
Streamly.Test.Data.Parser.CommonTests
205211
if !flag(use-streamly-core)
206212
exposed-modules: Streamly.Test.Control.Exception.Common
207-
if !flag(use-streamly-core) && flag(dev)
213+
if !flag(use-streamly-core) && flag(deprecated-tests)
208214
exposed-modules: Streamly.Test.Prelude.Common
209215

210216
-------------------------------------------------------------------------------
@@ -646,7 +652,7 @@ test-suite Prelude
646652
ghc-options: -main-is Streamly.Test.Prelude.main
647653
if flag(use-streamly-core)
648654
buildable: False
649-
if !flag(dev)
655+
if !flag(deprecated-tests)
650656
buildable: False
651657

652658
test-suite Prelude.Ahead
@@ -656,7 +662,7 @@ test-suite Prelude.Ahead
656662
ghc-options: -main-is Streamly.Test.Prelude.Ahead.main
657663
if flag(use-streamly-core)
658664
buildable: False
659-
if !flag(dev)
665+
if !flag(deprecated-tests)
660666
buildable: False
661667

662668
test-suite Prelude.Async
@@ -666,7 +672,7 @@ test-suite Prelude.Async
666672
ghc-options: -main-is Streamly.Test.Prelude.Async.main
667673
if flag(use-streamly-core)
668674
buildable: False
669-
if !flag(dev)
675+
if !flag(deprecated-tests)
670676
buildable: False
671677

672678
test-suite Prelude.Concurrent
@@ -678,7 +684,7 @@ test-suite Prelude.Concurrent
678684
ghc-options: +RTS -M2000M -RTS
679685
if flag(use-streamly-core)
680686
buildable: False
681-
if !flag(dev)
687+
if !flag(deprecated-tests)
682688
buildable: False
683689

684690
test-suite Prelude.Fold
@@ -688,7 +694,7 @@ test-suite Prelude.Fold
688694
ghc-options: -main-is Streamly.Test.Prelude.Fold.main
689695
if flag(use-streamly-core)
690696
buildable: False
691-
if !flag(dev)
697+
if !flag(deprecated-tests)
692698
buildable: False
693699

694700
test-suite Prelude.Parallel
@@ -698,15 +704,15 @@ test-suite Prelude.Parallel
698704
ghc-options: -main-is Streamly.Test.Prelude.Parallel.main
699705
if flag(use-streamly-core)
700706
buildable: False
701-
if !flag(dev)
707+
if !flag(deprecated-tests)
702708
buildable: False
703709

704710
test-suite Prelude.Rate
705711
import:always-optimized
706712
type: exitcode-stdio-1.0
707713
main-is: Streamly/Test/Prelude/Rate.hs
708714
ghc-options: -main-is Streamly.Test.Prelude.Rate.main
709-
if flag(dev)
715+
if flag(deprecated-tests)
710716
buildable: True
711717
else
712718
buildable: False
@@ -722,7 +728,7 @@ test-suite Prelude.Serial
722728
ghc-options: +RTS -M1500M -RTS
723729
if flag(use-streamly-core)
724730
buildable: False
725-
if !flag(dev)
731+
if !flag(deprecated-tests)
726732
buildable: False
727733

728734
test-suite Prelude.Top
@@ -731,7 +737,7 @@ test-suite Prelude.Top
731737
main-is: Streamly/Test/Prelude/Top.hs
732738
if flag(use-streamly-core)
733739
buildable: False
734-
if !flag(dev)
740+
if !flag(deprecated-tests)
735741
buildable: False
736742

737743
test-suite Prelude.WAsync
@@ -741,7 +747,7 @@ test-suite Prelude.WAsync
741747
ghc-options: -main-is Streamly.Test.Prelude.WAsync.main
742748
if flag(use-streamly-core)
743749
buildable: False
744-
if !flag(dev)
750+
if !flag(deprecated-tests)
745751
buildable: False
746752

747753
test-suite Prelude.WSerial
@@ -751,7 +757,7 @@ test-suite Prelude.WSerial
751757
ghc-options: -main-is Streamly.Test.Prelude.WSerial.main
752758
if flag(use-streamly-core)
753759
buildable: False
754-
if !flag(dev)
760+
if !flag(deprecated-tests)
755761
buildable: False
756762

757763
test-suite Prelude.ZipAsync
@@ -763,7 +769,7 @@ test-suite Prelude.ZipAsync
763769
ghc-options: +RTS -M750M -RTS
764770
if flag(use-streamly-core)
765771
buildable: False
766-
if !flag(dev)
772+
if !flag(deprecated-tests)
767773
buildable: False
768774

769775
test-suite Prelude.ZipSerial
@@ -773,5 +779,5 @@ test-suite Prelude.ZipSerial
773779
ghc-options: -main-is Streamly.Test.Prelude.ZipSerial.main
774780
if flag(use-streamly-core)
775781
buildable: False
776-
if !flag(dev)
782+
if !flag(deprecated-tests)
777783
buildable: False

0 commit comments

Comments
 (0)