Building a D Project

What This Guide Covers #

This guide covers build environment and configuration topics specific to D projects. Please make sure to read our Tutorial and general build configuration guides first.

Community Supported Language #

D is a community-supported language in Travis CI, maintained by @MartinNowak and @wilzbach. If you run into any problems, please report them in the Travis CI community forum. Please report compiler-specific issues at DMD’s issue tracker, LDC’s issue tracker, or GDC’s issue tracker. DUB related problems should be reported to DUB’s issue tracker.

Choosing compilers to test against #

By default Travis CI will use the latest dmd version. It is also possible to test projects against gdc or ldc and to choose specific compiler versions. To do so, specify the compiler using the d: key in .travis.yml.

Examples:

d: dmd-2.089.1
# latest dmd, gdc and ldc
d:
  - dmd
  - gdc
  - ldc
# nightlies and betas of dmd, ldc
d:
  - dmd-nightly
  - ldc-latest-ci
  - dmd-beta
  - ldc-beta

All valid versions from the D’s official install script are supported. Testing against multiple compilers will create one row in your build matrix for each compiler. The Travis CI D builder will export the DC env variable to point to dmd, ldc2 or gdc and the DMD env variable to point to dmd, ldmd2 or gdmd.

You can also have a look at the D section in our Travis CI Build Config Reference.