mirror of
https://github.com/wasp-lang/wasp.git
synced 2024-11-28 03:35:45 +03:00
65 lines
2.8 KiB
YAML
65 lines
2.8 KiB
YAML
# This ensures only commits on master, PRs towards master, and all tags are built.
|
|
# Otherwise, build does not start.
|
|
if: branch = master OR tag IS present
|
|
|
|
os:
|
|
- linux
|
|
- osx
|
|
|
|
# Do not choose a language; we provide our own build tools.
|
|
language: generic
|
|
|
|
# Caching so the next build will be fast too.
|
|
cache:
|
|
directories:
|
|
- $HOME/.ghc
|
|
- $HOME/.cabal
|
|
# Where GHC and Stackage packages (per specific resolver/snapshot) get installed.
|
|
# Caching this avoids stack downloading GHC and building all the packages each time.
|
|
- $HOME/.stack
|
|
|
|
# Ensure necessary system libraries are present.
|
|
addons:
|
|
apt:
|
|
packages:
|
|
- libgmp-dev
|
|
|
|
before_install:
|
|
- mkdir -p ~/.local/bin && export PATH=$HOME/.local/bin:$PATH
|
|
# Download and install stack executable.
|
|
- |
|
|
if [ "$TRAVIS_OS_NAME" = "osx" ]
|
|
then
|
|
travis_retry curl --insecure -L https://get.haskellstack.org/stable/osx-x86_64.tar.gz | tar xz --strip-components=1 --include '*/stack' -C ~/.local/bin
|
|
else
|
|
travis_retry curl -L https://get.haskellstack.org/stable/linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
|
|
fi
|
|
- stack --numeric-version
|
|
|
|
install:
|
|
- cd $TRAVIS_BUILD_DIR/waspc
|
|
# Build dependencies.
|
|
# --no-terminal because Stack does some fancy stuff with Terminal which Travis does not support (is this still true?).
|
|
# --install-ghc just tells stack to install ghc if it is missing (normally we would do it manually with stack setup).
|
|
# --only-dependencies means only wasp dependencies will be built, no wasp source code will be built at this moment.
|
|
- stack --no-terminal --install-ghc test --only-dependencies
|
|
|
|
script:
|
|
# Build the wasp source code and its tests. Dependencies were already built before.
|
|
- stack --no-terminal test
|
|
|
|
after_success:
|
|
- ./tools/make_binary_package.sh wasp-${TRAVIS_OS_NAME}-x86_64.tar.gz
|
|
|
|
deploy:
|
|
provider: releases
|
|
api_key:
|
|
# Encrypted github access key. Generated with `travis setup --pro releases`.
|
|
secure: IkYVwfhHNnNncrsDk+bjv80f4tRIDwjmyYSKd3Ssiuxzz/NDGIDuWDUfIApt9skI6URaZInQhF7BPZ0llHUOHOnCsfw2c8ve/XcX9BOqsczCGI1XFrnuFiwst9aogNTupkVL4sAPz45MysENfgWEbqDWXlMgj0DgYG2qk7mpCMcY0MUkw6ZNuozjs8uM6ilVYdTKPut8cMQsJkfX+kzA3x5BfnuRNSyfs8W5DjjwZ+vVAKzdw0zL49GWBjfFfh+QRiekWqziEfFO6EyaD75VSGQKa5VUQQvmmy2CDKPayj94STBTZdmnPGK2QXwiSdJxaDS/vw2TwHyiHRZkvkRQ20kr9+tMpZjuE5mN2xiRBUt8jDjGJWCxzfL1JbBPdtShcrCofDvTwAFOT6ykd9dbfzAhEubAO6L/S0JIs0sRj/M18bXKh5VeDCabBOLfh5wGtOWy44sQ1FMW+vismA4MLYYMm5bSxjL+HWE7ijSbHOF0ew72L/cbHKXhALv48VNGVYj7wy/6MC7HXkgHyxGPUn5tx2a0oUBWkK62Asmba42i2KDed6ylChlivIijyoeg3dpYpcZjr4HfuC1e1O+NHIF8uke9yc7sNp3vdriD8HxvdmJQrbbwy3EIMSW9v5soePDTJywNEAcIwUCl6USE2fVShRuYcvhbkLYGoQMzh8U=
|
|
file: "wasp-${TRAVIS_OS_NAME}-x86_64.tar.gz"
|
|
skip_cleanup: true
|
|
draft: true
|
|
on:
|
|
# Whenever we push a tagged commit, binary will be deployed to releases.
|
|
tags: true
|