mirror of
https://github.com/libevent/libevent.git
synced 2025-01-09 00:56:20 +08:00
ea12428db6
After update [1] of the Visual Studio 2019 image cmake unable to find path to the c compiler [2]: cmake : CMake Error at CMakeLists.txt:47 (project): At line:1 char:1 + cmake -G 'Visual Studio 16 2019' -A x64 .. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (CMake Error at ...t:47 (project)::String) [], RemoteException + FullyQualifiedErrorId : NativeCommandError The CMAKE_C_COMPILER: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.23.28105/bin/Hostx64/x64/cl.exe is not a full path to an existing compiler tool. [1]: https://github.com/appveyor/ci/issues/3231 https://www.appveyor.com/updates/2019/12/09/ [2]: https://ci.appveyor.com/project/libevent/libevent/builds/29431286/job/a68h7dn9rcride9g
155 lines
5.5 KiB
YAML
155 lines
5.5 KiB
YAML
---
|
|
version: 2.2.0.{build}
|
|
|
|
os:
|
|
- Visual Studio 2017
|
|
- Previous Visual Studio 2019
|
|
platform:
|
|
- x64
|
|
|
|
branches:
|
|
except:
|
|
- /.*travis.*/
|
|
- /.*linux.*/
|
|
- /.*freebsd.*/
|
|
- /.*osx.*/
|
|
- /.*bitrise.*/
|
|
skip_commits:
|
|
message: /travis/
|
|
files:
|
|
- .travis.yml
|
|
|
|
environment:
|
|
global:
|
|
APPVEYOR_SAVE_CACHE_ON_ERROR: true
|
|
OPENSSL_ROOT: C:/OpenSSL-Win64
|
|
PYTHON3: C:/Python37-x64/python.exe
|
|
MPATH: C:/mingw-w64/x86_64-7.2.0-posix-seh-rt_v5-rev1/mingw64/bin;C:/msys64/usr/bin
|
|
# Do not run tests in parallel to reduce false-positive
|
|
EVENT_TESTS_PARALLEL: 1
|
|
EVENT_BUILD_PARALLEL: 10
|
|
matrix:
|
|
- EVENT_BUILD_METHOD: "cmake"
|
|
EVENT_CMAKE_OPTIONS: ""
|
|
APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2017"
|
|
- EVENT_BUILD_METHOD: "cmake"
|
|
EVENT_CMAKE_OPTIONS: "-DEVENT__LIBRARY_TYPE=STATIC"
|
|
APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2017"
|
|
- EVENT_BUILD_METHOD: "autotools"
|
|
EVENT_CONFIGURE_OPTIONS: ""
|
|
APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2017"
|
|
- EVENT_BUILD_METHOD: "autotools"
|
|
EVENT_CONFIGURE_OPTIONS: "--disable-openssl"
|
|
APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2017"
|
|
- EVENT_BUILD_METHOD: "autotools"
|
|
EVENT_CONFIGURE_OPTIONS: "--disable-thread-support"
|
|
APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2017"
|
|
- EVENT_BUILD_METHOD: "autotools"
|
|
EVENT_CONFIGURE_OPTIONS: "--disable-debug-mode"
|
|
APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2017"
|
|
- EVENT_BUILD_METHOD: "autotools"
|
|
EVENT_CONFIGURE_OPTIONS: "--disable-malloc-replacement"
|
|
APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2017"
|
|
- EVENT_BUILD_METHOD: "cmake"
|
|
EVENT_CMAKE_OPTIONS: "-DEVENT__DISABLE_OPENSSL=ON"
|
|
APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2017"
|
|
- EVENT_BUILD_METHOD: "cmake"
|
|
EVENT_CMAKE_OPTIONS: "-DEVENT__DISABLE_THREAD_SUPPORT=ON"
|
|
APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2017"
|
|
- EVENT_BUILD_METHOD: "cmake"
|
|
EVENT_CMAKE_OPTIONS: "-DEVENT__DISABLE_DEBUG_MODE=ON"
|
|
APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2017"
|
|
- EVENT_BUILD_METHOD: "cmake"
|
|
EVENT_CMAKE_OPTIONS: "-DEVENT__DISABLE_MM_REPLACEMENT=ON"
|
|
APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2017"
|
|
- EVENT_BUILD_METHOD: "cmake"
|
|
EVENT_CMAKE_OPTIONS: "-DCMAKE_C_FLAGS='-DUNICODE -D_UNICODE'"
|
|
APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2017"
|
|
- EVENT_BUILD_METHOD: "cmake"
|
|
EVENT_CMAKE_OPTIONS: ""
|
|
APPVEYOR_BUILD_WORKER_IMAGE: "Previous Visual Studio 2019"
|
|
- EVENT_BUILD_METHOD: "cmake"
|
|
EVENT_CMAKE_OPTIONS: "-DEVENT__DISABLE_TESTS=ON -DEVENT__DISABLE_SAMPLES=ON"
|
|
APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2017"
|
|
TEST_EXPORT: "SHARED"
|
|
- EVENT_BUILD_METHOD: "cmake"
|
|
EVENT_CMAKE_OPTIONS: "-DEVENT__LIBRARY_TYPE=STATIC -DEVENT__DISABLE_TESTS=ON -DEVENT__DISABLE_SAMPLES=ON"
|
|
APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2017"
|
|
TEST_EXPORT: "STATIC"
|
|
|
|
matrix:
|
|
exclude:
|
|
- os: Previous Visual Studio 2019
|
|
APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2017"
|
|
- os: Visual Studio 2017
|
|
APPVEYOR_BUILD_WORKER_IMAGE: "Previous Visual Studio 2019"
|
|
fast_finish: true
|
|
|
|
init:
|
|
- 'echo Repo build branch is: %APPVEYOR_REPO_BRANCH%'
|
|
- 'echo Build folder is: %APPVEYOR_BUILD_FOLDER%'
|
|
- 'echo Repo build commit is: %APPVEYOR_REPO_COMMIT%'
|
|
- 'echo PATH is: %PATH%'
|
|
|
|
build_script:
|
|
- ps: |
|
|
if ($env:EVENT_BUILD_METHOD -eq 'autotools') {
|
|
$env:PATH="$env:MPATH;$env:OPENSSL_ROOT/bin;$env:PATH"
|
|
$env:LDFLAGS="-L$($env:OPENSSL_ROOT)/lib -L$($env:OPENSSL_ROOT)"
|
|
$env:CFLAGS="-I$($env:OPENSSL_ROOT)/include"
|
|
|
|
$script='
|
|
./autogen.sh 2>&1 3>&1
|
|
[[ $? -ne 0 ]] && exit 1
|
|
|
|
mkdir build-autotools 2>/dev/null
|
|
cd build-autotools
|
|
[[ $? -ne 0 ]] && exit 1
|
|
|
|
../configure $EVENT_CONFIGURE_OPTIONS 2>&1
|
|
[[ $? -ne 0 ]] && exit 1
|
|
make -j $EVENT_BUILD_PARALLEL 2>&1
|
|
[[ $? -ne 0 ]] && exit 1
|
|
make verify -j $EVENT_TESTS_PARALLEL 2>&1 '
|
|
|
|
bash -c $script
|
|
|
|
} else {
|
|
$env:PATH="$env:OPENSSL_ROOT/bin;$env:PATH"
|
|
if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq 'Visual Studio 2017') {
|
|
$env:BUILD_DIR="build-cmake"
|
|
}
|
|
if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq 'Previous Visual Studio 2019') {
|
|
$env:BUILD_DIR="build-cmake-vs2019"
|
|
}
|
|
md $env:BUILD_DIR 2> $null
|
|
cd $env:BUILD_DIR
|
|
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
|
|
if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq 'Visual Studio 2017') {
|
|
$env:cmake_cmd="cmake -G 'Visual Studio 15 2017 Win64' .. $env:EVENT_CMAKE_OPTIONS"
|
|
}
|
|
if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq 'Previous Visual Studio 2019') {
|
|
$env:cmake_cmd="cmake -G 'Visual Studio 16 2019' -A x64 .. $env:EVENT_CMAKE_OPTIONS"
|
|
}
|
|
Invoke-Expression $env:cmake_cmd
|
|
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
|
|
cmake --build . -j $env:EVENT_BUILD_PARALLEL -- /nologo /verbosity:minimal
|
|
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
|
|
if ($env:TEST_EXPORT -eq 'STATIC') {
|
|
&$env:PYTHON3 ../test-export/test-export.py static
|
|
} elseif ($env:TEST_EXPORT -eq 'SHARED') {
|
|
&$env:PYTHON3 ../test-export/test-export.py shared
|
|
} else {
|
|
ctest --output-on-failure -j $env:EVENT_TESTS_PARALLEL
|
|
}
|
|
}
|
|
|
|
cache:
|
|
- build-cmake
|
|
- build-cmake-vs2019
|
|
- build-autotools
|
|
|
|
on_failure:
|
|
- 7z a libevent.zip .
|
|
- appveyor PushArtifact libevent.zip
|