mirror of
https://github.com/cuberite/libevent.git
synced 2025-08-04 01:36:23 -04:00
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)
This commit is contained in:
parent
2ffa59da04
commit
cb8b6f17b2
11
appveyor.yml
11
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</dev/null; exec 2>&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</dev/null; exec 2>&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
|
||||
|
Loading…
x
Reference in New Issue
Block a user