Use configure-caches on AppVeyor

master
David Allsopp 2020-04-17 10:16:03 +01:00
parent db1d8488e6
commit 014105bf1c
2 changed files with 10 additions and 1 deletions

View File

@ -37,6 +37,7 @@ matrix:
cache:
- C:\cygwin64\var\cache\setup
- C:\projects\cache
install:
# This is a hangover from monitoring effects of MPR#7452

View File

@ -17,6 +17,9 @@ set -e
BUILD_PID=0
# This must correspond with the entry in appveyor.yml
CACHE_DIRECTORY=/cygdrive/c/projects/cache
if [[ -z $APPVEYOR_PULL_REQUEST_HEAD_COMMIT ]] ; then
MAKE="make -j"
else
@ -62,7 +65,12 @@ function set_configuration {
;;
esac
./configure $build $host --prefix="$2" --enable-ocamltest
mkdir -p "$CACHE_DIRECTORY"
./configure --cache-file="$CACHE_DIRECTORY/config.cache-$1" \
$build $host --prefix="$2" --enable-ocamltest || ( \
rm -f "$CACHE_DIRECTORY/config.cache-$1" ; \
./configure --cache-file="$CACHE_DIRECTORY/config.cache-$1" \
$build $host --prefix="$2" --enable-ocamltest )
FILE=$(pwd | cygpath -f - -m)/Makefile.config
echo "Edit $FILE to turn C compiler warnings into errors"