Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,17 @@ addons:
packages:
- libgmp-dev

env:
- COMPONENT=client
- COMPONENT=server

before_install:
- mkdir -p ~/.local/bin
- export PATH=$HOME/.local/bin:$PATH
- curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'

script:
# Set a timeout of 35 minutes. We could use travis_wait here, but travis_wait
# doesn't produce any output until the command finishes, and also doesn't
# always show all of the command's output.
- timeout 35m stack --no-terminal -j1 --install-ghc build
./ci/build.sh

notifications:
email: true
Expand Down
22 changes: 22 additions & 0 deletions ci/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#! /usr/bin/env bash

set -ex

case $COMPONENT in
server)
# Set a timeout of 35 minutes. We could use travis_wait here, but travis_wait
# doesn't produce any output until the command finishes, and also doesn't
# always show all of the command's output.
timeout 35m stack --no-terminal -j1 --install-ghc build
;;
client)
cd client
npm install
npm run build
npm run bundle
;;
*)
echo >&2 "Unrecognised component: $COMPONENT"
exit 1
;;
esac