-
Notifications
You must be signed in to change notification settings - Fork 6
/
.travis.yml
115 lines (114 loc) · 4.39 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
sudo: true
notifications:
email: false
language: generic
git:
depth: 5
cache:
directories:
- "$HOME/.ghc"
- "$HOME/.cabal"
- "$HOME/.stack"
- "$TRAVIS_BUILD_DIR/.stack-work"
matrix:
include:
- env: BUILD=stack ARGS="--resolver lts-16.31" OS=linux ARCH=x86_64
compiler: ": #stack 8.8.4"
addons:
apt:
packages:
- libgmp-dev
os: linux
- env: BUILD=stack ARGS="--resolver lts-16.31" OS=osx ARCH=x86_64
compiler: ": #stack 8.8.4 osx"
os: osx
before_install:
- unset CC
- export PATH=$HOME/.local/bin:$PATH
- mkdir -p ~/.local/bin
- |
if [ `uname` = "Darwin" ]
then
travis_retry curl --insecure -L https://get.haskellstack.org/stable/osx-x86_64.tar.gz | tar xz --strip-components=1 --include '*/stack' -C ~/.local/bin
else
travis_retry curl --insecure -L https://get.haskellstack.org/stable/linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
fi
# Use the more reliable S3 mirror of Hackage
# mkdir -p $HOME/.cabal
# echo 'remote-repo: hackage.haskell.org:http://hackage.fpcomplete.com/' > $HOME/.cabal/config
# echo 'remote-repo-cache: $HOME/.cabal/packages' >> $HOME/.cabal/config
install:
- echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo
'?')]"
- if [ -f configure.ac ]; then autoreconf -i; fi
- |
set -ex
stack --no-terminal --install-ghc $ARGS test --bench --only-dependencies
set +ex
script:
- |
set -ex
stack --no-terminal $ARGS test --bench --no-run-benchmarks --haddock --no-haddock-deps
set +ex
before_deploy:
- export BINDIR=$(stack path --local-install-root)/bin
- export PROG=fbpmn
- |
if [ $TRAVIS_BRANCH = "develop" ]
then
export VERSION=$(${BINDIR}/${PROG} version)-SNAPSHOT
else
export VERSION=$(${BINDIR}/${PROG} version)
fi
- export ARCHIVE="${BINDIR}/${PROG}-${VERSION}-${OS}.${ARCH}"
- tar czf "${ARCHIVE}.tar.gz" -C ${BINDIR} ${PROG}
- zip -j "${ARCHIVE}.zip" ${BINDIR}/${PROG}
- export TRAVIS_TAG=v${VERSION}
- |
if [ $TRAVIS_BRANCH = "develop" ]
then
git tag ${TRAVIS_TAG}
echo tag ${TRAVIS_TAG}
else
echo no tag
fi
deploy:
- provider: releases
api_key:
secure: aVme28spW6hNmDtHHQBuffcKNG7FRsN4Qa8GrRQzsIlTG9dIvnCMp64Wtz/PFr4Cm7NRgR3YshaL3GHQaxaGZLnJCmHRVrHQHa7oPd+mfo1/4Azzh73N91aIn6UqKr0Cd/nZtXa9+fDPD4UZARt8j3pkOf4e5ghwi3k6fQNAHdPIKlr+9o00BdursmlbU9E0Kwu7jNa1kPrxa/6XdFRLXRgsEqYARq2069OXXBU/tkfz6e4klAswR5ZxgoaqxhKjyZogDQOeffyGc1TR8TemmXDaOGknC0fc5+V7C7z4W7o/MWjARL3c8RTkkGFvQhTynJ55Txs88W3ueYa1AsN6UFJ5RYp6zD4KODYb0yU/g1RJ91On9YAcI+ObOpq6os7t5CAjgX2jw49/bfQwaPF/WTrY3sijjsG9VVBm86El8bTHO/qEu9rypgA2DHLFAl7Kzd/we2TBTjYSs9Dj6Zi0pSzyVmAJ8VaemmkAZEW8dDJBfnvoLvRsI+V5Rpk626qa/fF7gIJPpgMAYn32k07wVRgUK/ajoYqKQElTphoNpmq2tl9TctaRi8mj32UOf8P71ehQ2ZCSeagYXWjhhMxgVl8/j8TGxVu6SQNi8nzOM/wxtZQNS3jTtMiRz/ONF+3RS2nVi5EuX7pOGlEnXMvhNWQbd7xMZdWiTdes7a1lW9c=
file:
- ${ARCHIVE}.tar.gz
- ${ARCHIVE}.zip
skip_cleanup: true
overwrite: true
draft: false
on:
# branch: master
tags: true
all_branches: true
name: $TRAVIS_TAG
- provider: releases
api_key:
secure: aVme28spW6hNmDtHHQBuffcKNG7FRsN4Qa8GrRQzsIlTG9dIvnCMp64Wtz/PFr4Cm7NRgR3YshaL3GHQaxaGZLnJCmHRVrHQHa7oPd+mfo1/4Azzh73N91aIn6UqKr0Cd/nZtXa9+fDPD4UZARt8j3pkOf4e5ghwi3k6fQNAHdPIKlr+9o00BdursmlbU9E0Kwu7jNa1kPrxa/6XdFRLXRgsEqYARq2069OXXBU/tkfz6e4klAswR5ZxgoaqxhKjyZogDQOeffyGc1TR8TemmXDaOGknC0fc5+V7C7z4W7o/MWjARL3c8RTkkGFvQhTynJ55Txs88W3ueYa1AsN6UFJ5RYp6zD4KODYb0yU/g1RJ91On9YAcI+ObOpq6os7t5CAjgX2jw49/bfQwaPF/WTrY3sijjsG9VVBm86El8bTHO/qEu9rypgA2DHLFAl7Kzd/we2TBTjYSs9Dj6Zi0pSzyVmAJ8VaemmkAZEW8dDJBfnvoLvRsI+V5Rpk626qa/fF7gIJPpgMAYn32k07wVRgUK/ajoYqKQElTphoNpmq2tl9TctaRi8mj32UOf8P71ehQ2ZCSeagYXWjhhMxgVl8/j8TGxVu6SQNi8nzOM/wxtZQNS3jTtMiRz/ONF+3RS2nVi5EuX7pOGlEnXMvhNWQbd7xMZdWiTdes7a1lW9c=
file:
- ${ARCHIVE}.tar.gz
- ${ARCHIVE}.zip
skip_cleanup: true
overwrite: true
draft: true
on:
branch: develop
tags: false
name: $TRAVIS_TAG
# - stack --version
# - stack setup --no-terminal --install-cabal 2.2.0.1
# - stack ghc -- --version
# - stack build --only-dependencies --no-terminal
# - stack clean
# script:
# - stack build --test :fbpmn-test --coverage --bench --no-run-benchmarks --no-terminal
# --ghc-options=-Werror
# after_script:
# - travis_retry curl -L https://github.com/rubik/stack-hpc-coveralls/releases/download/v0.0.4.0/shc-linux-x64-8.0.1.tar.bz2
# | tar -xj
# - "./shc fbpmn fbpmn-test"