forked from reasonml/reason
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First attempt at CircleCI config (reasonml#1087)
Features: * Cache apt packages * Cache OCaml installs and packages * Multi-version testing support (not enabled)
- Loading branch information
1 parent
900198a
commit c3b693a
Showing
2 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |