streamly/.travis.yml

203 lines
9.3 KiB
YAML
Raw Normal View History

2018-05-27 16:59:14 +03:00
# You can use any of the options supported by packcheck as environment
# variables here. See https://github.com/harendra-kumar/packcheck for all
# options and their explanation.
2017-12-22 01:23:46 +03:00
env:
2018-05-27 16:59:14 +03:00
# ------------------------------------------------------------------------
# Global options, you can use these per build as well
# ------------------------------------------------------------------------
2017-12-22 01:23:46 +03:00
global:
2018-03-08 23:35:29 +03:00
# ------------------------------------------------------------------------
2018-05-27 16:59:14 +03:00
# Common options
2018-03-08 23:35:29 +03:00
# ------------------------------------------------------------------------
- GHC_OPTIONS="-Werror"
2018-05-27 16:59:14 +03:00
- CABAL_REINIT_CONFIG=y
- LC_ALL=C.UTF-8
2018-03-15 20:50:03 +03:00
2018-03-08 23:35:29 +03:00
# ------------------------------------------------------------------------
2018-05-27 16:59:14 +03:00
# What to build
# ------------------------------------------------------------------------
# - DISABLE_TEST=y
# - DISABLE_BENCH=y
# - DISABLE_DOCS=y
# - DISABLE_SDIST_BUILD=y
- ENABLE_INSTALL=y
# ------------------------------------------------------------------------
# stack options
2018-03-08 23:35:29 +03:00
# ------------------------------------------------------------------------
2018-03-15 20:50:03 +03:00
# Note requiring a specific version of stack using STACKVER may fail due to
# github API limit while checking and upgrading/downgrading to the specific
# version.
2018-03-08 23:35:29 +03:00
#- STACKVER="1.6.5"
- STACK_UPGRADE="y"
2018-03-15 20:50:03 +03:00
2018-03-08 23:35:29 +03:00
# ------------------------------------------------------------------------
2018-05-27 16:59:14 +03:00
# cabal options
2018-03-08 23:35:29 +03:00
# ------------------------------------------------------------------------
- CABAL_CHECK_RELAX=y
- CABAL_NO_SANDBOX=y
- CABAL_HACKAGE_MIRROR=hackage.haskell.org:http://hackage.fpcomplete.com
2018-05-27 16:59:14 +03:00
# ------------------------------------------------------------------------
# Where to find the required tools
# ------------------------------------------------------------------------
2018-03-08 23:35:29 +03:00
- PATH=/bin:/usr/bin
2018-05-27 16:59:14 +03:00
- TOOLS_DIR=/opt
2018-03-15 20:50:03 +03:00
2018-03-08 23:35:29 +03:00
# ------------------------------------------------------------------------
# Location of packcheck.sh (the shell script invoked to perform CI tests ).
# ------------------------------------------------------------------------
# You can either commit the packcheck.sh script at this path in your repo or
# you can use it by specifying the PACKCHECK_REPO_URL option below in which
# case it will be automatically copied from the packcheck repo to this path
# during CI tests. In any case it is finally invoked from this path.
- 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"
2018-06-23 19:25:59 +03:00
- PACKCHECK_GITHUB_COMMIT="f7fa0aaf4066e7862c9c1aca1e313b304253825c"
2018-03-08 23:35:29 +03:00
notifications:
2018-05-27 16:59:14 +03:00
email:
on_success: change
on_failure: always
2017-12-22 01:23:46 +03:00
2018-03-15 20:50:03 +03:00
# This matrix has total of 6 builds enabled, we try to cover last three major
# GHC versions, stack, cabal, Linux and OSX with minimum number of builds
# possible. You can uncomment other disabled builds or comment out existing
# ones to your taste.
2018-03-08 23:35:29 +03:00
#
# We pre-install the cabal-install package to not incur the penalty of building
# it the first time in cached builds or every time in uncached builds.
2017-08-30 12:46:14 +03:00
matrix:
include:
2017-09-05 12:48:49 +03:00
2017-12-19 20:42:25 +03:00
# --------------------------------------------------------------------------
2018-05-27 16:59:14 +03:00
# (Linux) stack builds (BUILD=stack). Some common envvars for stack builds
# are: STACK_YAML, STACK_OPTIONS, STACK_BUILD_OPTIONS
2017-12-19 20:42:25 +03:00
# --------------------------------------------------------------------------
# For 7.10.3 we disable -Werror because of some bogus SPECIALIZE pragma
# warnings.
2018-08-12 04:36:30 +03:00
- env: BUILD=stack RESOLVER=lts-6 GHCVER=7.10.3 GHC_OPTIONS="" STACK_YAML=stack-7.10.yaml DISABLE_SDIST_BUILD=y DISABLE_DIST_CHECKS=y STACK_BUILD_OPTIONS="--flag streamly:examples-sdl"
2018-12-30 22:17:49 +03:00
addons: {apt: {packages: [cabal-install-2.4,libsdl1.2-dev], sources: [hvr-ghc]}}
2017-08-30 12:46:14 +03:00
2018-12-30 22:17:49 +03:00
- env: BUILD=stack RESOLVER=lts-9 GHCVER=8.0.2 STACK_YAML=stack-8.0.yaml DISABLE_SDIST_BUILD=y DISABLE_DIST_CHECKS=y STACK_BUILD_OPTIONS="--flag streamly:examples-sdl"
addons: {apt: {packages: [cabal-install-2.4,libsdl1.2-dev], sources: [hvr-ghc]}}
2017-08-30 12:46:14 +03:00
2018-08-12 04:36:30 +03:00
# Use cabal-install-1.24 for stack solver to work
# GHC-8.2.2 hogs memory leading to out-of-memory when compiling benchmarks
# So disable the benchmarks for this build.
- env: BUILD=stack GHCVER=8.2.2 RESOLVER=lts-11 GHC_OPTIONS="" DISABLE_SDIST_BUILD=y DISABLE_DIST_CHECKS=y DISABLE_BENCH=y
2018-12-30 22:17:49 +03:00
addons: {apt: {packages: [cabal-install-2.4,libsdl1.2-dev], sources: [hvr-ghc]}}
2018-08-12 04:36:30 +03:00
# Use cabal-install-1.24 for stack solver to work
2018-12-30 22:17:49 +03:00
#- env: BUILD=stack RESOLVER=nightly DISABLE_SDIST_BUILD=y DISABLE_DIST_CHECKS=y
# addons: {apt: {packages: [cabal-install-1.24], sources: [hvr-ghc]}}
2018-05-27 16:59:14 +03:00
# You can keep a STACK_YAML file at any path location
2018-03-08 23:35:29 +03:00
#- env: BUILD=stack STACK_YAML=.ci/stack-8.0.yaml
2018-05-27 16:59:14 +03:00
# You can specify build flags like this:
2018-03-15 20:50:03 +03:00
#- env: BUILD=stack RESOLVER=lts-11 STACK_BUILD_OPTIONS="--flag packcheck:dev"
2018-03-08 23:35:29 +03:00
2017-12-22 01:23:46 +03:00
# --------------------------------------------------------------------------
2018-05-27 16:59:14 +03:00
# (Linux) cabal builds (BUILD=cabal, BUILD=cabal-new). Common envvars are:
# CABAL_CONFIGURE_OPTIONS (cabal), CABAL_NEWBUILD_OPTIONS (cabal-new)
2017-12-22 01:23:46 +03:00
# --------------------------------------------------------------------------
2018-05-27 16:59:14 +03:00
#- env: BUILD=cabal GHCVER=7.10.3
2018-03-08 23:35:29 +03:00
# addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.3], sources: [hvr-ghc]}}
2017-12-22 01:23:46 +03:00
2018-05-27 16:59:14 +03:00
#- env: BUILD=cabal-new GHCVER=8.0.2
2018-03-15 20:50:03 +03:00
# addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.2], sources: [hvr-ghc]}}
2017-12-22 01:23:46 +03:00
2018-05-27 16:59:14 +03:00
# Disabled by default as we have a cabal ghc-8.2.2 build for OSX
#- env: BUILD=cabal-new GHCVER=8.2.2
2018-03-08 23:35:29 +03:00
# addons: {apt: {packages: [cabal-install-2.0,ghc-8.2.2], sources: [hvr-ghc]}}
# Using stack builds, cabal builds get terminated because the tests
# take more than 10 minutes and it does not produce any output until the end.
- env: BUILD=stack RESOLVER=lts-12 GHCVER=8.4.4
2018-12-30 22:17:49 +03:00
addons: {apt: {packages: [cabal-install-2.4,ghc-8.4.4], sources: [hvr-ghc]}}
2018-03-15 20:50:03 +03:00
2018-12-30 22:17:49 +03:00
- env: BUILD=stack RESOLVER=lts-13 GHCVER=8.6.3 GHC_OPTIONS="" STACK_BUILD_OPTIONS="--flag streamly:streamk"
addons: {apt: {packages: [cabal-install-2.4,ghc-8.6.3], sources: [hvr-ghc]}}
2018-12-30 22:17:49 +03:00
- env: BUILD=stack RESOLVER=lts-13 GHCVER=8.6.3 STACK_BUILD_OPTIONS="--flag streamly:examples-sdl"
addons: {apt: {packages: [cabal-install-2.4,ghc-8.6.3], sources: [hvr-ghc]}}
#- env: BUILD=cabal-new GHCVER=head GHC_OPTIONS=""
# addons: {apt: {packages: [cabal-install-head,ghc-head], sources: [hvr-ghc]}}
2017-12-22 01:23:46 +03:00
2018-05-27 16:59:14 +03:00
# You can specify build flags like this:
#- env: BUILD=cabal-new CABAL_NEWBUILD_OPTIONS="--flags=dev"
# addons: {apt: {packages: [cabal-install-head,ghc-head], sources: [hvr-ghc]}}
2017-12-19 20:42:25 +03:00
# --------------------------------------------------------------------------
# OS X builds
# --------------------------------------------------------------------------
2018-12-30 22:17:49 +03:00
# GHC 8.6/cabal build using stack!
- env: BUILD=cabal-new RESOLVER=lts-13 GHCVER=8.6 GHC_OPTIONS=""
2018-08-12 04:36:30 +03:00
os: osx
2017-08-30 12:46:14 +03:00
2017-12-19 20:42:25 +03:00
# GHC 8.2.2/stack
2018-05-27 16:59:14 +03:00
#- env: BUILD=stack RESOLVER=lts-11 GHCVER=8.2.2
2018-03-15 20:50:03 +03:00
# os: osx
2017-08-30 12:46:14 +03:00
2017-12-19 20:42:25 +03:00
# --------------------------------------------------------------------------
2018-05-27 16:59:14 +03:00
# Lint e.g. HLINT_COMMANDS="hlint lint src; hlint lint test"
2017-12-19 20:42:25 +03:00
# --------------------------------------------------------------------------
2018-12-30 22:17:49 +03:00
- env: BUILD=stack RESOLVER=lts-13 HLINT_COMMANDS="hlint lint ."
2017-12-19 20:42:25 +03:00
2017-12-22 01:23:46 +03:00
# --------------------------------------------------------------------------
# Build and send coverage report to coveralls.io using hpc-coveralls
2018-05-27 16:59:14 +03:00
# Works only with BUILD=cabal; add your project to coveralls.io first
# For available options see hpc-coveralls docs.
2017-12-22 01:23:46 +03:00
# --------------------------------------------------------------------------
2018-12-30 22:17:49 +03:00
#- env: BUILD=cabal COVERALLS_OPTIONS="--coverage-mode=StrictlyFullLines --exclude-dir=test test properties loops nested-loops parallel-loops" DISABLE_SDIST_BUILD=y DISABLE_BENCH=y DISABLE_DOCS=y
2018-08-12 04:36:30 +03:00
# addons: {apt: {packages: [cabal-install-2.0,ghc-8.2.2], sources: [hvr-ghc]}}
2017-12-22 01:23:46 +03:00
2017-12-19 20:42:25 +03:00
# --------------------------------------------------------------------------
# Builds that are allowed to fail
# --------------------------------------------------------------------------
2017-08-30 12:46:14 +03:00
allow_failures:
2018-06-23 19:25:59 +03:00
- env: BUILD=stack RESOLVER=nightly DISABLE_SDIST_BUILD=y DISABLE_DIST_CHECKS=y
2018-05-27 16:59:14 +03:00
- env: BUILD=cabal-new GHCVER=head GHC_OPTIONS=""
2018-03-15 20:50:03 +03:00
- env: BUILD=stack RESOLVER=lts-11 HLINT_COMMANDS="hlint lint ."
2017-08-30 12:46:14 +03:00
2017-12-22 01:23:46 +03:00
# ------------------------------------------------------------------------
# Settings beyond this point are advanced and normally not tweaked
# ------------------------------------------------------------------------
2017-08-30 12:46:14 +03:00
2018-03-08 23:35:29 +03:00
language: generic
2017-12-22 01:23:46 +03:00
sudo: false
cache:
directories:
- $HOME/.cabal
- $HOME/.ghc
- $HOME/.local
- $HOME/.stack
2018-03-08 23:35:29 +03:00
install: true
2017-12-19 20:42:25 +03:00
2017-12-22 01:23:46 +03:00
script:
- |
2018-03-08 23:35:29 +03:00
# 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
2017-08-30 12:46:14 +03:00
CURL=$(which curl)
2018-03-08 23:35:29 +03:00
PACKCHECK_URL=${PACKCHECK_GITHUB_URL}/${PACKCHECK_GITHUB_COMMIT}/packcheck.sh
if test ! -e "$PACKCHECK_LOCAL_PATH"; then $CURL -sL -o "$PACKCHECK_LOCAL_PATH" $PACKCHECK_URL; fi;
chmod +x $PACKCHECK_LOCAL_PATH
2018-05-27 16:59:14 +03:00
# This script is governed by various PACKCHECK envvars that are set above.
# In addition, hpc-coveralls needs TRAVIS, TRAVIS_JOB_ID variables set by
# the travis CI environment.
- bash -c "$PACKCHECK_LOCAL_PATH $BUILD PATH=/bin:/usr/bin"