Merge pull request #9454 from dra27/faster-appveyor

AppVeyor speed-ups
master
David Allsopp 2020-04-20 09:53:51 +01:00 committed by GitHub
commit c97b73c056
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 66 additions and 15 deletions

View File

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

View File

@ -13,6 +13,8 @@
#* * #* *
#************************************************************************** #**************************************************************************
.NOTPARALLEL:
BASEDIR := $(shell pwd) BASEDIR := $(shell pwd)
NO_PRINT=`$(MAKE) empty --no-print-directory >/dev/null 2>&1 \ NO_PRINT=`$(MAKE) empty --no-print-directory >/dev/null 2>&1 \
&& echo --no-print-directory` && echo --no-print-directory`

View File

@ -13,6 +13,8 @@
#* * #* *
#************************************************************************** #**************************************************************************
.NOTPARALLEL:
TOPDIR = ../.. TOPDIR = ../..
COMPFLAGS ?= COMPFLAGS ?=
RUNTIME_VARIANT ?= RUNTIME_VARIANT ?=

View File

@ -5,6 +5,8 @@
# will not necessarily be ran by GNU make # will not necessarily be ran by GNU make
# The same holds for $< and $@ # The same holds for $< and $@
.NOTPARALLEL:
SOURCES = A.ml B.ml C.ml D.ml SOURCES = A.ml B.ml C.ml D.ml
OBJECTS = lib.cmo $(SOURCES:%.ml=Lib%.cmo) OBJECTS = lib.cmo $(SOURCES:%.ml=Lib%.cmo)
NOBJECTS = $(OBJECTS:%.cmo=%.cmx) NOBJECTS = $(OBJECTS:%.cmo=%.cmx)

View File

@ -5,6 +5,8 @@
# will not necessarily be ran by GNU make # will not necessarily be ran by GNU make
# The same holds for $< and $@ # The same holds for $< and $@
.NOTPARALLEL:
SOURCES = A.ml B.ml C.ml SOURCES = A.ml B.ml C.ml
OBJECTS = $(SOURCES:%.ml=Lib%.cmo) OBJECTS = $(SOURCES:%.ml=Lib%.cmo)
NOBJECTS = $(OBJECTS:%.cmo=%.cmx) NOBJECTS = $(OBJECTS:%.cmo=%.cmx)

View File

@ -12,6 +12,8 @@
#* * #* *
#************************************************************************** #**************************************************************************
.NOTPARALLEL:
TOPDIR = ../.. TOPDIR = ../..
COMPILERLIBSDIR = $(TOPDIR)/compilerlibs COMPILERLIBSDIR = $(TOPDIR)/compilerlibs

View File

@ -20,7 +20,31 @@
@rem Do not call setlocal! @rem Do not call setlocal!
@echo off @echo off
goto %1 if "%1" neq "install" goto %1
setlocal enabledelayedexpansion
echo AppVeyor Environment
for %%K in (ACCOUNT_NAME ACS_DEPLOYMENT_UPGRADE_MODE API_URL
ARTIFACT_UPLOAD_TIMEOUT BUILD_FOLDER BUILD_ID BUILD_NUMBER
BUILD_VERSION BUILD_WORKER_IMAGE BUILD_WORKER_IMAGE
CACHE_ENTRY_UPLOAD_DOWNLOAD_TIMEOUT CACHE_SKIP_RESTORE
CACHE_SKIP_SAVE FILE_DOWNLOAD_TIMEOUT FORCED_BUILD
IGNORE_COMMIT_FILTERING_ON_TAG JOB_ID JOB_NAME JOB_NUMBER PROJECT_ID
PROJECT_NAME PROJECT_SLUG PULL_REQUEST_HEAD_COMMIT
PULL_REQUEST_HEAD_REPO_BRANCH PULL_REQUEST_HEAD_REPO_NAME
PULL_REQUEST_NUMBER PULL_REQUEST_TITLE RE_BUILD REPO_BRANCH
REPO_COMMIT_AUTHOR REPO_COMMIT_AUTHOR_EMAIL REPO_COMMIT
REPO_COMMIT_MESSAGE REPO_COMMIT_MESSAGE_EXTENDED
REPO_COMMIT_TIMESTAMP REPO_NAME REPO_PROVIDER REPO_SCM
REPOSITORY_SHALLOW_CLONE_TIMEOUT REPO_TAG_NAME REPO_TAG
RE_RUN_INCOMPLETE SAVE_CACHE_ON_ERROR SCHEDULED_BUILD
SKIP_FINALIZE_ON_EXIT APPVEYOR URL WAP_ARTIFACT_NAME
WAP_SKIP_ACLS) do echo APPVEYOR_%%K=!APPVEYOR_%%K!
echo CI=%CI%
echo CONFIGURATION=%CONFIGURATION%
echo PLATFORM=%PLATFORM%
endlocal
goto install
goto :EOF goto :EOF

