Travis

Community-Supported Languages

There are many programming languages out there, and Travis CI would like to support as many as possible.

However, the Travis CI team often lacks the expertise to make this a reality, which is where community support comes in.

What does community-supported mean? #

Support for Community-supported languages are programming languages where support is provided by self-identified experts in the languages’ respective community.

Add a new community-supported language #

  1. Gather a group of 3 or more volunteers who will support the new language.
  2. Create pull requests in travis-build and if necessary travis-web.
  3. Test your changes.
  4. Work with Travis CI team to get the PRs production-ready.
  5. Provide ongoing support for the issues involving the language.

A group of 3 is a minimum to support a language. This allows redundancy in providing support when a member of the support team is unavailable.

Technical Details #

It is important to note that languages are configured at build time, so components are downloaded every time a job runs. To save build time, limit your language resource usage to a minimum.

Add a new language #

To add support for a new language, edit travis-build and create a new class, inheriting from Travis::Build::Script, that implements reasonable defaults for your language’s build stages.

As a minimum, implement the following stages:

configuresetupannounceinstallscript

There are other phases that can be customized for a particular language; the Travis CI team will work with you to identify and implement the customization if you think it is appropriate to do so.

The configure phase runs before sudo is disabled in the container builds, So if you need to use sudo to set up your language environment (e.g., install Ubuntu packages), you should do that in the configure phase.

If you want to support build matrix expansion based on various language versions (e.g., Ruby 2.2, 2.1, etc.), and you wish to add a convenient way to restrict deployments based on the language version, add your language to Travis::Build::Addons::Deploy::Script::VERSIONED_RUNTIMES.

Add Matrix support #

If the language provides build matrix expansion, make this information visible to the end user by editing travis-web.

To make this happen, you need to tell travis-web to pick up the value from the job’s data and display it. Clone the travis-web repository, add your language to the app/utils/keys-map.coffee file, and submit a pull request for this change.

If you want to support build matrix expansion for various language versions (e.g., Ruby 2.2, 2.1, etc.), please coordinate with the Travis CI team to find out exactly what is required.

Test travis-build changes #

Testing happens in our staging environment, which is a shared resource.Testing the proposed changes could take some coordination between you and the Travis CI team.

Test code locally #

Optionally, you can use travis-build as an addon to the CLI utility. This allows you to compile the travis-build code you are working on into a Bash script, which you can then check for correct syntax (bash -n) and execute (we recommend doing this on a virtual machine) to aid your development.

List of community-supported languages #

In alphabetical order, they are:

  1. C#
  2. Crystal
  3. D
  4. Dart
  5. Haxe
  6. Julia
  7. Nix
  8. Perl 6
  9. R
  10. Smalltalk