mirror of
https://github.com/libevent/libevent.git
synced 2025-01-31 09:12:55 +08:00
54fdd6bb6e
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).
88 lines
3.0 KiB
YAML
88 lines
3.0 KiB
YAML
version: 2.2.0.{build}
|
|
|
|
os: Visual Studio 2015
|
|
|
|
branches:
|
|
except:
|
|
- /.*travis.*/
|
|
|
|
environment:
|
|
global:
|
|
APPVEYOR_SAVE_CACHE_ON_ERROR: true
|
|
CYG_ROOT: C:/MinGW/msys/1.0
|
|
EVENT_TESTS_PARALLEL: 20
|
|
matrix:
|
|
# !EVENT_ALLOW_FAILURE
|
|
- EVENT_BUILD_METHOD: "cmake"
|
|
EVENT_CMAKE_OPTIONS: ""
|
|
# EVENT_ALLOW_FAILURE
|
|
- EVENT_BUILD_METHOD: "autotools"
|
|
EVENT_CONFIGURE_OPTIONS: ""
|
|
EVENT_ALLOW_FAILURE: 1
|
|
- EVENT_BUILD_METHOD: "autotools"
|
|
EVENT_CONFIGURE_OPTIONS: "--disable-openssl"
|
|
EVENT_ALLOW_FAILURE: 1
|
|
- EVENT_BUILD_METHOD: "autotools"
|
|
EVENT_CONFIGURE_OPTIONS: "--disable-thread-support"
|
|
EVENT_ALLOW_FAILURE: 1
|
|
- EVENT_BUILD_METHOD: "autotools"
|
|
EVENT_CONFIGURE_OPTIONS: "--disable-debug-mode"
|
|
EVENT_ALLOW_FAILURE: 1
|
|
- EVENT_BUILD_METHOD: "autotools"
|
|
EVENT_CONFIGURE_OPTIONS: "--disable-malloc-replacement"
|
|
EVENT_ALLOW_FAILURE: 1
|
|
- EVENT_BUILD_METHOD: "cmake"
|
|
EVENT_CMAKE_OPTIONS: "-DEVENT__DISABLE_OPENSSL=ON"
|
|
EVENT_ALLOW_FAILURE: 1
|
|
- EVENT_BUILD_METHOD: "cmake"
|
|
EVENT_CMAKE_OPTIONS: "-DEVENT__DISABLE_THREAD_SUPPORT=ON"
|
|
EVENT_ALLOW_FAILURE: 1
|
|
- EVENT_BUILD_METHOD: "cmake"
|
|
EVENT_CMAKE_OPTIONS: "-DEVENT__DISABLE_DEBUG_MODE=ON"
|
|
EVENT_ALLOW_FAILURE: 1
|
|
- EVENT_BUILD_METHOD: "cmake"
|
|
EVENT_CMAKE_OPTIONS: "-DEVENT__DISABLE_MM_REPLACEMENT=ON"
|
|
EVENT_ALLOW_FAILURE: 1
|
|
- EVENT_BUILD_METHOD: "cmake"
|
|
EVENT_CMAKE_OPTIONS: "-DCMAKE_C_FLAGS='-DUNICODE -D_UNICODE'"
|
|
EVENT_ALLOW_FAILURE: 1
|
|
|
|
matrix:
|
|
allow_failures:
|
|
- EVENT_ALLOW_FAILURE: 1
|
|
fast_finish: true
|
|
|
|
init:
|
|
- 'echo Building libevent %version% for Windows'
|
|
- 'echo System architecture: %PLATFORM%'
|
|
- 'echo Repo build branch is: %APPVEYOR_REPO_BRANCH%'
|
|
- 'echo Build folder is: %APPVEYOR_BUILD_FOLDER%'
|
|
- 'echo Repo build commit is: %APPVEYOR_REPO_COMMIT%'
|
|
- 'echo Cygwin root is: %CYG_ROOT%'
|
|
install:
|
|
- C:\MinGW\bin\mingw-get install autotools autoconf automake
|
|
build_script:
|
|
- ps: |
|
|
if ($env:EVENT_BUILD_METHOD -eq 'autotools') {
|
|
$env:PATH="$env:CYG_ROOT\bin;C:\MinGW\bin;$($env:PATH)"
|
|
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 && 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-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
|