문제

I want to test different builds of my .js framework against many browsers

I expected to write something like:

language: node_js
node_js:
- 0.11
env:
  matrix:
    - BUILD='nocompat'
    - BUILD='compat'
    - BUILD='default'

    - BROWSER='ie6'
    - BROWSER='ie7'
    # etc... about total 15 browsers/platforms

But the only way I got it working was specifying all combinations "by hand"...

Like:

env:
  matrix:
    - BROWSER='chrome_linux'    BUILD='default'
    - BROWSER='chrome_linux'    BUILD='compat'
    - BROWSER='chrome_linux'    BUILD='nocompat'
    - BROWSER='firefox'         BUILD='default'
    - BROWSER='firefox'         BUILD='compat'
    - BROWSER='firefox'         BUILD='nocompat'

    # etc ... and this is about 50 lines!

Is there another way to do this? Or is this the right way?

도움이 되었습니까?

해결책

Looks like you can't DRY right now: travis-ci issue #1519

다른 팁

I believe the syntax for travis-build matrix environmental variables is:

env:
  - STUFF=true
  - STUFF=false

The env: matrix: is used for specifying variables that stay in the build matrix when you have a env:global for variables that aren't used for the build matrix.

You can read up more on matrices here. As a note, 50 seperate builds for your project is a little crazy, in fact, I'm not sure travis-ci supports 50 different builds in a matrix. I would narrow it down to about 10-20 personally.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top