Add travis integration files (#6)

This commit is contained in:
Adam Babik 2017-11-30 13:54:14 +01:00 committed by GitHub
parent 75652eadf8
commit 0b8d3dcacf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 57 additions and 1 deletions

3
.gitignore vendored
View File

@ -1,4 +1,5 @@
node_modules/
bin/
bin/*
!bin/.gitkeep
build/
go2nodebinding

18
.travis.yml Normal file
View File

@ -0,0 +1,18 @@
notifications:
email: false
matrix:
include:
- os: linux
sudo: required
- os: osx
language: node_js
node_js:
- "7.9.0" # Current stable Electron version
install:
- ./.travis/install.sh
- npm install
- npm run rebuild

37
.travis/install.sh Executable file
View File

@ -0,0 +1,37 @@
#!/bin/bash
if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
wget https://redirector.gvt1.com/edgedl/go/go1.9.2.darwin-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.9.2.darwin-amd64.tar.gz
elif [[ $TRAVIS_OS_NAME == 'linux' ]]; then
wget https://redirector.gvt1.com/edgedl/go/go1.9.2.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.9.2.linux-amd64.tar.gz
fi
export GOROOT=/usr/local/go
export PATH=$GOROOT/bin:$PATH
export GOPATH=$HOME/go
mkdir -p $GOPATH/src/github.com/status-im
pushd $GOPATH/src/github.com/status-im
git clone --depth=1 https://github.com/status-im/status-go.git -b develop
pushd status-go
mkdir -p ./build/bin
# disable make until warnings will be resolved when rebuilding with npm
# make statusgo-library
if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
CGO_FLAGS=-mmacosx-version-min=10.7 CGO_LDFLAGS=-mmacosx-version-min=10.7 \
go build -ldflags -v -buildmode=c-archive -o build/bin/libstatus.a ./lib
elif [[ $TRAVIS_OS_NAME == 'linux' ]]; then
go build -ldflags -v -buildmode=c-archive -o build/bin/libstatus.a ./lib
fi
popd
popd
cp $GOPATH/src/github.com/status-im/status-go/build/bin/libstatus.* ./bin

0
bin/.gitkeep Normal file
View File