etcher/.travis.yml
Juan Cruz Viotti 5ec460ae1e chore: run Travis CI GNU/Linux tests in Docker containers (#1018)
This commit makes Travis CI run GNU/Linux tests inside Ubuntu 14.04
i386/x86_64 docker containers.

It includes a set of Dockerfiles with everything needed to
run/build/package Etcher while a nice `run-command.sh` script that can
be used to easily run a command on such Dockerfiles with access to the
Etcher source code.

The main motivation behind change is that generating cross-architecture
AppImages is not possible at the moment (although there are PRs on the
way), so this permits us to configure Travis CI to build and publish
AppImages for all architectures.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-01-13 17:37:49 -04:00

70 lines
1.5 KiB
YAML

language: cpp
sudo: false
services:
- docker
env:
global:
- NODE_VERSION="6.1.0"
- RUBY_VERSION="2.3.1"
matrix:
- TARGET_ARCH=x64
- TARGET_ARCH=x86
matrix:
exclude:
- os: osx
env: TARGET_ARCH=x86
os:
- linux
- osx
before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
rm -rf ~/.nvm;
git clone https://github.com/creationix/nvm.git ~/.nvm;
source ~/.nvm/nvm.sh;
nvm --version;
nvm install $NODE_VERSION;
node --version;
npm --version;
npm config set spin=false;
rvm install $RUBY_VERSION;
rvm use $RUBY_VERSION;
fi
install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
gem install scss_lint;
npm install -g bower electron-installer-debian;
npm install -g electron-installer-debian;
brew install afsctool;
brew install jq;
fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
make info;
make electron-develop;
fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
./scripts/build/docker/run-command.sh -r ${TARGET_ARCH} -s ${PWD} -c "make info && make electron-develop";
fi
script:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
npm test;
fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
./scripts/build/docker/run-command.sh -r ${TARGET_ARCH} -s ${PWD} -c "xvfb-run --server-args=$XVFB_ARGS npm test";
fi
notifications:
email: false
webhooks:
urls:
- https://webhooks.gitter.im/e/0a019c8b9828eb9f6a72
on_success: change
on_failure: always
on_start: never