| 1 |
language: go |
| 2 |
go: |
| 3 |
- "1.10" |
| 4 |
# - "tip" |
| 5 |
|
| 6 |
# first part of the GOARCH workaround |
| 7 |
# setting the GOARCH directly doesn't work, since the value will be overwritten later |
| 8 |
# so set it to a temporary environment variable first |
| 9 |
env: |
| 10 |
global: |
| 11 |
TRAVIS_CGO_ENABLED=1 |
| 12 |
TRAVIS_GOOS=linux |
| 13 |
matrix: |
| 14 |
- TRAVIS_GOARCH=amd64 |
| 15 |
- TRAVIS_GOARCH=arm TRAVIS_CC=arm-linux-gnueabi-gcc TRAVIS_GOARM=6 |
| 16 |
|
| 17 |
# second part of the GOARCH workaround |
| 18 |
# now actually set the GOARCH env variable to the value of the temporary variable set earlier |
| 19 |
before_install: |
| 20 |
- sudo apt-get install gcc-arm-linux-gnueabi # for CGO cross compile to ARM |
| 21 |
- export CGO_ENABLED=$TRAVIS_CGO_ENABLED GOARCH=$TRAVIS_GOARCH GOARM=$TRAVIS_GOARM GOOS=$TRAVIS_GOOS CC=$TRAVIS_CC |
| 22 |
- go env # for debugging |
| 23 |
- go tool dist env # for debugging |
| 24 |
|
| 25 |
|