2017-03-25 51 views
0

我需要測試一個python腳本對陣雙方Python 2和3對Mac和Linux,我已經得到了以下配置:如何在Travis CI中用cpp項目指定python版本?

os: 
    - linux 
    - osx 

language: cpp 

osx_image: xcode8.2 

compiler: 
    - clang 

script: 
    - clang --version 
    - bash run-tests.sh 

如何每個Python版本添加到矩陣創造4個作業?

回答

0

假設你可以設置你的run-tests.sh拿起和一些環境變量PY使用Python版本:

os: 
    - linux 
    - osx 

language: cpp 

osx_image: xcode8.2 

compiler: 
    - clang 

matrix: 
    include: 
    - env: PY=/path/to/your/first/python 
    - env: PY=/path/to/your/second/python 

script: 
    - clang --version 
    - bash run-tests.sh 
相關問題