Travis CI is used to build resembleio & there might be occasion when, due to a failing build, the developer needs to exactly replicate the Travis build environment. Travis uses Ubuntu Precise at time of writing, which might be different from your own OS. The most convenient way to do this is probably to use a Vagrant VM. A high level outline of the setup steps is as below.
- download vagrant
- download virtualbox
- In your user home dir:
vagrant init hashicorp/precise32 # This creates a 'Vagrantfile' in your home directory
vagrant up
# this starts the VMvagrant list
# this should show you have a single VM named 'default' in the running statevagrant ssh default
sudo apt-get install git
git config --global user.name "YourName"
git config --global user.email "YourEmail"
sudo apt-get install curl
- Download go from https://golang.org/doc/install?download=go1.4.3.linux-386.tar.gz. Stuck on 1.4 until the make.bash fix gets put live and a new binary release is made
- On your desktop:
vagrant scp go1.4.3.linux-386.tar.gz default:/home/vagrant/go1.4.3.linux-386.tar.gz
- On the vagrant VM:
sudo tar -C /usr/local -xzvf go1.5.1.linux-386.tar.gz
- bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)
- source $HOME/.gvm/scripts/gvm
- Add to ~/.profile:
export GOPATH=$HOME/gopath
source ~/.profile
command curl -sSL https://rvm.io/mpapis.asc | gpg --import -
\curl -L https://get.rvm.io | bash -s stable --ruby --autolibs=enable --auto-dotfiles
rvm install 2.1.7 # should install ruby v2.1.7
rvm list # should show ruby2.1.7 under the list of installed ruby versions
gem install bundler
cd
mkdir gopath
go get github.com/dhrapson/resembleio/resemble
cd gopath/src/github.com/dhrapson/resembleio
go get -t -v ./...
go test -v ./...
chmod +x run_specs.sh
./run_specs.sh
Check the travis yaml file for cross-platform build instructions
- vagrant suspend default