-
-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy path.travis.yml
87 lines (73 loc) · 3.58 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
sudo: true
language: generic
dist: focal
git:
depth: 5
cache:
timeout: 600
directories:
- "$HOME/.stack"
- "$TRAVIS_BUILD_DIR/.stack-work"
- "$HOME/.local/bin/"
os:
- linux
- osx
env:
- STACK_YAML="$TRAVIS_BUILD_DIR/stack.yaml"
before_install:
- mkdir -p ~/.local/bin
- ls -l ~/.local/bin
- export PATH=$HOME/.local/bin:$PATH
- export STACK_URL="https://www.stackage.org/stack/${TRAVIS_OS_NAME}-x86_64"
- if [[ ! -x ~/.local/bin/stack ]]; then travis_retry curl -L ${STACK_URL} | tar -xz; mv stack-*-x86_64/stack ~/.local/bin/; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sed -i 's/- -dynamic /- -static /g' $TRAVIS_BUILD_DIR/package.yaml; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install cabal-install; fi
- travis_retry ./bin/fetch-latest-hledger ${TRAVIS_OS_NAME} ~/.local/bin/
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cp ~/.local/bin/hledger-static-linux-x64 ~/.local/bin/hledger; fi
install:
# if any command fails, end the travis script
- set -e
- which stack
- type -a stack
- stack --version
# GHC
- stack setup --interleaved-output
- stack exec -- ghc --version
- ./bin/build-and-test
- which hledger-flow
- hledger-flow --help
- hledger-flow --version
- ldd $(which hledger-flow) || true
- ./bin/release-tarball ~/.local/bin/hledger-flow
- if [[ ! -x ~/.local/bin/hledger ]]; then stack install --interleaved-output hledger; fi
- which hledger
- hledger --version
- git clone --recurse-submodules https://github.com/apauley/hledger-flow-example.git $HOME/hledger-flow-example
script:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then git checkout HEAD package.yaml; fi
- hledger-flow --verbose --show-options import $HOME/hledger-flow-example
- hledger-flow --verbose --show-options report $HOME/hledger-flow-example
deploy:
- provider: releases
api_key:
secure: uxpsTBdBiYQXbl+fzTnjO90oj3WINPxu929MCZfQrVTWdvaIUdnrTNItonTTwSAwTzwMKXhVLkWSQ9AJFkPwHNxbA/h7XPtcEBTm3Hr56h9IoGPqQjG8N7Ws0JpqfnqLr36cr4Fl+Z8ZyfuwN+ODq+T56CBn/bi4OSi0+xFF+xi1C5YwUkcev1zd5ClNQl3x35W/zQLkWHm/dnUmmP2AP56aqzDTuqzgwiaTtLyxb/9AyFahIn+QHp1JqOiN+CIM96+f+zEHBWjkIyWLbQp3iM8+Cy0VHJMjoqq2CUKGRYRS/l02i7QwuHiMxCMlray2lcPLBGtaQIw1USXyIw4m6MUR8m0CeT6tWIWBYCQJoZrOe4D/cv7VkRii/w8kvWemmqEC2Fcyk+5H8L18TP2x8vj1P93oIWtTpi5iYTwc0KH1T+CAhno4mWX/73KX0FwA9/0tcYmVFyAOnXiqoufG3ca41hje+VhMq+3AVLO5p7yWDUrBtN76QFQdJX8zXK8TgrhLtAzqaERnuNxqawOjyHUoUbERYQow//Y+1jjJX7nHLV6rNQWMEPcTNTbWPeJfJy/rPUadiQWo8QShSYVy9iWhoQxMJn5VqXk1URTYrQ/UBAcYK7Zrw1GVLJhZeWrKEAiywtrwdgT6YgO4UsU/9jM+8oHWP6N06OUD1qoC37k=
file_glob: true
file:
- releases/*.tar.gz
skip_cleanup: true
on:
repo: apauley/hledger-flow
tags: true
- provider: hackage
username: apauley
password:
secure: iV3CJbLMjMCVZ9gksr23Vvlj26f6XfEIgY1BjYfIjKqEsACr62B0LgprB44ov/v98tU9QM+g9qRc2g8Q3kahSbCA7TRXo9cVO3j+lGBoA6LCJwkOG8eXyVenAg1WbTbX0sC5YRBdqRFDzFQTr8ZeNW+1Hr5Vy+Hk6CiBTaZz9kz2C5YHVKaQWiuPZcHkbGe6/EdnvT07EBIJmVxnAn9rdbgGY7utU4kFjL30DxjD03MvVSWR5M/tflt78iH4FPr5zG1KeQLdAfrlwGC2kH8Lpa3MI4YCjMjNXUoX+tNhf0TDWLxeelUv+pAZJRdsITge/zg/eeCWJqVL/uuTXNYDc39qEDUFReMtJbgtrlrFAm/NWtTTm1t6S0lNFzPjteO+0s2b3f1e8slRmR3OrvySITFnQHqgLA0zoccr7UhG0p2UH8nOOfa0D96BVnzX34jAFQSezm3lQ9LTldBZpI5XleqI/4vTTecaaHQXKGvg0+4wseVkrsYeNO23nRRT5r9Mb1Wlf88JWxI/n+Q2602z34w4qqVY9kU92P8Lphsw7HmlHmKYxa1cqrV9UGmJpKsY3yDTdv9pCkXG3X+n+GJHEYiGgrifmwtNo8PI+lDQ8GY389ReV7766TrAs9W3w76SEpHTwMRc9dJIsA4hbQk+VNri5GgYNzRvjJ3bvQbdjEk=
skip_cleanup: true
on:
repo: apauley/hledger-flow
branch: master
tags: true
condition:
- $TRAVIS_OS_NAME = linux
notifications:
email: false