Travis CI now allows you to run your own Docker containers to perform automated builds. This means embedded software developers making use of unusual toolchains can take advantage of cloud-based CI tools which previously frequently only offered a selection of “standard” toolchains: ruby, JS etc.
You can see an example configuration file for this in the Atomthreads RTOS project, which contains a file named “.travis.yml” in the top-level folder:
sudo: required language: c services: - docker before_install: - docker pull kelvinlawson/atomthreads script: - docker run --rm -v $TRAVIS_BUILD_DIR/:/data -t kelvinlawson/atomthreads /data/tests/commit-tests-arm.sh - docker run --rm -v $TRAVIS_BUILD_DIR/:/data -t kelvinlawson/atomthreads /data/tests/commit-tests-avr.sh
This tells Travis what to do whenever a change is committed to the Atomthreads Github repository. It is configured to pull from Docker Hub an Atomthreads-specific Docker container with the required toolchain / build environment (e.g. in this case “kelvinlawson/atomthreads” which contains various toolchains for the various architectures that Atomthreads supports: ARM, AVR etc).
It will then run a requested script inside the container (e.g. “commit-tests-avr.sh” which runs the Atomthreads RTOS automated test suite for AVR architecture). For Atomthreads we not only test that the build completes but also run the resulting built software in simulators, such as QEMU for ARM or SIMAVR for AVR.
Build status and build history is available at the Travis website, and you can add a nice logo to your website or Github repository page. Here is the current automated tests state for Atomthreads:
Once a repository (on Github in this case) and Travis CI are connected like this, Travis will immediately carry out your full suite of automated tests after each commit to the repository.