Skip to content

Instantly share code, notes, and snippets.

@cemerick
Created February 11, 2019 23:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cemerick/76664c4ebfdca20d936de117024d6ed8 to your computer and use it in GitHub Desktop.
Save cemerick/76664c4ebfdca20d936de117024d6ed8 to your computer and use it in GitHub Desktop.
basic OCaml gitlab CI config
image: ocaml/opam2:ubuntu-lts
stages:
- build
- test
build:
# https://docs.gitlab.com/ee/ci/yaml/#cache
stage: build
cache:
key: "$CI_COMMIT_REF_SLUG"
paths:
- _opam
script:
- '[ -d _opam ] || cp -r ~/.opam/4.07 _opam'
- sudo apt install m4 -y
- opam install --deps-only -t -y .
test:
stage: test
cache:
key: "$CI_COMMIT_REF_SLUG"
paths:
- _opam
script:
- eval $(opam env)
- opam switch
- dune runtest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment