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

Update cold compiler to 4.09.1 (2.0 version) #4262

Merged
merged 25 commits into from
Jul 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
9395713
Fix update-sources.sh with dune-local
dra27 Jun 26, 2019
72a05c6
Fix update-sources.sh for seq.base
dra27 Jun 26, 2019
d063a8e
Fix update-sources.sh when opam lacking md5
dra27 Jun 26, 2019
2d077b2
Move Travis test to 4.09.1
dra27 Jun 30, 2020
e2ada27
Test 4.10.0 on Travis
dra27 Jun 30, 2020
3a73197
Fix display of folds in Travis logs
dra27 Jun 30, 2020
0fdebf8
Move the test SHA for opam-repository forward
dra27 Jul 1, 2020
f028180
Advance testing forwards to 4.09.1
dra27 Jul 1, 2020
d0244e8
Remove the OCaml tree after installing compiler
dra27 Jul 1, 2020
a5f2c0f
Correct URL for opam archive cache
dra27 Jul 7, 2020
94a2345
Allow make -C src_ext cache-archives to use cache
dra27 Jul 7, 2020
50dafcc
Display OS information on AppVeyor logs
dra27 Jul 7, 2020
0e146a5
Display a message when the opam cache used
dra27 Jul 7, 2020
725de11
Revert "Install GNU make 4.2 for the cold test"
dra27 Jul 7, 2020
c19cc18
Correct typo src_ext/Makefile
dra27 Jul 7, 2020
a80e1d4
Move cold compiler forward to 4.09.1
dra27 Jul 8, 2020
d16fa42
Update src_ext packages
dra27 Jun 30, 2020
76eb5cb
Synchronise the two MD5 mechanisms in src_ext
dra27 Jul 8, 2020
ad7c800
Overhaul downloading code in src_ext/Makefile
dra27 Jul 7, 2020
3896625
Fix bootstrap opam version detection
dra27 Jul 16, 2020
6a92397
Bootstrap with opam 2.0.7 rather than 2.0.0-rc2!
dra27 Jul 16, 2020
ac7064b
Move OPAMBSVERSION to .travis.yml
dra27 Jul 16, 2020
e01d0fd
Revert "travis: add 2.0 specific cache"
dra27 Jul 16, 2020
ad55fb2
Revert "travis: add 2.0 specific cache to yml"
dra27 Jul 16, 2020
767cace
travis: fix darwin/macos
rjbou May 1, 2020
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
71 changes: 42 additions & 29 deletions .travis-ci.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/bash -xue

OPAMBSVERSION=2.0.0-rc2
OPAMBSROOT=$HOME/.opam.2.0.cached
OPAMBSROOT=$HOME/.opam.cached
OPAMBSSWITCH=opam-build
PATH=~/local/bin:$PATH; export PATH

Expand Down Expand Up @@ -39,6 +38,11 @@ else
fi
set -x

write_versions () {
echo "LOCAL_OCAML_VERSION=$OCAML_VERSION" > ~/local/versions
echo "LOCAL_OPAMBSVERSION=$OPAMBSVERSION" >> ~/local/versions
}

init-bootstrap () {
export OPAMROOT=$OPAMBSROOT
# The system compiler will be picked up
Expand Down Expand Up @@ -116,18 +120,7 @@ wrap-install-commands: []
wrap-remove-commands: []
EOF

if [[ $COLD -eq 1 ]] ; then
if [ ! -x ~/local/bin/make ] ; then
wget http://ftpmirror.gnu.org/gnu/make/make-4.2.tar.gz
tar -xzf make-4.2.tar.gz
mkdir make-4.2-build
cd make-4.2-build
../make-4.2/configure --prefix ~/local
make
make install
cd ..
fi
else
if [[ $COLD -ne 1 ]] ; then
if [[ $TRAVIS_OS_NAME = "osx" && -n $EXTERNAL_SOLVER ]] ; then
rvm install ruby-2.3.3
rvm --default use 2.3.3
Expand All @@ -140,10 +133,20 @@ EOF
echo "Cached compiler is $LOCAL_OCAML_VERSION; requested $OCAML_VERSION"
echo "Resetting local cache"
rm -rf ~/local
elif [[ ${LOCAL_OPAMBSVERSION:-$OPAMBSVERSION} != $OPAMBSVERSION ]] ; then
echo "Cached opam is $LOCAL_OPAMBSVERSION; requested $OPAMBSVERSION"
echo "Replacement opam will be downloaded"
rm -f ~/local/bin/opam-bootstrap
elif [[ -e ~/local/bin/opam-bootstrap ]] ; then
if [[ -z ${LOCAL_OPAMBSVERSION:-} ]] ; then
ls -l ~/local/bin
chmod +x ~/local/bin/opam-bootstrap
LOCAL_OPAMBSVERSION="$(~/local/bin/opam-bootstrap --version)"
chmod -x ~/local/bin/opam-bootstrap
fi
if [[ $LOCAL_OPAMBSVERSION != $OPAMBSVERSION ]] ; then
echo "Cached opam is $LOCAL_OPAMBSVERSION; requested $OPAMBSVERSION"
echo "Replacement opam will be downloaded"
rm -f ~/local/bin/opam-bootstrap
# The root may well have been written by a newer version of opam
rm -rf "$OPAMBSROOT"
fi
fi
fi
fi
Expand All @@ -158,7 +161,7 @@ EOF
make lib-pkg
else
if [[ ! -x ~/local/bin/ocaml ]] ; then
echo -en "travis_fold:start:ocaml\r"
(set +x ; echo -en "travis_fold:start:ocaml\r") 2>/dev/null
wget "http://caml.inria.fr/pub/distrib/ocaml-${OCAML_VERSION%.*}/ocaml-$OCAML_VERSION.tar.gz"
tar -xzf "ocaml-$OCAML_VERSION.tar.gz"
cd "ocaml-$OCAML_VERSION"
Expand All @@ -183,15 +186,22 @@ EOF
make world.opt
fi
make install
echo "LOCAL_OCAML_VERSION=$OCAML_VERSION" > ~/local/versions
echo -en "travis_fold:end:ocaml\r"
cd ..
rm -rf "ocaml-$OCAML_VERSION"
write_versions
(set +x ; echo -en "travis_fold:end:ocaml\r") 2>/dev/null
fi

if [[ $OPAM_TEST -eq 1 ]] ; then
echo -en "travis_fold:start:opam\r"
(set +x ; echo -en "travis_fold:start:opam\r") 2>/dev/null
if [[ ! -e ~/local/bin/opam-bootstrap ]] ; then
os=$( (uname -s || echo unknown) | awk '{print tolower($0)}')
if [ "$os" = "darwin" ] ; then
os=macos
fi
wget -q -O ~/local/bin/opam-bootstrap \
"https://github.com/ocaml/opam/releases/download/$OPAMBSVERSION/opam-$OPAMBSVERSION-$(uname -m)-$(uname -s)"
"https://github.com/ocaml/opam/releases/download/$OPAMBSVERSION/opam-$OPAMBSVERSION-$(uname -m)-$os"
write_versions
fi

cp -f ~/local/bin/opam-bootstrap ~/local/bin/opam
Expand All @@ -202,7 +212,7 @@ EOF
else
init-bootstrap
fi
echo -en "travis_fold:end:opam\r"
(set +x ; echo -en "travis_fold:end:opam\r") 2>/dev/null
fi
fi
exit 0
Expand Down Expand Up @@ -273,7 +283,7 @@ export OPAMYES=1
export OCAMLRUNPARAM=b

( # Run subshell in bootstrap root env to build
echo -en "travis_fold:start:build\r"
(set +x ; echo -en "travis_fold:start:build\r") 2>/dev/null
if [[ $OPAM_TEST -eq 1 ]] ; then
export OPAMROOT=$OPAMBSROOT
eval $(opam env)
Expand Down Expand Up @@ -313,14 +323,14 @@ export OCAMLRUNPARAM=b
OPAMEXTERNALSOLVER="$EXTERNAL_SOLVER" make tests ||
(tail -n 2000 _build/default/tests/fulltest-*.log; echo "-- TESTS FAILED --"; exit 1)
fi
echo -en "travis_fold:end:build\r"
(set +x ; echo -en "travis_fold:end:build\r") 2>/dev/null
)

if [ "$TRAVIS_BUILD_STAGE_NAME" = "Upgrade" ]; then
OPAM12DIR=~/opam1.2
CACHE=$OPAM12DIR/cache
export OPAMROOT=$CACHE/root20
echo -en "travis_fold:start:opam12\r"
(set +x ; echo -en "travis_fold:start:opam12\r") 2>/dev/null
if [[ ! -f $CACHE/bin/opam ]]; then
mkdir -p $CACHE/bin
wget https://github.com/ocaml/opam/releases/download/1.2.2/opam-1.2.2-x86_64-Linux -O $CACHE/bin/opam
Expand All @@ -334,7 +344,7 @@ if [ "$TRAVIS_BUILD_STAGE_NAME" = "Upgrade" ]; then
else
cp -r $CACHE/root /tmp/opamroot
fi
echo -en "travis_fold:end:opam12\r"
(set +x ; echo -en "travis_fold:end:opam12\r") 2>/dev/null
set +e
opam update
rcode=$?
Expand All @@ -357,7 +367,10 @@ fi
fi

# Test basic actions
opam init --bare default git+https://github.com/ocaml/opam-repository#8be4290a
# The SHA is fixed so that upstream changes shouldn't affect CI. The SHA needs
# to be moved forwards when a new version of OCaml is added to ensure that the
# ocaml-system package is available at the correct version.
opam init --bare default git+https://github.com/ocaml/opam-repository#8c45759d4
opam switch create default ocaml-system
eval $(opam env)
opam install lwt
Expand Down
21 changes: 14 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,18 @@ install:

cache:
directories:
- $HOME/.opam.2.0.cached
- $HOME/.opam.cached
- $HOME/local
- $HOME/opam1.2/cache

script:
- bash -exu .travis-ci.sh build

matrix:
env:
global:
- OPAMBSVERSION=2.0.7

jobs:
include:
- os: linux
env: OCAML_VERSION=4.02.3
Expand All @@ -49,24 +53,27 @@ matrix:
env: OCAML_VERSION=4.08.1
stage: Build
- os: linux
env: OCAML_VERSION=4.09.0
env: OCAML_VERSION=4.09.1
stage: Build
- os: linux
env: OCAML_VERSION=4.10.0
stage: Build
- os: linux
stage: Hygiene
- os: osx
env: OCAML_VERSION=4.07.1 OPAM_TEST=1
env: OCAML_VERSION=4.09.1 OPAM_TEST=1
stage: Test
- os: linux
env: OCAML_VERSION=4.07.1 OPAM_TEST=1
env: OCAML_VERSION=4.09.1 OPAM_TEST=1
stage: Test
- os: linux
env: OCAML_VERSION=4.07.1 OPAM_TEST=1 EXTERNAL_SOLVER=aspcud
env: OCAML_VERSION=4.09.1 OPAM_TEST=1 EXTERNAL_SOLVER=aspcud
stage: Test
- os: linux
env: COLD=1
stage: Test
- os: linux
env: OCAML_VERSION=4.07.1
env: OCAML_VERSION=4.09.1
stage: Upgrade

notifications:
Expand Down
19 changes: 1 addition & 18 deletions appveyor.patch
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,15 @@ From: David Allsopp <david.allsopp@metastack.com>
Date: Fri, 19 Jul 2019 13:14:44 +0100
Subject: [PATCH] AppVeyor src_ext patches

- Need unreleased flexdll 0.38 to build mccs on mingw.
- Need unreleased cmdliner 1.0.5 to build man pages on Windows.
---
src_ext/Makefile | 4 ++--
src_ext/Makefile.sources | 4 ++--
src_ext/dune-cmdliner-src | 5 -----
.../0001-Escape-default-values.patch | Bin 0 -> 920 bytes
4 files changed, 4 insertions(+), 9 deletions(-)
3 files changed, 2 insertions(+), 7 deletions(-)
delete mode 100644 src_ext/dune-cmdliner-src
create mode 100644 src_ext/patches/cmdliner.common/0001-Escape-default-values.patch

diff --git a/src_ext/Makefile b/src_ext/Makefile
index b83b9029..7154900b 100644
--- a/src_ext/Makefile
+++ b/src_ext/Makefile
@@ -12,8 +12,8 @@ endif
URL_ocaml = http://caml.inria.fr/pub/distrib/ocaml-4.07/ocaml-4.07.1.tar.gz
MD5_ocaml = 0b180b273ce5cc2ac68f347c9b06d06f

-URL_flexdll = https://github.com/alainfrisch/flexdll/archive/0.37.tar.gz
-MD5_flexdll = cc456a89382e60d84130cddd53977486
+URL_flexdll = https://github.com/dra27/flexdll/archive/linking-c++.tar.gz
+MD5_flexdll = 75bd0efc328ad9f8f2e01414464d217b

ifndef FETCH
ifneq ($(shell command -v curl 2>/dev/null),)
diff --git a/src_ext/Makefile.sources b/src_ext/Makefile.sources
index f21ca4b3..e9830a7b 100644
--- a/src_ext/Makefile.sources
Expand Down
1 change: 1 addition & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ cache:
- C:\projects\opam\src_ext\archives

init:
- systeminfo 2>nul | findstr /B /C:"OS Name" /C:"OS Version"
- "echo System architecture: %PLATFORM%"

install:
Expand Down
2 changes: 1 addition & 1 deletion appveyor_build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ set CYGWIN_UPGRADE_REQUIRED=0
for %%P in (%CYGWIN_PACKAGES%) do call :CheckPackage %%P
call :UpgradeCygwin

rem Use dra27 flexdll for native ports
rem Use cmdliner 1.0.4 + #111 in order to build manpages
if "%OCAML_PORT%" neq "" git apply appveyor.patch

set INSTALLED_URL=
Expand Down
46 changes: 29 additions & 17 deletions shell/bootstrap-ocaml.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,23 @@ PATH_PREPEND=
LIB_PREPEND=
INC_PREPEND=
if [ -n "$1" -a -n "${COMSPEC}" -a -x "${COMSPEC}" ] ; then
case "$(uname -m)" in
'i686')
BUILD=i686-pc-cygwin
;;
'x86_64')
BUILD=x86_64-pc-cygwin
;;
esac
case "$1" in
"mingw"|"mingw64")
BUILD=$1
"mingw")
HOST=i686-w64-mingw32
;;
"mingw64")
HOST=x86_64-w64-mingw32
;;
"msvc")
BUILD=$1
HOST=i686-pc-windows
if ! command -v ml > /dev/null ; then
eval `../../shell/msvs-detect --arch=x86`
if [ -n "${MSVS_NAME}" ] ; then
Expand All @@ -55,7 +66,7 @@ if [ -n "$1" -a -n "${COMSPEC}" -a -x "${COMSPEC}" ] ; then
fi
;;
"msvc64")
BUILD=$1
HOST=x86_64-pc-windows
if ! command -v ml64 > /dev/null ; then
eval `../../shell/msvs-detect --arch=x64`
if [ -n "${MSVS_NAME}" ] ; then
Expand All @@ -76,24 +87,24 @@ if [ -n "$1" -a -n "${COMSPEC}" -a -x "${COMSPEC}" ] ; then
fi

