axelson

axelson

Scenic Core Team

Install elixir from source on Travis-ci

So I’m trying to get automated testing running for elixir_sense but I’m running an issue. The tests only pass (currently) if Elixir is installed from source. So I want to see if I can install Elixir from source on Travis. Having not used Travis very much I’m not sure how to go about it. I know that you can add elixir: '1.7.0 to your .travis.yml to install elixir from a binary release, but I’m not sure about installing from source.

Of course I may also opt to get the test suite running without requiring a source-installation but I wanted to get everything setup on CI before that if possible.

Marked As Solved

NobbZ

NobbZ

Okay, solved it.

It seems as if due to restriction of how travis CI works, elixir isn’t really installed after running make install.

After I changed the script to use the elixir directly from the source folder, it worked. Also I prepared the git checkout already in a way, that you should be able to create a build matrix easily.

Latest build log: https://travis-ci.com/axelson/elixir_sense/builds/97754187
PR: Fix installation and usage of elixir in travis builds by NobbZ · Pull Request #1 · axelson/elixir_sense · GitHub

Also Liked

NobbZ

NobbZ

I’ll take a closer look from home.

axelson

axelson

Scenic Core Team

Wow, thanks for seeing that through. I’ll get it merged down soon (hopefully later today).

Last Post!

axelson

axelson

Scenic Core Team

Here’s an updated example for anyone coming to this later (I had to remove any environment variables that depend on another environment variable):

language: erlang

otp_release:
  - '21.2'

env:
  EX_HOME: ${TRAVIS_BUILD_DIR}/elixir
  EX_BIN: ${TRAVIS_BUILD_DIR}/elixir/bin
  EX_VSN: 1.7.1

before_script:
  - git clone https://github.com/elixir-lang/elixir.git ${EX_HOME}
  - pushd ${EX_HOME}
  - git checkout v${EX_VSN}
  - make
  - popd
  - ${EX_BIN}/elixir ${EX_BIN}/mix local.hex --force
  - ${EX_BIN}/elixir ${EX_BIN}/mix local.rebar --force

script:
  - ${EX_BIN}/elixir ${EX_BIN}/mix deps.get
  - MIX_ENV=test ${EX_BIN}/elixir ${EX_BIN}/mix deps.compile
  - ${EX_BIN}/elixir ${EX_BIN}/mix test

Where Next?

Popular in Questions Top

electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
komlanvi
Hi everyone, I was playing with phoenix liveView but I run into an issue. I have a form and want to validate each input text when the te...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New

Other popular topics Top

vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 44265 214
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New

We're in Beta

About us Mission Statement