Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ocaml] [ci] Travis testing and compat for OCaml 4.12 #3585

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .travis-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,19 +54,19 @@ fi
case "$TARGET" in
prepare)
echo -en "travis_fold:start:ocaml\r"
if [ ! -e ~/ocaml/cached-version -o "$(cat ~/ocaml/cached-version)" != "$OCAML_VERSION.$OCAML_RELEASE" ] ; then
if [ ! -e ~/ocaml/cached-version -o "$(cat ~/ocaml/cached-version)" != "${OCAML_VERSION}${OCAML_RELEASE}" ] ; then
rm -rf ~/ocaml
mkdir -p ~/ocaml/src
cd ~/ocaml/src
wget http://caml.inria.fr/pub/distrib/ocaml-$OCAML_VERSION/ocaml-$OCAML_VERSION.$OCAML_RELEASE.tar.gz
tar -xzf ocaml-$OCAML_VERSION.$OCAML_RELEASE.tar.gz
cd ocaml-$OCAML_VERSION.$OCAML_RELEASE
wget https://github.com/ocaml/ocaml/archive/${OCAML_VERSION}${OCAML_RELEASE}.tar.gz
tar -xzf ${OCAML_VERSION}${OCAML_RELEASE}.tar.gz
cd ocaml-${OCAML_VERSION}${OCAML_RELEASE}
./configure -prefix ~/ocaml
make world.opt
make install
cd ../..
rm -rf src
echo "$OCAML_VERSION.$OCAML_RELEASE" > ~/ocaml/cached-version
echo "${OCAML_VERSION}${OCAML_RELEASE}" > ~/ocaml/cached-version
fi
echo -en "travis_fold:end:ocaml\r"
if [ $WITH_OPAM -eq 1 -o $OLD_OCAML -eq 1 ] ; then
Expand Down
18 changes: 12 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,30 @@ script: bash -ex .travis-ci.sh build
matrix:
include:
- os: linux
env: OCAML_VERSION=4.02 OCAML_RELEASE=3 WITH_OPAM=0
env: OCAML_VERSION=4.02 OCAML_RELEASE=.3 WITH_OPAM=0
stage: Build
- os: linux
env: OCAML_VERSION=4.08 OCAML_RELEASE=1 WITH_OPAM=0
env: OCAML_VERSION=4.08 OCAML_RELEASE=.1 WITH_OPAM=0
stage: Build
- os: linux
env: OCAML_VERSION=4.09 OCAML_RELEASE=0 WITH_OPAM=0
env: OCAML_VERSION=4.09 OCAML_RELEASE=.0 WITH_OPAM=0
stage: Build
- os: linux
env: OCAML_VERSION=4.10 OCAML_RELEASE=0 WITH_OPAM=0
env: OCAML_VERSION=4.10 OCAML_RELEASE=.0 WITH_OPAM=0
stage: Build
- os: linux
env: OCAML_VERSION=4.10 OCAML_RELEASE=0 WITH_OPAM=1
env: OCAML_VERSION=4.11 OCAML_RELEASE= WITH_OPAM=0
stage: Build
- os: linux
env: OCAML_VERSION=trunk OCAML_RELEASE= WITH_OPAM=0
stage: Build
- os: linux
env: OCAML_VERSION=4.10 OCAML_RELEASE=.0 WITH_OPAM=1
stage: Test
addons:
apt:
packages:
- aspcud
- os: osx
env: OCAML_VERSION=4.10 OCAML_RELEASE=0 WITH_OPAM=0
env: OCAML_VERSION=4.10 OCAML_RELEASE=.0 WITH_OPAM=0
stage: Build_macOS
6 changes: 4 additions & 2 deletions src/catapult/catapult.ml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ type t =
}

let fake_gc_stat =
{ Gc.minor_words = 0.
let init_gc = Gc.quick_stat () in
{ init_gc with
Gc.minor_words = 0.
; promoted_words = 0.
; major_words = 0.
; minor_collections = 0
Expand All @@ -26,7 +28,7 @@ let fake_gc_stat =
; compactions = 0
; top_heap_words = 0
; stack_size = 0
}
} [@ocaml.warning "-23"] (* all fiels of record used *)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
} [@ocaml.warning "-23"] (* all fiels of record used *)
} [@ocaml.warning "-23"] (* all fields are used in OCaml < 4.12 *)


let fake time_ref buf =
let print s = Buffer.add_string buf s in
Expand Down