-
Notifications
You must be signed in to change notification settings - Fork 5
/
.travis.yml
48 lines (39 loc) · 1.68 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
language: nix
# Do not build other branches than these, pull requests get built anyway, and in
# the end it is only the result of the testing branch that matters. In theory
# the commits that get pushed to master should have been built in testing
# already, but sometimes I still push manually, and of course the evergreen
# build status badge needs to come from somewhere.
branches:
only:
- master
- testing
# Do not spam me with build status emails.
notifications:
email: false
cache:
directories:
- $HOME/.stack
- $TRAVIS_BUILD_DIR/.stack-work
before_install:
# Bring all the tools from the pinned build environment into the PATH.
- export PATH=$(nix-build --no-out-link default.nix)/bin:$PATH
# Binaries in the profile built above may need locales, that they can't find
# unless we point LOCALE_ARCHIVE at the archive that contains them.
- export LOCALE_ARCHIVE=$(nix-build --no-out-link locale.nix)/lib/locale/locale-archive
install:
# Set up the Haskell toolchain.
- stack setup
script:
- stack --no-terminal build --split-objs
- stack --no-terminal test --split-objs
# Match the licenses of dependencies agains a whitelist,
# and fail if anything is not whitelisted. Grep -v returns
# 1 if nothing matches, so we invert it with a ! prefix.
# The "unexceptionalio" library is tagged as "license other"
# on Hackage, but the license appears to be ISC, so whitelist
# it too. See also [1].
# [1]: https://hackage.haskell.org/package/unexceptionalio-0.3.0/src/COPYING.
- "! stack ls dependencies --license | egrep -v 'Apache-2|BSD2|BSD3|MIT|PublicDomain|MPL-2.0|unexceptionalio'"
# Check shell scripts for issues.
- shellcheck package/*.sh package/deb-postinst