From cb8b6f17b25569a182d35d36f9c933eef151ccda Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Mon, 5 Nov 2018 17:04:47 +0300 Subject: [PATCH] appveyor: cache build directory to reduce overall time (6x time faster) various build checks (i.e. detecting headers/macroses/functions) takes 7 minutes (from 13 minutes in total) for cmake, which is too high. By using cache we can reduce this to ~0. And set APPVEYOR_SAVE_CACHE_ON_ERROR so that cmake checks will be cached (anyway all sources will be built from scratch due to timestamp updates while extracting from sources). (cherry picked from commit 54fdd6bb6ebe6b0a672c79d30a712d97536500c8) --- appveyor.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index f51e9afa..81fbe3da 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -8,6 +8,7 @@ branches: environment: global: + APPVEYOR_SAVE_CACHE_ON_ERROR: true CYG_ROOT: C:/MinGW/msys/1.0 EVENT_TESTS_PARALLEL: 20 matrix: @@ -67,16 +68,20 @@ build_script: bash -lc "echo 'C:\MinGW /mingw' > /etc/fstab" bash -lc "echo 'C:\OpenSSL-Win32 /ssl' >> /etc/fstab" $env:APPVEYOR_BUILD_FOLDER = $env:APPVEYOR_BUILD_FOLDER -replace "\\", "/" - bash -lc "exec 0&1; cd $env:APPVEYOR_BUILD_FOLDER; bash -x ./autogen.sh && ./configure LDFLAGS='-L/ssl -L/ssl/lib -L/ssl/lib/MinGW' CFLAGS=-I/ssl/include $env:EVENT_CONFIGURE_OPTIONS && make && make verify -j$env:EVENT_TESTS_PARALLEL" + bash -lc "exec 0&1; cd $env:APPVEYOR_BUILD_FOLDER; bash -x ./autogen.sh && mkdir -p build-autotools && cd build-autotools && ../configure LDFLAGS='-L/ssl -L/ssl/lib -L/ssl/lib/MinGW' CFLAGS=-I/ssl/include $env:EVENT_CONFIGURE_OPTIONS && make && make verify -j$env:EVENT_TESTS_PARALLEL" } else { - md build - cd build + md build-cmake 2> $null + cd build-cmake cmake .. $env:EVENT_CMAKE_OPTIONS cmake --build . $env:CTEST_PARALLEL_LEVEL=$env:EVENT_TESTS_PARALLEL ctest --output-on-failure } +cache: + - build-cmake + - build-autotools + on_failure: - 7z a libevent.zip . - appveyor PushArtifact libevent.zip