Building an Elixir Project
What This Guide Covers #
For Language versions and other build-environment specific information visit our reference pages:
The rest of this guide covers build environment and configuration topics specific to Elixir projects. Please make sure to read our Onboarding and General Build configuration guides first.
Elixir builds are not available on the macOS environment.
CI Environment for Elixir Projects #
To choose the Elixir VM, declare in your .travis.yml
:
language: elixir
Specify which Elixir version to build with #
You can specify Elixir version to build with by the elixir
key.
For example,
elixir: '1.5.2'
or
elixir: '1.5'
The former points to the specific release indicated, while the latter points to the latest development branch build which has latest patches but may be occasionally be broken. See this GitHub issue comment for more details.
Specifying OTP Release version #
Note that Elixir has requirements regarding the underlying Erlang OTP Release version.
If the specified OTP Release version (implicitly or explicitly) does not meet this requirement, Travis CI will choose one for you.
You can also override this OTP Release choice by adding the otp_release
.
For example:
language: elixir
elixir:
- '1.2.2'
otp_release:
- '18.2.1'
To test multiple Elixir versions with different OTP release versions:
language: elixir
elixir:
- '1.0.5'
otp_release: '17.4'
jobs:
include:
- elixir: '1.2'
otp_release: '18.0'
Environment Variables #
The version of Elixir a job is using is available as:
TRAVIS_ELIXIR_VERSION
As with the Erlang VM, the version of OTP release a job is using is available as:
TRAVIS_OTP_RELEASE
Build Config Reference #
You can find more information on the build config format for Elixir in our Travis CI Build Config Reference.