diff --git a/appveyor.yml b/appveyor.yml index 1c817d89..1f153982 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -16,20 +16,24 @@ configuration: - Debug environment: - ZMQ_VERSION: 4.2.5 + ZMQ_VER: 4.2.5 + +cache: + - libzmq-%ZMQ_VER% -> appveyor.yml before_build: - - appveyor DownloadFile https://github.com/zeromq/libzmq/archive/v%ZMQ_VERSION%.zip - - 7z x v%ZMQ_VERSION%.zip >NUL - - cmake -H./libzmq-%ZMQ_VERSION% -BBuild-libzmq -DENABLE_DRAFTS=ON -DWITH_PERF_TOOL=OFF -DZMQ_BUILD_TESTS=OFF -DENABLE_CPACK=OFF -A%PLATFORM% - - cmake --build Build-libzmq - - cmake -H. -BBuild -DCMAKE_PREFIX_PATH=./Build-libzmq -A%PLATFORM% + - if not exist libzmq-%ZMQ_VER% ( + appveyor DownloadFile https://github.com/zeromq/libzmq/archive/v%ZMQ_VER%.zip && + 7z x v%ZMQ_VER%.zip >NUL && + cmake -H./libzmq-%ZMQ_VER% -Blibzmq-%ZMQ_VER%/build -DENABLE_DRAFTS=ON -DWITH_PERF_TOOL=OFF -DZMQ_BUILD_TESTS=OFF -DENABLE_CPACK=OFF -A%PLATFORM% && + cmake --build libzmq-%ZMQ_VER%/build) + - cmake -H. -BBuild -DCMAKE_PREFIX_PATH=./libzmq-%ZMQ_VER%/build -A%PLATFORM% build: project: Build/cppzmq.sln verbosity: normal test_script: - - cp Build-libzmq/bin/%configuration%/libzmq*.dll Build/bin/%configuration%/ + - cp libzmq-%ZMQ_VER%/build/bin/%configuration%/libzmq*.dll Build/bin/%configuration%/ - cd Build - ctest -V -C %configuration%