-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
78 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,60 @@ | ||
dist: trusty | ||
sudo: required | ||
language: generic | ||
|
||
services: | ||
- docker | ||
|
||
env: | ||
global: | ||
- PACKAGE_NAME="smart-print" | ||
matrix: | ||
- OCAML_VERSION="4.02" SHOULD_SUPPORT="true" | ||
- OCAML_VERSION="4.03" SHOULD_SUPPORT="true" | ||
- OCAML_VERSION="4.04" SHOULD_SUPPORT="true" | ||
- OCAML_VERSION="4.05" SHOULD_SUPPORT="true" | ||
- OCAML_VERSION="4.06" SHOULD_SUPPORT="true" | ||
- OCAML_VERSION="4.07" SHOULD_SUPPORT="true" | ||
- OCAML_VERSION="4.08" SHOULD_SUPPORT="true" | ||
- OCAML_VERSION="4.09" SHOULD_SUPPORT="true" | ||
- OCAML_VERSION="4.10" SHOULD_SUPPORT="true" | ||
|
||
install: | | ||
# Prepare the Docker container | ||
docker pull ocaml/opam2:${OCAML_VERSION} | ||
docker run -d -i --init --name=CONTAINER -v ${TRAVIS_BUILD_DIR}:/home/project -w /home/project ocaml/opam2:${OCAML_VERSION} | ||
docker exec CONTAINER /bin/bash --login -c " | ||
# This bash script is double-quoted to interpolate Travis CI env vars: | ||
echo \"Build triggered by ${TRAVIS_EVENT_TYPE}\" | ||
export PS4='+ \e[33;1m(\$0 @ line \$LINENO) \$\e[0m ' | ||
set -ex # -e = exit on failure; -x = trace for debug | ||
(cd /home/opam/opam-repository && git pull) | ||
opam update | ||
opam pin add ${PACKAGE_NAME}.opam . --kind=path --no-action | ||
opam config list | ||
opam repo list | ||
opam pin list | ||
opam list | ||
" install | ||
script: | ||
- echo -e "${ANSI_YELLOW}Building...${ANSI_RESET}" && echo -en 'travis_fold:start:script\\r' | ||
- | | ||
docker exec CONTAINER /bin/bash --login -c " | ||
export PS4='+ \e[33;1m(\$0 @ line \$LINENO) \$\e[0m ' | ||
set -ex | ||
whoami | ||
sudo chown -R opam:opam /home/project | ||
export OPAMWITHTEST=true | ||
# Check if the package is compatible with the current environment | ||
if [ "${SHOULD_SUPPORT}" = "true" ] || opam install ${PACKAGE_NAME} --show-action; then | ||
# First, install the dependencies | ||
sudo apt-get update | ||
opam depext ${PACKAGE_NAME} -y | ||
opam install ${PACKAGE_NAME} --deps-only -y | ||
opam list | ||
# Then, install the package itself in verbose mode | ||
opam install ${PACKAGE_NAME} -v | ||
fi; | ||
" script | ||
- docker stop CONTAINER # optional | ||
- echo -en 'travis_fold:end:script\\r' |
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,18 @@ | ||
opam-version: "2.0" | ||
version: "dev" | ||
|
||
maintainer: "[email protected]" | ||
authors: ["Guillaume Claret <[email protected]>"] | ||
homepage: "https://github.com/clarus/smart-print" | ||
bug-reports: "https://github.com/clarus/smart-print/issues" | ||
license: "BSD-3-Clause" | ||
|
||
depends: [ | ||
"ocaml" {>= "4.00.0"} | ||
"ocamlfind" {build} | ||
"ocamlbuild" {build} | ||
] | ||
build: make | ||
dev-repo: "git://github.com/clarus/smart-print" | ||
install: [make "install"] | ||
synopsis: "A pretty-printing library in OCaml" |