Skip to content

Commit e7cacf8

Browse files
authored
Merge pull request #4 from coq-io/test-incompatible-ocaml-versions
Test incompatible ocaml versions
2 parents 915a04e + df89b4f commit e7cacf8

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

.travis.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ services:
88
env:
99
global:
1010
- OPAMJOBS="2"
11+
- PACKAGE_NAME="coq-io-system-ocaml"
1112
matrix:
1213
- OCAML_IMAGE="ocaml/opam2:4.02"
1314
- OCAML_IMAGE="ocaml/opam2:4.03"
@@ -28,8 +29,7 @@ install: |
2829
set -ex # -e = exit on failure; -x = trace for debug
2930
sudo apt-get install m4 -y
3031
opam update -y
31-
opam pin add coq-io-system-ocaml.opam . --kind=path -y --no-action
32-
opam install coq-io-system-ocaml --deps-only
32+
opam pin add ${PACKAGE_NAME}.opam . --kind=path -y --no-action
3333
opam config list
3434
opam repo list
3535
opam pin list
@@ -43,7 +43,14 @@ script:
4343
export PS4='+ \e[33;1m(\$0 @ line \$LINENO) \$\e[0m '
4444
set -ex
4545
sudo chown -R opam:opam /home/project
46-
opam install coq-io-system-ocaml -v
46+
# Check if the package is compatible with the current environment
47+
if opam install ${PACKAGE_NAME} --show-action; then
48+
# First install the dependencies
49+
opam install ${PACKAGE_NAME} --deps-only
50+
opam list
51+
# Then install the package itself in verbose mode
52+
opam install ${PACKAGE_NAME} -v
53+
fi;
4754
" script
48-
- docker stop OCAML # optional
55+
- docker stop OCAML # optional
4956
- echo -en 'travis_fold:end:script\\r'

coq-io-system-ocaml.opam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ install: [
1313
]
1414
depends: [
1515
"lwt" {>= "2.4.7"}
16-
"ocaml" {>= "4.00.0"}
16+
"ocaml" {>= "4.02.0"}
1717
"ocamlbuild"
1818
"ocamlfind"
1919
"num"

0 commit comments

Comments
 (0)