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
This commit is contained in:
Harendra Kumar 2021-06-14 00:25:07 +05:30
parent c57d6db136
commit 6194cc1c1e
5 changed files with 49 additions and 32 deletions

View File

@ -58,8 +58,8 @@ env: &env
PACKCHECK: "./packcheck.sh"
# If you have not committed packcheck.sh in your repo at PACKCHECK
# then it is automatically pulled from this URL.
PACKCHECK_GITHUB_URL: "https://raw.githubusercontent.com/harendra-kumar/packcheck"
PACKCHECK_GITHUB_COMMIT: "563702bd02c41343dcd3dfcfef0845ca428a9240"
PACKCHECK_GITHUB_URL: "https://raw.githubusercontent.com/composewell/packcheck"
PACKCHECK_GITHUB_COMMIT: "8c77f80fd3a9df7307d06256c11a9e31d066475e"
executors:
amd64-executor:
@ -106,10 +106,6 @@ preinstall: &preinstall
project-preinstall: &project-preinstall
run: |
# If a custom stack-yaml is specified, replace the default with that
if test -e "$STACK_YAML"; then rm -f stack.yaml && ln -sv $STACK_YAML stack.yaml; else true; fi
unset STACK_YAML
# Get packcheck if needed
CURL=$(which curl)
PACKCHECK_URL=${PACKCHECK_GITHUB_URL}/${PACKCHECK_GITHUB_COMMIT}/packcheck.sh
@ -140,6 +136,24 @@ save: &save
#-----------------------------------------------------------------------------
jobs:
cabal-ghc-8_10_4:
<<: *env
executor: amd64-executor
steps:
- *preinstall
- checkout
- *project-preinstall
- *restore
- run:
environment:
DISABLE_TEST: "yes"
DISABLE_BENCH: "yes"
DISABLE_DIST_CHECKS: "yes"
command: |
apt-get install -y ghc-8.10.4
apt-get install -y cabal-install-3.4
bash -c "$PACKCHECK cabal"
- *save
stack-ghc-8_8:
<<: *env
executor: amd64-executor
@ -211,7 +225,6 @@ jobs:
command: |
apt-get install -y ghc-8.2.2
apt-get install -y cabal-install-3.2
apt-get install libtinfo-dev
bash -c "$PACKCHECK $BUILD"
- *save
cabal-ghc-8_0_2:
@ -350,7 +363,7 @@ jobs:
apt-get install -y cabal-install-3.2
# Run tests with coverage
cabal update
cabal user-config update -a "jobs: 2"
cabal user-config update -a "jobs: 1"
bin/test.sh --coverage --raw
# Upload results to coveralls.io
PATH=$HOME/.cabal/bin:$PATH
@ -381,6 +394,8 @@ workflows:
version: 2
build:
jobs:
- cabal-ghc-8_10_4:
name: GHC 8.10.4 + sdist
#- cabal-ghc-8.6.5
#- cabal-ghc-8_4_4:
# name: GHC 8.4.4 + x86 + debug

View File

