Skip to content

Commit

Permalink
First attempt at CircleCI config (reasonml#1087)
Browse files Browse the repository at this point in the history
Features:
* Cache apt packages
* Cache OCaml installs and packages
* Multi-version testing support (not enabled)
  • Loading branch information
tekknolagi authored and sansthesis committed Apr 19, 2017
1 parent 900198a commit c3b693a
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
25 changes: 25 additions & 0 deletions circle.yml
@@ -0,0 +1,25 @@
dependencies:
cache_directories:
- "~/.opam"
- "~/aptcache"
override:
- sudo add-apt-repository -y ppa:avsm/ppa
# BEGIN apt cache setup. Used in case cache is wiped.
- sudo mkdir -p ~/aptcache/partial
- sudo touch ~/aptcache/lock
- sudo chmod 640 ~/aptcache/lock
# END apt cache setup.
- sudo apt-get update -o dir::cache::archives="/home/ubuntu/aptcache" -y
- sudo apt-get install -o dir::cache::archives="/home/ubuntu/aptcache" -y ocaml ocaml-native-compilers opam
- opam init --auto-setup --dot-profile=~/.bashrc # Modify dotfiles
- opam switch --no-switch 4.02.3 # Download and compile all the versions
- opam switch --no-switch 4.03.0
- opam switch --no-switch 4.04.0

test:
override:
- ./test-with-version.sh 4.02.3
# # Add back when multi-version support lands:
# - ./test-with-version.sh 4.03.0
# - ./test-with-version.sh 4.04.0
- git diff --exit-code
10 changes: 10 additions & 0 deletions test-with-version.sh
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

OCAML_VERSION="${1}"

make clean
opam switch "$OCAML_VERSION"
opam update
opam pin add -y reason .
eval `opam config env`
make test

0 comments on commit c3b693a

Please sign in to comment.