pulumi/.travis.yml
Matt Ellis 9660da4d14 Run Travis on both macOS and Linux
Unlike go binaries (where we can cross compile) the node module that
we publish needs to be built on the platform we publish for. Update
our `.travis.yml` file to also build on macOS and fix the publishing
script so we don't don't cross publish Darwin from Linux. Once we have
CI working for Windows, we'll remove the loop over PUBLISH_GOOS and
each build will publish just the artifacts for the host OS.
2017-10-11 11:40:35 -07:00

42 lines
2.1 KiB
YAML

jobs:
include:
-
os: linux
-
if: type IN (push, api, cron)
os: osx
language: go
go: 1.9
sudo: true # give us 7.5GB and >2 bursted cores.
before_install:
# Dep for Go dependency management.
- go get -v github.com/golang/dep/cmd/dep
# Gometalinter for good Go linting/hygiene.
- go get -v github.com/alecthomas/gometalinter
- gometalinter --install
# gocovmerge for Go code coverage.
- go get -v github.com/wadey/gocovmerge
# Node.js 6.10.2 for all JavaScript code (to match AWS Lambda).
- nvm install v6.10.2
# Install Yarn as per https://yarnpkg.com/lang/en/docs/install-ci/#travis-tab.
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 0.24.6
- export PATH=$HOME/.yarn/bin:$PATH
# Install the AWS CLI so that we can publish the resulting release (if applicable) at the end.
- pip install --upgrade --user awscli
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export PATH=$PATH:$HOME/Library/Python/2.7/bin; fi
cache:
yarn: true
install:
# Clone the Pulumi-wide repo so we can use its scripts.
- git clone git@github.com:pulumi/home ${GOPATH}/src/github.com/pulumi/home
# Now restore dependencies, build prerequisites, and generally make this thing ready to go.
- make configure
before_script:
- export PATH=$TRAVIS_BUILD_DIR/sdk/nodejs/bin:$PATH
script:
- make travis_${TRAVIS_EVENT_TYPE}
notifications:
slack:
secure: tPhYdqclnOhFTiKhLn0EqY4/UhJ30c3SFRKHTMPYFfYflCQOyrIARYrzlm+oEOBISw/oNP0wR1LxawhLC2KfDb0ST9Zph8wKyQ8dujk9jXGACuuRic1n/IU9yiu2grZQqcwlieLN6IvGvK+736D2ZxhcjUF5ZwORkpe9jl+nr65NzWH5H+pr4jVWXvYddB2gJ/49i+COydfbaRJ+6O3JORqmSP2VA4CtrArl0L/uDT0osvBwJkeoTSzKjkPWZUwI3ZlGOCSGe+6i5hto6WOzUnU74UgNVZ6dCUOKJrmu146DDzTYB7g4xTkiBi8W5jEo7E6PRqAA6/zGGzUp0J8AMmKcrYnmBf3ALaAIzwiQAFwn9m4V3cKEnnfwzN+SrrmrA3KpwWuj2PNS0UEaxFr35Lb7NNORibmBJi5gj9q138C+b9uD5MQ3poq0PpXG+ZPYTQU1QZODsxcHpR3OyyI89OXBugrP9CTcYpknUgPmiAJgOQn+7H+Xcmme3CB9G5292hC5McZZtyxUAoNwAtg316bXSWWH9MkFRmjTWt7lRGZZ99T1TO/iG0DntyCWxy8lHIbYvCdbY5oTN3WMN93NFrmFMiZJcmmV79meMe/6LNLWVIWVaTXZSpS8IflRmVFp1twveSh4i1+mogh8CsMs2Lqp2Ca7HdakLtRBxHzcH/4=