Building a Julia Project

What This Guide Covers #

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

Community-Supported Warning #

Travis CI support for Julia is contributed by the community and may be removed or altered at any time. If you run into any problems, please report them in the Travis CI issue tracker and cc @travis-ci/julia-maintainers.

Choosing Julia versions to test against #

Julia workers on Travis CI download and install a binary of Julia. You can specify the Julia versions to test in the julia: key in your .travis.yml file. For example:

language: julia
  - nightly
  - 0.7
  - 0.6.4

Acceptable formats are:

  • nightly will test against the latest nightly build of Julia.
  • X.Y will test against the latest release for that minor version.
  • X.Y.Z will test against that exact version.

The oldest versions for which binaries are available is 0.3.1 for Linux, or 0.2.0 for OS X.

Default Build and Test Script #

If your repository contains JuliaProject.toml or Project.toml file, and you are building on Julia v0.7 or later, the default build script will be:

using Pkg

Otherwise it will use the older form:

if VERSION >= v"0.7.0-DEV.5183"
    using Pkg
Pkg.test("$pkgname", coverage=true)

where the package name $pkgname is the repository name, with any trailing .jl removed.

Dependency Management #

If your Julia package has a deps/build.jl file, then"$name") will run that file to install any dependencies of the package. If you need to manually install any dependencies that are not handled by deps/build.jl, it is possible to specify a custom dependency installation command as described in the general build configuration guide.

Build Matrix #

For Julia projects, env and julia can be given as arrays to construct a build matrix.

Environment Variable #

The version of Julia a job is using is available as: