on master help sign in
Update and refactor

* Use cabal build for 8.8.4 to avoid stack extra-deps * Use latest stack nightly for 8.10.4 * Remove cabal.project/stack.yaml from the distribution * Use cabal.project for using test+bench with sdist * Move sdist build without cabal.project file to circle-ci * Avoid stack.yaml relinking

commit6194cc1c1ec7cadbaae93197606e5ece204860b0 authorHarendra Kumar <harendra@composewell.com> dateMon 14 Jun 2021, 00:25 (5 years ago) parentc57d6db
5 files changed+49−32
.circleci/config.yml+23−8 .github/workflows/haskell.yml+21−19 .packcheck.ignore+3 appveyor.yml+2−2 streamly.cabal−3
.circleci/config.yml+23−8
@@ -58,8 +58,8 @@ env: &env
5858 PACKCHECK: "./packcheck.sh"
5959 # If you have not committed packcheck.sh in your repo at PACKCHECK
6060 # then it is automatically pulled from this URL.
61− PACKCHECK_GITHUB_URL: "https://raw.githubusercontent.com/harendra-kumar/packcheck"
62− PACKCHECK_GITHUB_COMMIT: "563702bd02c41343dcd3dfcfef0845ca428a9240"
61+ PACKCHECK_GITHUB_URL: "https://raw.githubusercontent.com/composewell/packcheck"
62+ PACKCHECK_GITHUB_COMMIT: "8c77f80fd3a9df7307d06256c11a9e31d066475e"
6363
6464executors:
6565 amd64-executor:
@@ -106,10 +106,6 @@ preinstall: &preinstall
106106
107107project-preinstall: &project-preinstall
108108 run: |
109− # If a custom stack-yaml is specified, replace the default with that
110− if test -e "$STACK_YAML"; then rm -f stack.yaml && ln -sv $STACK_YAML stack.yaml; else true; fi
111− unset STACK_YAML
112−
113109 # Get packcheck if needed
114110 CURL=$(which curl)
115111 PACKCHECK_URL=${PACKCHECK_GITHUB_URL}/${PACKCHECK_GITHUB_COMMIT}/packcheck.sh
@@ -140,6 +136,24 @@ save: &save
140136#-----------------------------------------------------------------------------
141137
142138jobs:
139+ cabal-ghc-8_10_4:
140+ <<: *env
141+ executor: amd64-executor
142+ steps:
143+ - *preinstall
144+ - checkout
145+ - *project-preinstall
146+ - *restore
147+ - run:
148+ environment:
149+ DISABLE_TEST: "yes"
150+ DISABLE_BENCH: "yes"
151+ DISABLE_DIST_CHECKS: "yes"
152+ command: |
153+ apt-get install -y ghc-8.10.4
154+ apt-get install -y cabal-install-3.4
155+ bash -c "$PACKCHECK cabal"
156+ - *save
143157 stack-ghc-8_8:
144158 <<: *env
145159 executor: amd64-executor
@@ -211,7 +225,6 @@ jobs:
211225 command: |
212226 apt-get install -y ghc-8.2.2
213227 apt-get install -y cabal-install-3.2
214− apt-get install libtinfo-dev
215228 bash -c "$PACKCHECK $BUILD"
216229 - *save
217230 cabal-ghc-8_0_2:
@@ -350,7 +363,7 @@ jobs:
350363 apt-get install -y cabal-install-3.2
351364 # Run tests with coverage
352365 cabal update
353− cabal user-config update -a "jobs: 2"
366+ cabal user-config update -a "jobs: 1"
354367 bin/test.sh --coverage --raw
355368 # Upload results to coveralls.io
356369 PATH=$HOME/.cabal/bin:$PATH
@@ -381,6 +394,8 @@ workflows:
381394 version: 2
382395 build:
383396 jobs:
397+ - cabal-ghc-8_10_4:
398+ name: GHC 8.10.4 + sdist
384399 #- cabal-ghc-8.6.5
385400 #- cabal-ghc-8_4_4:
386401 # name: GHC 8.4.4 + x86 + debug
.github/workflows/haskell.yml+21−19
@@ -22,8 +22,8 @@ jobs:
2222 CABAL_HACKAGE_MIRROR: hackage.haskell.org:http://hackage.fpcomplete.com
2323
2424 PACKCHECK_LOCAL_PATH: "./packcheck.sh"
25− PACKCHECK_GITHUB_URL: "https://raw.githubusercontent.com/harendra-kumar/packcheck"
26− PACKCHECK_GITHUB_COMMIT: "563702bd02c41343dcd3dfcfef0845ca428a9240"
25+ PACKCHECK_GITHUB_URL: "https://raw.githubusercontent.com/composewell/packcheck"
26+ PACKCHECK_GITHUB_COMMIT: "8c77f80fd3a9df7307d06256c11a9e31d066475e"
2727
2828 BUILD: ${{ matrix.build }}
2929 GHCVER: ${{ matrix.ghc_version }}
@@ -31,8 +31,10 @@ jobs:
3131 CABAL_BUILD_OPTIONS: ${{ matrix.cabal_build_options }} --flag limit-build-mem
3232 CABAL_BUILD_TARGETS: ${{ matrix.cabal_build_targets }}
3333 CABAL_PROJECT: ${{ matrix.cabal_project }}
34+ STACK_YAML: ${{ matrix.stack_yaml }}
3435 STACK_BUILD_OPTIONS: ${{ matrix.stack_build_options }}
3536 DISABLE_DOCS: ${{ matrix.disable_docs }}
37+ DISABLE_TEST: ${{ matrix.disable_test }}
3638 SDIST_OPTIONS: ${{ matrix.sdist_options }}
3739 DISABLE_SDIST_BUILD: ${{ matrix.disable_sdist_build }}
3840 DISABLE_DIST_CHECKS: ${{ matrix.disable_dist_checks }}
@@ -41,7 +43,7 @@ jobs:
4143 strategy:
4244 fail-fast: false
4345 matrix:
44− name: [9.0.1, 8.10.4+stack+lts-17.8, 8.10.2+macOS, 8.8.3+inspection+fusion-plugin+Werror, 8.8.4+stack+lts-16.31, 8.6.5+fusion-plugin, 8.6.5+streamk, 8.4.4+debug, doctests]
46+ name: [9.0.1, 8.10.4+stack+nightly-2021-06-10, 8.10.4+macOS, 8.8.4+inspection+fusion-plugin+Werror, 8.8.4, 8.6.5+fusion-plugin, 8.6.5+streamk, 8.4.4+debug, doctests]
4547 cabal_version: ["3.4"]
4648 include:
4749 - name: 9.0.1
@@ -50,37 +52,40 @@ jobs:
5052 cabal_build_options: "--allow-newer=hsc2hs"
5153 disable_sdist_build: "y"
5254 runner: ubuntu-latest
53− - name: 8.10.4+stack+lts-17.8
55+ - name: 8.10.4+stack+nightly-2021-06-10
5456 build: stack
55− resolver: lts-17.8
57+ resolver: nightly-2021-06-10
58+ stack_yaml: stack.yaml
5659 sdist_options: "--ignore-check"
5760 stack_build_options: "--flag streamly-benchmarks:-opt"
5861 runner: ubuntu-latest
59− - name: 8.10.2+macOS
60− ghc_version: 8.10.2
62+ - name: 8.10.4+macOS
63+ ghc_version: 8.10.4
6164 build: cabal-v2
6265 disable_sdist_build: "y"
6366 runner: macos-latest
64− - name: 8.8.3+inspection+fusion-plugin+Werror
65− ghc_version: 8.8.3
67+ - name: 8.8.4+inspection+fusion-plugin+Werror
68+ ghc_version: 8.8.4
6669 build: cabal-v2
6770 cabal_project: cabal.project.ci
6871 cabal_build_options: "--flag fusion-plugin --flag inspection"
6972 runner: ubuntu-latest
70− - name: 8.8.4+stack+lts-16.31
71− build: stack
72− resolver: lts-16.31
73− sdist_options: "--ignore-check"
74− stack_build_options: "--flag streamly-benchmarks:-opt"
73+ - name: 8.8.4
74+ ghc_version: 8.8.4
75+ build: cabal
76+ cabal_project: cabal.project
77+ cabal_build_options: "--flag -opt"
7578 runner: ubuntu-latest
7679 - name: 8.6.5+streamk
7780 ghc_version: 8.6.5
7881 build: cabal-v2
82+ cabal_project: cabal.project
7983 cabal_build_options: "--flag streamk --flag -opt"
8084 runner: ubuntu-latest
8185 - name: 8.6.5+fusion-plugin
8286 ghc_version: 8.6.5
8387 build: cabal-v2
88+ cabal_project: cabal.project
8489 cabal_build_options: "--flag fusion-plugin"
8590 # haddock generation does not work with 8.6.5+fusion-plugin
8691 disable_docs: "y"
@@ -88,14 +93,15 @@ jobs:
8893 - name: 8.4.4+debug
8994 ghc_version: 8.4.4
9095 build: cabal-v2
96+ cabal_project: cabal.project
9197 cabal_build_options: "--flag debug --flag -opt"
9298 runner: ubuntu-latest
9399 - name: doctests
94100 ghc_version: 8.8.3
95101 build: cabal-v2
96102 cabal_build_options: "--flag doctests"
97− disable_dist_checks: "y"
98103 cabal_build_targets: doctests
104+ disable_sdist_build: "y"
99105 runner: ubuntu-latest
100106
101107 steps:
@@ -114,10 +120,6 @@ jobs:
114120
115121 - name: Download packcheck
116122 run: |
117− # If a custom stack-yaml is specified, replace the default with that
118− if test -e "$STACK_YAML"; then rm -f stack.yaml && ln -sv $STACK_YAML stack.yaml; else true; fi
119− unset STACK_YAML
120−
121123 # Get packcheck if needed
122124 CURL=$(which curl)
123125 PACKCHECK_URL=${PACKCHECK_GITHUB_URL}/${PACKCHECK_GITHUB_COMMIT}/packcheck.sh
.packcheck.ignore+3
@@ -1,4 +1,7 @@
11.packcheck.ignore
2+cabal.project
3+cabal.project.ci
24cabal.project.coverage
35cabal.project.hpc-coveralls
46hie.yaml
7+stack.yaml
appveyor.yml+2−2
@@ -63,8 +63,8 @@ environment:
6363 PACKCHECK_LOCAL_PATH: "./packcheck.sh"
6464 # If you have not committed packcheck.sh in your repo at PACKCHECK_LOCAL_PATH
6565 # then it is automatically pulled from this URL.
66− PACKCHECK_GITHUB_URL: "https://raw.githubusercontent.com/harendra-kumar/packcheck"
67− PACKCHECK_GITHUB_COMMIT: "563702bd02c41343dcd3dfcfef0845ca428a9240"
66+ PACKCHECK_GITHUB_URL: "https://raw.githubusercontent.com/composewell/packcheck"
67+ PACKCHECK_GITHUB_COMMIT: "8c77f80fd3a9df7307d06256c11a9e31d066475e"
6868
6969 # Override the temp directory to avoid sed escaping issues
7070 # See https://github.com/haskell/cabal/issues/5386
streamly.cabal−3
@@ -84,8 +84,6 @@ extra-source-files:
8484 bin/mk-tags.sh
8585 bin/targets.sh
8686 bin/test.sh
87− cabal.project
88− cabal.project.ci
8987 charts-0/streamly-vs-list-time.svg
9088 configure
9189 configure.ac
@@ -137,7 +135,6 @@ extra-source-files:
137135 test/lib/Streamly/Test/Prelude/Common.hs
138136 test/streamly-tests.cabal
139137 test/version-bounds.hs
140− stack.yaml
141138
142139extra-tmp-files:
143140 config.log