Skip to content

Commit

Permalink
Clean up Travis CI config
Browse files Browse the repository at this point in the history
  • Loading branch information
tfausak committed Apr 5, 2020
1 parent ff348eb commit f97b3c5
Showing 1 changed file with 24 additions and 30 deletions.
54 changes: 24 additions & 30 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,54 +1,48 @@
sudo: false
os: linux
dist: bionic
language: generic
addons:
apt:
packages:
- libgmp-dev
cache:
directories:
- $HOME/.local/bin
- $HOME/.stack
env:
global:
- HACKAGE_USERNAME=fozworth
# HACKAGE_PASSWORD
- secure: FnzQg9ET4TpOt74XKO0Ago9cdFR4ks8DDaavwpKJlDPSD/bJl1zeBWqnRs2qx55jVRzBR7fNdTDWJEOfFu/WZCOM4HjoNrjqHEBjHYrfpF+1TvoR4pz7kysK50pu8kUr86hxB6YCgjh8d3xPnh1gM/e5vhnMbbJa8Bm0iOm48DE=

cache:
directories:
- $HOME/.local/bin
- $HOME/.stack

before_install:
- |
if test ! -f "$HOME/.local/bin/stack"
if ! test -f "$HOME/.local/bin/stack"
then
VERSION=1.9.1
URL="https://github.com/commercialhaskell/stack/releases/download/v$VERSION/stack-$VERSION-$TRAVIS_OS_NAME-x86_64.tar.gz"
cd /tmp
curl --location "$URL" > stack.tar.gz
VERSION=2.3.0.1
URL="https://github.com/commercialhaskell/stack/releases/download/v$VERSION/stack-$VERSION-linux-x86_64-static.tar.gz"
curl --location --output stack.tar.gz "$URL"
gunzip stack.tar.gz
tar --extract --file stack.tar --strip-components 1
mkdir --parents "$HOME/.local/bin"
mv stack "$HOME/.local/bin"
cd -
rm stack.tar
fi
- stack --version

install:
- stack setup
- stack build --only-dependencies --test

script:
- stack build --pedantic --test
- stack build --no-run-tests --pedantic --test
- stack build --test
- stack sdist
after_success:
- mkdir -p deploy
- cp -v "$(stack path --dist-dir)/flow-$TRAVIS_TAG.tar.gz" deploy/flow.tgz
- mkdir -p "$HOME/.stack/upload"
- >-
echo "{
\"username\": \"$HACKAGE_USERNAME\",
\"password\": \"$HACKAGE_PASSWORD\"
}" > "$HOME/.stack/upload/credentials.json"

deploy:
- skip_cleanup: true
on: { tags: true }
provider: releases
api_key: { secure: OiJZZljO8LI0D1UHeoybjc4aOmyo+aNzta/hVyKEzlyXSCYIH4ucqpfDXmu+9UPce4FsfBu5I8PwMRfre0VcBQnGK8igmfVYTDP/TKqhqVnH54/SSOfcrn/glyl94btctudxn6RJu9SP5L6lwvOO+gJVgLWPGT3Ai+22uUK8DDQ= }
file: deploy/flow.tgz
- skip_cleanup: true
on: { tags: true }
provider: script
script: stack upload --no-signature .
provider: script
on:
tags: true
skip_cleanup: true
script: yes | stack upload .

0 comments on commit f97b3c5

Please sign in to comment.