forked from sol/hpack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
79 lines (66 loc) · 2.14 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
sudo: false
language: generic
matrix:
include:
- env: BUILD=tinc CABALVER=2.0 GHCVER=8.2.2
compiler: ": #tinc 8.2.2"
addons: {apt: {packages: [cabal-install-2.0,ghc-8.2.2,happy-1.19.5], sources: [hvr-ghc]}}
- env: BUILD=tinc CABALVER=2.2 GHCVER=8.4.3
compiler: ": #tinc 8.4.4"
addons: {apt: {packages: [cabal-install-2.2,ghc-8.4.3,happy-1.19.5], sources: [hvr-ghc]}}
- env: BUILD=tinc CABALVER=2.4 GHCVER=8.6.5 RELEASE=true
compiler: ": #tinc 8.6.5"
addons: {apt: {packages: [cabal-install-2.4,ghc-8.6.5,happy-1.19.5], sources: [hvr-ghc]}}
- env: BUILD=stack GHCVER=8.8.1 STACK_YAML=stack.yaml
compiler: ": #stack 8.8.1"
addons: {apt: {packages: [ghc-8.8.1,happy-1.19.5], sources: [hvr-ghc]}}
- env: BUILD=stack STACK_YAML=stack.yaml RELEASE=true
compiler: ": #stack 8.8.1 osx"
os: osx
before_install:
- unset CC
- export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:/opt/happy/1.19.5/bin:$PATH
- ./.travis-setup.sh
- ghc --version || stack exec -- ghc --version
- happy --version || true
- cabal --version || true
- stack --version || true
- tinc --version || true
install:
- case "$BUILD" in
tinc)
tinc;;
stack)
stack --no-terminal test --only-dependencies;;
esac
script:
- case "$BUILD" in
tinc)
cabal configure --enable-tests --ghc-options=-Werror --disable-optimization && cabal build && cabal test;;
stack)
stack --no-terminal test --haddock --no-haddock-deps;;
esac
cache:
directories:
- $HOME/.tinc/cache
- $HOME/.stack
before_deploy:
- case "$BUILD" in
tinc)
cp dist/build/hpack/hpack .;;
stack)
stack install --local-bin-path .;;
esac
- gzip hpack
- mv hpack.gz hpack_${TRAVIS_OS_NAME}.gz
deploy:
provider: releases
api_key:
secure: AAn9f1+CNC7qMB/9R0eAMj4xoR4nVxHMnswJ/H9kJiCClkPiaODvs6DBWjhDeZ9Y8MyDmsVNgkCNgYTWa/3Ym1rJdf1fCC4XKPHASAbf6+BJ1kna3zrrm7GIi7Yb8hHTA7nBhiwNhAS4wT//CtoJo5hrcW6BecIb8rXOX+5baOw=
file_glob: true
file: hpack_*.gz
skip_cleanup: true
on:
repo: sol/hpack
tags: true
condition: $RELEASE = true