Okay, so I’ve been messing around with this “Reason Travis – Rilea” thing, and let me tell you, it was a bit of a rollercoaster. I wanted to get them working together, and it wasn’t as straightforward as I thought it would be.
Getting Started
First, I needed to have Reason installed. I already had opam set up, so I just ran the usual commands to get the Reason toolchain. You know, the basic stuff like initializing a switch and making sure I had the latest version.

Then came Travis CI. I created a file in my project’s root directory. This file is like the instruction manual for Travis, telling it what to do.
The Configuration Struggle
This is where things got a little tricky. I spent a good chunk of time just tweaking the configuration. My initial .* looked something like this:
- language: node_js
- node_js:
- – “12”
- install:
- – npm install -g bs-platform
- – npm install
- script:
- – npm run build
- – npm test
I figured, “Hey, it’s JavaScript-related, so ‘node_js’ should work, right?” I wanted to use * version 12, and I knew I needed bs-platform globally installed. Also had to include the usual build, install, and test steps.
Debugging Headaches
But, of course, it didn’t work right away. I kept getting these weird errors in the Travis build logs. It took me a while to figure out what was going on. I was banging my head against the wall, checking the logs, and googling error messages.
The Breakthrough!
Finally, I realized that I should use opam and set the correct ocaml version in the .* file.
After many fails, my .* file looked something like:
- language: ocaml
- sudo: required
- opam_version: 2.0.0
- ocaml_version: 4.06.1
- install:
- – opam init –comp=$OCAML_VERSION –disable-sandboxing
- – eval $(opam env)
- – opam install . –deps-only
- script:
- – opam exec — dune build @all @runtest
- – opam exec — dune runtest
Using opam directly in Travis CI. So, I switched the language, added some before_install steps to initialize opam and install the Reason compiler (bsc), I change the install and script steps for using opam commands
Victory!
I pushed the changes, and BAM! Green build on Travis. It felt great to finally see it working. It’s always satisfying to overcome these little tech hurdles, you know?
So yeah, that’s my story of getting Reason and Travis CI to play nice together. It wasn’t a walk in the park, but I learned a lot along the way. Hopefully, this little write-up helps someone else out there who’s struggling with the same thing.