I've been toying with Elixir a bit lately, and decided to see if I could Travis CI to build my project (currently named "ProjectTynamo"). Travis CI has support for erlang, so I figured it was possible (spoiler: it was).
So here's my .travis.yml file:
- git clone https://github.com/elixir-lang/elixir
- cd elixir
- git checkout v0.12.5
- cd ..
- make -C elixir
before_script: "export PATH=`pwd`/elixir/bin:$PATH"
script: "MIX_ENV=test mix do deps.get, test"
Line by line:
1: Specify that it's an erlang project
2-3: Specify the 17.0 release of erlang (elixir needs that or newer)
4-9: Download and build elixir. My project is using Dynamo, so I'm specifically targetting elixir v0.12.5 for now.
10: Make sure the elixir binaries are added to PATH
11: Run the mix command. I'm just getting the dependencies and doing "test", so I set the MIX_ENV to "test".
Add something like this to the "targets" section of the binding.gyp file:
Otherwise you'll probably get a litany of errors like
"cannot use typeid with -fno-rtti"
"cannot use 'throw' with exceptions disabled"
Did someone hand you a large amount of data in an Excel spreadsheet encoded in base64? Or do you have data in an Excel sheet that you need converted to base64? No problem!
Side note: This page has another way to do it with a project reference to a Microsoft XML library. However, we're going to do it our own way, so you can see the entire code.