@ -22,8 +22,8 @@ jobs:
CABAL_HACKAGE_MIRROR: hackage.haskell.org:http://hackage.fpcomplete.com
PACKCHECK_LOCAL_PATH: "./packcheck.sh"
PACKCHECK_GITHUB_URL: "https://raw.githubusercontent.com/harendra-kumar/packcheck"
PACKCHECK_GITHUB_COMMIT: "563702bd02c41343dcd3dfcfef0845ca428a9240"
PACKCHECK_GITHUB_URL: "https://raw.githubusercontent.com/composewell/packcheck"
PACKCHECK_GITHUB_COMMIT: "8c77f80fd3a9df7307d06256c11a9e31d066475e"
BUILD: ${{ matrix.build }}
GHCVER: ${{ matrix.ghc_version }}
@ -31,8 +31,10 @@ jobs:
CABAL_BUILD_OPTIONS: ${{ matrix.cabal_build_options }} --flag limit-build-mem
CABAL_BUILD_TARGETS: ${{ matrix.cabal_build_targets }}
CABAL_PROJECT: ${{ matrix.cabal_project }}
STACK_YAML: ${{ matrix.stack_yaml }}
STACK_BUILD_OPTIONS: ${{ matrix.stack_build_options }}
DISABLE_DOCS: ${{ matrix.disable_docs }}
DISABLE_TEST: ${{ matrix.disable_test }}
SDIST_OPTIONS: ${{ matrix.sdist_options }}
DISABLE_SDIST_BUILD: ${{ matrix.disable_sdist_build }}
DISABLE_DIST_CHECKS: ${{ matrix.disable_dist_checks }}
@ -41,7 +43,7 @@ jobs:
strategy:
fail-fast: false
matrix:
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]
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]
cabal_version: ["3.4"]
include:
- name: 9.0.1
@ -50,37 +52,40 @@ jobs:
cabal_build_options: "--allow-newer=hsc2hs"
disable_sdist_build: "y"
runner: ubuntu-latest
- name: 8.10.4+stack+lts-17.8
- name: 8.10.4+stack+nightly-2021-06-10
build: stack
resolver: lts-17.8
resolver: nightly-2021-06-10
stack_yaml: stack.yaml
sdist_options: "--ignore-check"
stack_build_options: "--flag streamly-benchmarks:-opt"
runner: ubuntu-latest
- name: 8.10.2+macOS
ghc_version: 8.10.2
- name: 8.10.4+macOS
ghc_version: 8.10.4
build: cabal-v2
disable_sdist_build: "y"
runner: macos-latest
- name: 8.8.3+inspection+fusion-plugin+Werror
ghc_version: 8.8.3
- name: 8.8.4+inspection+fusion-plugin+Werror
ghc_version: 8.8.4
build: cabal-v2
cabal_project: cabal.project.ci
cabal_build_options: "--flag fusion-plugin --flag inspection"
runner: ubuntu-latest
- name: 8.8.4+stack+lts-16.31
build: stack
resolver: lts-16.31
sdist_options: "--ignore-check"
stack_build_options: "--flag streamly-benchmarks:-opt"
- name: 8.8.4
ghc_version: 8.8.4
build: cabal
cabal_project: cabal.project
cabal_build_options: "--flag -opt"
runner: ubuntu-latest
- name: 8.6.5+streamk
ghc_version: 8.6.5
build: cabal-v2
cabal_project: cabal.project
cabal_build_options: "--flag streamk --flag -opt"
runner: ubuntu-latest
- name: 8.6.5+fusion-plugin
ghc_version: 8.6.5
build: cabal-v2
cabal_project: cabal.project
cabal_build_options: "--flag fusion-plugin"
# haddock generation does not work with 8.6.5+fusion-plugin
disable_docs: "y"
@ -88,14 +93,15 @@ jobs:
- name: 8.4.4+debug
ghc_version: 8.4.4
build: cabal-v2
cabal_project: cabal.project
cabal_build_options: "--flag debug --flag -opt"
runner: ubuntu-latest
- name: doctests
ghc_version: 8.8.3
build: cabal-v2
cabal_build_options: "--flag doctests"
disable_dist_checks: "y"
cabal_build_targets: doctests
disable_sdist_build: "y"
runner: ubuntu-latest
steps:
@ -114,10 +120,6 @@ jobs:
- name: Download packcheck
run: |
# If a custom stack-yaml is specified, replace the default with that
if test -e "$STACK_YAML"; then rm -f stack.yaml && ln -sv $STACK_YAML stack.yaml; else true; fi
unset STACK_YAML
# Get packcheck if needed
CURL=$(which curl)
PACKCHECK_URL=${PACKCHECK_GITHUB_URL}/${PACKCHECK_GITHUB_COMMIT}/packcheck.sh

View File

@ -1,4 +1,7 @@
.packcheck.ignore
cabal.project
cabal.project.ci
cabal.project.coverage
cabal.project.hpc-coveralls
hie.yaml
stack.yaml

View File

@ -63,8 +63,8 @@ environment:
PACKCHECK_LOCAL_PATH: "./packcheck.sh"
# If you have not committed packcheck.sh in your repo at PACKCHECK_LOCAL_PATH
# then it is automatically pulled from this URL.
PACKCHECK_GITHUB_URL: "https://raw.githubusercontent.com/harendra-kumar/packcheck"
PACKCHECK_GITHUB_COMMIT: "563702bd02c41343dcd3dfcfef0845ca428a9240"
PACKCHECK_GITHUB_URL: "https://raw.githubusercontent.com/composewell/packcheck"
PACKCHECK_GITHUB_COMMIT: "8c77f80fd3a9df7307d06256c11a9e31d066475e"
# Override the temp directory to avoid sed escaping issues
# See https://github.com/haskell/cabal/issues/5386

View File

@ -84,8 +84,6 @@ extra-source-files:
bin/mk-tags.sh
bin/targets.sh
bin/test.sh
cabal.project
cabal.project.ci
charts-0/streamly-vs-list-time.svg
configure
configure.ac
@ -137,7 +135,6 @@ extra-source-files:
test/lib/Streamly/Test/Prelude/Common.hs
test/streamly-tests.cabal
test/version-bounds.hs
stack.yaml
extra-tmp-files:
config.log