-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
82 lines (72 loc) · 3.31 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
# This is the simple Travis configuration, which is intended for use
# on applications which do not require cross-platform and
# multiple-GHC-version support. For more information and other
# options, see:
#
# https://docs.haskellstack.org/en/stable/travis_ci/
#
# Copy these contents into the root directory of your Github project in a file
# named .travis.yml
#
# UPDATE(jez): I added support for building on macOS
# Do not choose a language; we provide our own build tools.
language: generic
# Caching so the next build will be fast too.
cache:
directories:
- $HOME/.ghc
- $HOME/.stack
- $TRAVIS_BUILD_DIR/.stack-work
# The different configurations we want to test. We have BUILD=cabal which uses
# cabal-install, and BUILD=stack which uses Stack. More documentation on each
# of those below.
#
# We set the compiler values here to tell Travis to use a different
# cache file per set of arguments.
#
# If you need to have different apt packages for each combination in the
# matrix, you can use a line such as:
# addons: {apt: {packages: [libfcgi-dev,libgmp-dev]}}
matrix:
include:
# The Stack builds. We can pass in arbitrary Stack arguments via the ARGS
# variable, such as using --stack-yaml to point to a different file.
- env: BUILD=stack ARGS=""
compiler: ": #stack default"
addons: {apt: {packages: [libgmp-dev]}}
# Build on macOS in addition to Linux
- env: BUILD=stack ARGS=""
compiler: ": #stack default osx"
os: osx
before_install:
# Using compiler above sets CC to an invalid value, so unset it
- unset CC
# Download and unpack the stack executable
- export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$HOME/.local/bin:/opt/alex/$ALEXVER/bin:/opt/happy/$HAPPYVER/bin:$HOME/.cabal/bin:$PATH
- mkdir -p ~/.local/bin
- |
if [ `uname` = "Darwin" ]
then
travis_retry curl --insecure -L https://www.stackage.org/stack/osx-x86_64 | tar xz --strip-components=1 --include '*/stack' -C ~/.local/bin
else
travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
fi
install:
# Build dependencies
- stack --no-terminal --install-ghc test --only-dependencies
script:
# Build the package, its tests, and its docs and run the tests
- stack --no-terminal test
before_deploy:
- stack --no-terminal install
- cp "$TRAVIS_BUILD_DIR/README.md" "$TRAVIS_BUILD_DIR/LICENSE" "$HOME/.local/bin"
- cd "$HOME/.local/bin"
- tar czf "calz-${TRAVIS_TAG}-${TRAVIS_OS_NAME}.tar.gz" calz README.md LICENSE
deploy:
provider: releases
api_key:
secure: 1hxoP674XYj8idP+Kmobh0i6AZw2YRcSAETWzwG4s0Ma4D6cAawlfwS0k3bEAmMx3Bh+aNlhQfuPdxxZTAud4zP/SdFFfd6XPmCY86KD5l+zIZ9qqFYYIqDBHVDE7Uop0bIgP4/OPixqNRhr2odRWO/EyzmPZOgREMorPd2jwucYLP6AMIVkuDN/JNAmQ0dcleY4ymIU6MXuhxagNFkF/XiQWV2F8QlnTcHZq9sJ8pqW7Mlmd07PlLjjGhbFYbcXjSCEANW7Hsa4TJOsD36JFmPyuIF1Kx3ZfNXo37hyt7eUA3/bWKzTZW8/o5kiKRfdi/XPGReb/aEEOKrXB/iLduyx4mYpHUgOJD4sxQ8CJDjtgooc9d9dA+2pa8AW1/0JmA6YAifKB9hD8O4q6RuZ4T+2sTz2DihHkHx4sSi0fI3hq2pS1mWn61Jz61mtnFqH2RPWRXGKKa7ylpjAQ9VYRNkBiAdJGb1bpcMn/LMDJXqrtupOTRUmAzG1PPqbCSqex2Icm+SJaYmcuMmp/ALJHkE8aPH+ilLNKsH2u2nzAi1gd9X+jvxGDVbno3L4EcGMXsHS3ighbYeT9fAMuL4xxl/1UJS257m5aXad2tRtpcKdLOnzuleMBwr/H0dLlA9iEWnVIFv6ofasOk2U0AIk+haSX3z5qTMJPmh2K+V2u+g=
file: "$HOME/.local/bin/calz-${TRAVIS_TAG}-${TRAVIS_OS_NAME}.tar.gz"
on:
tags: true
repo: jez/calz