forked from killy971/codecov-haskell
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for GHC 8.6 (killy971#1)
* remove support for GHC 7.x * build project with Stack and Nix * fix some Cabal warnings * robust path to mix/tix files generation * use Stack coverage reports
- Loading branch information
1 parent
36686ce
commit 4cf7cc8
Showing
8 changed files
with
68 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ dist/ | |
*.json | ||
.cabal-sandbox/ | ||
cabal.sandbox.config | ||
.stack-work/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,42 @@ | ||
language: nix | ||
env: | ||
- GHCVER=7.6.3 | ||
- GHCVER=7.8.3 | ||
- GHCVER=8.2.2 | ||
# GHC 7.10.3 | ||
# - STACK_RESOLVER=lts-6.35 | ||
# GHC 8.0.2 | ||
# - STACK_RESOLVER=9.21 | ||
# GHC 8.2.2 | ||
- STACK_RESOLVER=lts-11.22 | ||
# GHC 8.4.4 | ||
- STACK_RESOLVER=lts-12.26 | ||
# GHC 8.6.4 | ||
- STACK_RESOLVER=lts-13.18 | ||
|
||
before_install: | ||
- travis_retry sudo add-apt-repository -y ppa:hvr/ghc | ||
- travis_retry sudo apt-get update | ||
- travis_retry sudo apt-get install cabal-install-1.20 ghc-$GHCVER happy | ||
- export PATH=/opt/ghc/$GHCVER/bin:$PATH | ||
|
||
install: | ||
- cabal-1.20 update | ||
- travis_retry sudo apt-get -q -y install hlint || cabal-1.20 install hlint | ||
- cabal-1.20 install --only-dependencies --enable-tests --enable-benchmarks | ||
# configure Nix https://nixos.wiki/wiki/Nix_on_Travis | ||
- sudo mkdir -p /etc/nix | ||
- echo "substituters = https://cache.nixos.org/ file://$HOME/nix.store" | sudo tee -a /etc/nix/nix.conf > /dev/null | ||
- echo 'require-sigs = false' | sudo tee -a /etc/nix/nix.conf > /dev/null | ||
- echo 'sandbox = true' | sudo tee -a /etc/nix/nix.conf > /dev/null | ||
# Download and unpack the stack executable https://docs.haskellstack.org/en/stable/travis_ci/#installing-stack | ||
- mkdir -p ~/.local/bin | ||
- export PATH=$HOME/.local/bin:$PATH | ||
- travis_retry curl -L https://get.haskellstack.org/stable/linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack' | ||
|
||
script: | ||
- hlint . --ignore="Parse error" | ||
- cabal-1.20 configure --enable-tests --enable-benchmarks --enable-library-coverage -v2 | ||
- cabal-1.20 build | ||
- | | ||
if [ $GHCVER = "7.8.3" ]; then | ||
cabal-1.20 test --show-details=always | ||
else | ||
dist/build/run-cabal-test/run-cabal-test --cabal-name=cabal-1.20 --show-details=always | ||
fi | ||
- cabal-1.20 check | ||
- cabal-1.20 sdist | ||
- export SRC_TGZ=$(cabal-1.20 info . | awk '{print $2 ".tar.gz";exit}') ; | ||
(cd dist/; | ||
if [ -f "$SRC_TGZ" ]; then | ||
cabal-1.20 install "$SRC_TGZ"; | ||
else | ||
echo "expected '$SRC_TGZ' not found"; | ||
exit 1; | ||
fi) | ||
- stack build --test --copy-bins --prefetch --coverage --resolver $STACK_RESOLVER | ||
|
||
after_script: | ||
- dist/build/codecov-haskell/codecov-haskell test-all --exclude-dir=test --display-report --print-response | ||
- export PACKAGE_NAME=codecov-haskell | ||
- export MIX_DIR="$(stack path --dist-dir)/hpc/" | ||
- export TIX_DIR="$(stack path --local-hpc-root)/$PACKAGE_NAME/" | ||
- codecov-haskell test-all --exclude-dir=test --display-report --print-response --combined=false --exclude-dir test --mix-dir $MIX_DIR --tix-dir $TIX_DIR --token=$CODECOV_TOKEN | ||
|
||
cache: | ||
directories: | ||
- $HOME/nix.store | ||
- $HOME/.stack | ||
|
||
notifications: | ||
webhooks: | ||
urls: | ||
- https://webhooks.gitter.im/e/3ff64a7879ffa1a444b6 | ||
on_success: change | ||
on_failure: always | ||
on_start: false | ||
before_cache: | ||
# cache Nix store https://nixos.wiki/wiki/Nix_on_Travis | ||
- mkdir -p $HOME/nix.store | ||
- nix copy --to file://$HOME/nix.store -f default.nix buildInputs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ ghc }: | ||
let pkgs = (import (fetchTarball { | ||
url = https://github.com/NixOS/nixpkgs-channels/archive/a7e559a5504572008567383c3dc8e142fa7a8633.tar.gz; | ||
sha256 = "16j95q58kkc69lfgpjkj76gw5sx8rcxwi3civm0mlfaxxyw9gzp6"; | ||
}) {}); | ||
|
||
in pkgs.haskell.lib.buildStackProject { | ||
inherit ghc; | ||
name = "myEnv"; | ||
buildInputs = [ | ||
pkgs.curl | ||
pkgs.zlib | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters