Added build test and more archs/os to travis build
This commit is contained in:
21
.travis.yml
21
.travis.yml
@@ -2,20 +2,37 @@ language: go
|
|||||||
|
|
||||||
go:
|
go:
|
||||||
- 1.4
|
- 1.4
|
||||||
- tip
|
|
||||||
|
env:
|
||||||
|
- TEST_OS=linux TEST_ARCH=386
|
||||||
|
- TEST_OS=linux TEST_ARCH=amd64
|
||||||
|
- TEST_OS=linux TEST_ARCH=arm
|
||||||
|
- TEST_OS=windows TEST_ARCH=386
|
||||||
|
- TEST_OS=windows TEST_ARCH=amd64
|
||||||
|
- TEST_OS=darwin TEST_ARCH=386
|
||||||
|
- TEST_OS=darwin TEST_ARCH=amd64
|
||||||
|
- TEST_OS=freebsd TEST_ARCH=amd64
|
||||||
|
- TEST_OS=dragonfly TEST_ARCH=amd64
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
allow_failures:
|
allow_failures:
|
||||||
- go: tip
|
- env: TEST_OS=freebsd TEST_ARCH=amd64
|
||||||
|
- env: TEST_OS=dragonfly TEST_ARCH=amd64
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
|
- cd $GOROOT/src
|
||||||
|
- GOOS=$TEST_OS GOARCH=$TEST_ARCH ./make.bash
|
||||||
- mkdir -p $HOME/gopath/src/go.bug.st
|
- mkdir -p $HOME/gopath/src/go.bug.st
|
||||||
- mv $TRAVIS_BUILD_DIR $HOME/gopath/src/go.bug.st/serial
|
- mv $TRAVIS_BUILD_DIR $HOME/gopath/src/go.bug.st/serial
|
||||||
- export TRAVIS_BUILD_DIR=$HOME/gopath/src/go.bug.st/serial
|
- export TRAVIS_BUILD_DIR=$HOME/gopath/src/go.bug.st/serial
|
||||||
|
- cd $TRAVIS_BUILD_DIR
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- export PATH="$HOME/gopath/bin:$PATH"
|
- export PATH="$HOME/gopath/bin:$PATH"
|
||||||
|
|
||||||
|
script:
|
||||||
|
- GOARM=5 GO386=387 GOOS=$TEST_OS GOARCH=$TEST_ARCH go build travis/build_check.go
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
email:
|
email:
|
||||||
recipients:
|
recipients:
|
||||||
|
|||||||
27
travis/build_check.go
Normal file
27
travis/build_check.go
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
//
|
||||||
|
// Copyright 2014 Cristian Maglie. All rights reserved.
|
||||||
|
// Use of this source code is governed by a BSD-style
|
||||||
|
// license that can be found in the LICENSE file.
|
||||||
|
//
|
||||||
|
|
||||||
|
package test
|
||||||
|
|
||||||
|
import "go.bug.st/serial"
|
||||||
|
|
||||||
|
func BuildTest() {
|
||||||
|
serial.GetPortsList()
|
||||||
|
mode := &serial.Mode{
|
||||||
|
BaudRate: 9600,
|
||||||
|
Parity: serial.PARITY_NONE,
|
||||||
|
DataBits: 8,
|
||||||
|
StopBits: serial.STOPBITS_ONE,
|
||||||
|
}
|
||||||
|
port, _ := serial.OpenPort("", mode)
|
||||||
|
port.SetMode(mode)
|
||||||
|
buff := make([]byte, 100)
|
||||||
|
port.Write(buff)
|
||||||
|
port.Read(buff)
|
||||||
|
port.Close()
|
||||||
|
}
|
||||||
|
|
||||||
|
// vi:ts=2
|
||||||
Reference in New Issue
Block a user