7

I have hosted my code (written in C++) on GitHub and wish to link it to a hosted Continuous Integration (CI) server like Travis CI or BuildHive. And then I'd like to see "build passing" or "build failing" on my project page. But when I checked the CI environments of these two services, Travis CI comes the closest with availability of gcc, git, cmake and sqlite3, but I'm missing another critical library which is Qt4, which is required for building my project. It should also be free, since it's a free and open source project.

Please tell me how I can do this? Thanks.

I need: gcc, git, cmake, sqlite3 and Qt4.

ruben2020
  • 1,549
  • 14
  • 24

2 Answers2

8

The following .travis.yml solves my problem. The answer can be found on this page: http://about.travis-ci.org/docs/user/build-configuration/#Installing-Packages-Using-apt

 language: cpp

 compiler: gcc

 before_install:
  - sudo apt-get update -qq
  - sudo apt-get install -qq cmake sqlite3 qt4-dev-tools

 before_script:
   - mkdir build
   - cd build
   - cmake ..

 script: make

 notifications:
   email:
     - xxx@users.sourceforge.net
   on_success: change
   on_failure: always
ruben2020
  • 1,549
  • 14
  • 24
1

Not sure of this can work, but this blog post takes advantage of the Travis Build Matrix, in order to replace one language by another in the .travis.yml file:

# specify python as the language
language: python
# python versions to be used for testing
python:
- "2.6"
- "2.7"
env:
- JYTHON=true
- JYTHON=false
matrix:
exclude:
- python: 2.6
env: JYTHON=true
before_install:
- export JYTHON_URL='http://downloads.sourceforge.net/project/jython/jython/2.5.2/jython_installer-2.5.2.jar?r=http%3A%2F%2Fwww.jython.org%2Fdownloads.html&ts=1338089844&use_mirror=iweb'
- if [ "$JYTHON" == "true" ]; then wget $JYTHON_URL -O jython_installer.jar; java -jar jython_installer.jar -s -d $HOME/jython; export PATH=$HOME/jython:$PATH; fi
before_script: if [ "$JYTHON" == "true" ]; then export PYTHON_EXE=jython; jython -c "print ''"; else export PYTHON_EXE=python; fi
script: $PYTHON_EXE setup.py test 

So maybe you could setup a specific build which, actually, install qt4 and uses it instead of the official language.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250