Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

travis-ci: matrix.exclude ignored?

Tags:

travis-ci

i'm setting up travis-ci form my C++-project, and want to have three different jobs per build:

  • linux (native=64bit)
  • osx/64bit (native)
  • osx/32bit

to achieve this, i've configure travis to build on linux and osx, and created an evironment-variable ARCH that is set either to a specific architecture (e.g. i386) or empty (for native builds)

here's my .travis.yml:

language: cpp
env:
  matrix:
  - ARCH=
  - ARCH=i386
  global:
  - secure: ...
os:
  - linux
  - osx
matrix:
  exclude:
   - os: linux
before_install:
- ./travis-ci/install-dependencies.sh
script:
- ./travis-ci/build.sh

the script- and before_install-scripts are setup to honour the ARCH envvar.

now for reasons unknown to me, when i push to github, the build-matrix includes:

  • OS:linux, env:ARCH=
  • OS:linux, env:ARCH=i386

and indeed, i get two jobs for linux. so it seems that my exclude statement is ignored.

any hints what i should do to not build linux/ARCH=i386?

like image 984
umläute Avatar asked Dec 07 '25 22:12

umläute


1 Answers

So it seems that the problem was, that my particular project had not had OSX support enabled yet (currently this needs to be done manually). Thus the os axis of the matrix did not really exist.

Once the osx builds were enabled (and therefore the os axis was established properly), the exclude statement started to work as expected.

like image 189
umläute Avatar answered Dec 12 '25 00:12

umläute



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!