Set up automatic testing in Github repository

This is my post documenting how to set up automatic testing for Github repository.

Credits to Ajay who actually did it. I am mostly documenting the steps he did. The motivation was that it became unsustainable for me to manually run tests everytime a pull request comes in.

Go to Travis CI, sign up and link to the Github repository. (The full Getting Started link is here

The key thing is to put a “.travis.yml” file in the root of the directory

There seems to be a myriad of functionalities (supporting different programming languages etc), but it seems to be the easiest to use the generic one


        - linux

language: generic

        - wget -O cmake.tar.gz
        - tar xvf cmake.tar.gz
        - mv cmake-3.12.1-Linux-x86_64 cmake
        - mkdir build
        - cd build
        - ../cmake/bin/cmake ..
        - make
        - cd bin 
        - ./graphit_test
        - cd ..
        - python python_tests/
        - python python_tests/


The script generally have 2 parts, “install” and “script”. Install uses wget to get all the dependencies. In the ¬†“script” part, we set up the build directory, and run the python tests.

Another one that uses the c++ language from the Tiramisu project

language: cpp

      - ubuntu-toolchain-r-test
      - libstdc++-4.9-dev

  - wget
  - tar xvf clang+llvm-5.0.0-x86_64-linux-gnu-debian8.tar.xz
  - mv clang+llvm-5.0.0-x86_64-linux-gnu-debian8 llvm
  - ./utils/scripts/ $TRAVIS_BUILD_DIR $TRAVIS_BUILD_DIR/llvm/bin
  - printf "\nset (LLVM_CONFIG_BIN \${CMAKE_SOURCE_DIR}/llvm/bin)" >> configure.cmake

  - mkdir build
  - cd build
  - cmake ..
  - make -j tiramisu
  - make test


This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s