View File

@ -17,6 +17,15 @@ set -e
BUILD_PID=0 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
MAKE=make
fi
function run { function run {
NAME=$1 NAME=$1
shift shift
@ -56,7 +65,12 @@ function set_configuration {
;; ;;
esac 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 FILE=$(pwd | cygpath -f - -m)/Makefile.config
echo "Edit $FILE to turn C compiler warnings into errors" echo "Edit $FILE to turn C compiler warnings into errors"
@ -93,10 +107,10 @@ case "$1" in
set_configuration msvc "$OCAMLROOT-msvc32" -WX set_configuration msvc "$OCAMLROOT-msvc32" -WX
run 'make world' make world run "$MAKE world" $MAKE world
run 'make runtimeopt' make runtimeopt run "$MAKE runtimeopt" $MAKE runtimeopt
run 'make -C otherlibs/systhreads libthreadsnat.lib' \ run "$MAKE -C otherlibs/systhreads libthreadsnat.lib" \
make -C otherlibs/systhreads libthreadsnat.lib $MAKE -C otherlibs/systhreads libthreadsnat.lib
exit 0 exit 0
;; ;;
@ -108,10 +122,11 @@ case "$1" in
"$FULL_BUILD_PREFIX-$PORT/tools/check-symbol-names" \ "$FULL_BUILD_PREFIX-$PORT/tools/check-symbol-names" \
$FULL_BUILD_PREFIX-$PORT/runtime/*.a $FULL_BUILD_PREFIX-$PORT/runtime/*.a
fi fi
run "test $PORT" make -C "$FULL_BUILD_PREFIX-$PORT" tests run "test $PORT" $MAKE -C "$FULL_BUILD_PREFIX-$PORT" tests
run "install $PORT" make -C "$FULL_BUILD_PREFIX-$PORT" install run "install $PORT" $MAKE -C "$FULL_BUILD_PREFIX-$PORT" install
if [[ $PORT = 'msvc64' ]] ; then if [[ $PORT = 'msvc64' ]] ; then
run 'check_all_arches' make -C "$FULL_BUILD_PREFIX-$PORT" check_all_arches run "$MAKE check_all_arches" \
$MAKE -C "$FULL_BUILD_PREFIX-$PORT" check_all_arches
fi fi
;; ;;
*) *)
@ -120,7 +135,7 @@ case "$1" in
if [[ $PORT = 'msvc64' ]] ; then if [[ $PORT = 'msvc64' ]] ; then
tar -xzf "$APPVEYOR_BUILD_FOLDER/flexdll.tar.gz" tar -xzf "$APPVEYOR_BUILD_FOLDER/flexdll.tar.gz"
cd "flexdll-$FLEXDLL_VERSION" cd "flexdll-$FLEXDLL_VERSION"
make MSVC_DETECT=0 CHAINS=msvc64 support $MAKE MSVC_DETECT=0 CHAINS=msvc64 support
cp flexdll*_msvc64.obj "$OCAMLROOT/bin/flexdll/" cp flexdll*_msvc64.obj "$OCAMLROOT/bin/flexdll/"
cd .. cd ..
fi fi
@ -140,16 +155,17 @@ case "$1" in
# For an explanation of the sed command, see # For an explanation of the sed command, see
# https://github.com/appveyor/ci/issues/1824 # https://github.com/appveyor/ci/issues/1824
script --quiet --return --command \ script --quiet --return --command \
"make -C ../$BUILD_PREFIX-mingw32 flexdll world.opt" \ "$MAKE -C ../$BUILD_PREFIX-mingw32 flexdll && "\
"$MAKE -C ../$BUILD_PREFIX-mingw32 world.opt" \
"../$BUILD_PREFIX-mingw32/build.log" | "../$BUILD_PREFIX-mingw32/build.log" |
sed -e 's/\d027\[K//g' \ sed -e 's/\d027\[K//g' \
-e 's/\d027\[m/\d027[0m/g' \ -e 's/\d027\[m/\d027[0m/g' \
-e 's/\d027\[01\([m;]\)/\d027[1\1/g' -e 's/\d027\[01\([m;]\)/\d027[1\1/g'
else else
run 'make world' make world run "$MAKE world" $MAKE world
run 'make bootstrap' make bootstrap run "$MAKE bootstrap" $MAKE bootstrap
run 'make opt' make opt run "$MAKE opt" $MAKE opt
run 'make opt.opt' make opt.opt run "$MAKE opt.opt" $MAKE opt.opt
fi fi
;; ;;