I use Go lang in my project and Travis-CI to create it.
I want to create it for each operating system (OSX, Linux, Windows), so I wanted to use the GIMME_OS and GIMME_ARCH environment variables ( from GIMME ), but the problem is that Darwin is not enough for my project, so I have to create my own project on Mac .
My approach is to create an OSX operating system as a virtual machine (travis supports this directly from the .travis.yml file) and build on Linux using cross-compilation (GIMME) linux64, linux386 and windows.
Now every time I define an environment variable, he created a new column for my build matrix. I want environment variables to save o in the Linux build part .
Now my .travis.yml looks like this:
language: go go: - 1.4.2 os: - osx - linux env: - GIMME_OS=windows GIMME_ARCH=amd64 - GIMME_OS=linux GIMME_ARCH=amd64 - GIMME_OS=linux GIMME_ARCH=386 - GIMME_OS=darwin GIMME_ARCH=386 matrix: exclude: os: osx env: GIMME_OS=darwin GIMME_ARCH=386 before_script: - go get -d -v ./... script: - go build -v ./... - go test -v ./...
These are really builds 8 (each line of environment variables for each OS) Is there a way to define environment variables that will be relevant only for some sections in the .travis.yml file (in particular, in the OS section).
linux travis-ci
Shikloshi
source share