Skip to content

Commit

Permalink
use docker for the linux build (fixes #5 and #6)
Browse files Browse the repository at this point in the history
  • Loading branch information
chearon committed Apr 15, 2017
1 parent a78d2a0 commit d2a9723
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 13 deletions.
33 changes: 20 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
language: node_js
sudo: required
services:
- docker
os:
- linux
- osx
osx_image: xcode8 # has everything we need but cairo
install:
- export PREBUILD_SLUG=$TRAVIS_REPO_SLUG
- if [ $TRAVIS_OS_NAME = "linux" ]; then export CXX=g++-4.9; fi
- npm install -g node-gyp
- ci/install.sh $TRAVIS_OS_NAME $PREBUILD_VERSION $PREBUILD_CANVAS_VERSION
addons:
apt: # for linux only
sources:
- ubuntu-toolchain-r-test
packages:
- libcairo2-dev
- libjpeg8-dev
- libpango1.0-dev
- libgif-dev
- g++-4.9
- >- # this should only run on linux
if [ $TRAVIS_OS_NAME = "linux" ]; then
docker run
-e PREBUILD_VERSION="$PREBUILD_VERSION"
-e PREBUILD_AUTH="$PREBUILD_AUTH"
-e PREBUILD_SLUG="$TRAVIS_REPO_SLUG"
-v $(pwd):/build chearon/canvas-prebuilt:2
bash -c 'cd /build; export NVM_DIR=$HOME/.nvm; . $HOME/.nvm/nvm.sh; . ci/install.sh linux '"\"$PREBUILD_VERSION\" \"$PREBUILD_CANVAS_VERSION\"";
else
export PREBUILD_SLUG="$TRAVIS_REPO_SLUG";
bash ci/install.sh osx "$PREBUILD_VERSION" "$PREBUILD_CANVAS_VERSION";
fi
2 changes: 2 additions & 0 deletions ci/linux/bundle.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
lddtree.sh -l node_modules/canvas/build/Release/canvas.node

copies=$(lddtree.sh -l node_modules/canvas/build/Release/canvas.node | sed -r -e '/^\/lib/d' -e '/canvas.node$/d');

for so in $copies; do
Expand Down

0 comments on commit d2a9723

Please sign in to comment.