if [ ${TRY64} -eq 1 ] && command -v x86_64-w64-mingw32-gcc > /dev/null ; then
BUILD=mingw64
HOST=x86_64-w64-mingw32
elif command -v i686-w64-mingw32-gcc > /dev/null ; then
BUILD=mingw
HOST=i686-w64-mingw32
elif [ ${TRY64} -eq 1 ] && command -v ml64 > /dev/null ; then
BUILD=msvc64
HOST=x86_64-pc-windows
PATH_PREPEND=`bash ../../shell/check_linker`
elif command -v ml > /dev/null ; then
BUILD=msvc
HOST=i686-pc-windows
PATH_PREPEND=`bash ../../shell/check_linker`
else
if [ ${TRY64} -eq 1 ] ; then
BUILD=msvc64
BUILD_ARCH=x64
HOST=x86_64-pc-windows
HOST_ARCH=x64
else
BUILD=msvc
BUILD_ARCH=x86
HOST=i686-pc-windows
HOST_ARCH=x86
fi
eval `../../shell/msvs-detect --arch=${BUILD_ARCH}`
eval `../../shell/msvs-detect --arch=${HOST_ARCH}`
if [ -z "${MSVS_NAME}" ] ; then
echo "No appropriate C compiler was found -- unable to build OCaml"
exit 1
Expand All @@ -111,9 +122,8 @@ if [ -n "$1" -a -n "${COMSPEC}" -a -x "${COMSPEC}" ] ; then
PREFIX=`cd .. ; pwd`/ocaml
WINPREFIX=`echo ${PREFIX} | cygpath -f - -m`
if [ ${GEN_CONFIG_ONLY} -eq 0 ] ; then
sed -e "s|^PREFIX=.*|PREFIX=${WINPREFIX}|" -e "s|/lib|/lib/ocaml|" config/Makefile.${BUILD} > config/Makefile
cp config/s-nt.h byterun/caml/s.h
cp config/m-nt.h byterun/caml/m.h
# --disable-ocamldoc can change to --disable-stdlib-manpages when bumped to 4.11
PATH="${PATH_PREPEND}${PREFIX}/bin:${PATH}" Lib="${LIB_PREPEND}${Lib}" Include="${INC_PREPEND}${Include}" ./configure --prefix "$WINPREFIX" --build=$BUILD --host=$HOST --disable-ocamldoc
fi
cd ..
if [ ! -e ${FLEXDLL} ]; then
Expand All @@ -124,7 +134,9 @@ if [ -n "$1" -a -n "${COMSPEC}" -a -x "${COMSPEC}" ] ; then
tar -xzf ../${FLEXDLL}
rm -rf flexdll
mv flexdll-* flexdll
PATH="${PATH_PREPEND}${PREFIX}/bin:${PATH}" Lib="${LIB_PREPEND}${Lib}" Include="${INC_PREPEND}${Include}" make flexdll world.opt install
PATH="${PATH_PREPEND}${PREFIX}/bin:${PATH}" Lib="${LIB_PREPEND}${Lib}" Include="${INC_PREPEND}${Include}" make -j flexdll
PATH="${PATH_PREPEND}${PREFIX}/bin:${PATH}" Lib="${LIB_PREPEND}${Lib}" Include="${INC_PREPEND}${Include}" make -j world.opt
PATH="${PATH_PREPEND}${PREFIX}/bin:${PATH}" Lib="${LIB_PREPEND}${Lib}" Include="${INC_PREPEND}${Include}" make install
fi
OCAMLLIB=${WINPREFIX}/lib/ocaml
else
Expand Down
Loading