我正在使用5种语言创建项目,我需要设置 Travis CI 以适用于所有语言。因此,合作变得容易。但我无法弄清楚如何做到这一点。我已经尝试了一切可能的想法。其中之一是
language:
- python
- cpp
- java
python:
- "3.3"
- "3.4"
- "3.5"
- "3.5-dev" # 3.5 development branch
- "nightly" # currently points to 3.6-dev
jdk:
- oraclejdk8
- openjdk7
before_install:
- wget https://googletest.googlecode.com/files/gtest-1.7.0.zip
- unzip gtest-1.7.0.zip
- cd gtest-1.7.0/
- ./configure --prefix=$TRAVIS_BUILD_DIR --with-pthreads=no
- make
- mkdir $TRAVIS_BUILD_DIR/include/
- cp -r include/gtest $TRAVIS_BUILD_DIR/include
- mkdir $TRAVIS_BUILD_DIR/lib/
- cp lib/.libs/* $TRAVIS_BUILD_DIR/lib/
- cd ..
- export CPLUS_INCLUDE_PATH=$TRAVIS_BUILD_DIR/include:$CPLUS_INCLUDE_PATH
- export LIBRARY_PATH=$TRAVIS_BUILD_DIR/lib:$LIBRARY_PATH
- export LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/lib:$LD_LIBRARY_PATH
- cd cpp
- cd java
- pip install coverage
- cd python
# command to run tests
script:
- nosetests -v --with-coverage
- ant test
- make googletest
请建议一种克服它的方法来帮助我。
另一个参考C++ and Python in one travis.yml。 感谢。
我仍然无法做到这一点。有人可以给我一个代码片段,用于至少4种语言C ++,Java,Python和Ruby。我将被迫。