Merge pull request #13 from henriquegemignani/feature/appveyor

Add appveyor.yml
This commit is contained in:
Jack Andersen 2019-11-17 12:56:26 -10:00 committed by GitHub
commit 56ecceb9b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 52 additions and 10 deletions

41
appveyor.yml Normal file
View File

@ -0,0 +1,41 @@
image: Visual Studio 2017
clone_folder: c:\pwe
cache:
- .dew -> dewfile.json
branches:
except:
- gh-pages
- travis
environment:
MSVC_SETUP_PATH: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat
MSVC_SETUP_ARG: x64
LLVM_URL: http://releases.llvm.org/6.0.1/LLVM-6.0.1-win64.exe
PYTHON: C:\\Python37-x64
QT_PATH: C:\\Qt\\5.12\\msvc2017_64
CONFIGURATION: Debug
install:
- cd %APPVEYOR_BUILD_FOLDER%
- git submodule update --init --recursive
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
- python --version
- appveyor DownloadFile %LLVM_URL% -FileName llvm-installer.exe
- start /WAIT llvm-installer.exe /S /D=C:\"Program Files\LLVM"
before_build:
- call "%MSVC_SETUP_PATH%" %MSVC_SETUP_ARG%
build_script:
- cd c:\pwe
- cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=%QT_PATH%\lib\cmake\Qt5 -Bbuild .
- cmake --build build
artifacts:
- path: build/bin
name: binaries

View File

@ -17,6 +17,15 @@ function(integrate_dew)
return() return()
endif() endif()
#
# Acquaint CMake with dew prefix
#
if ("${CMAKE_BUILD_TYPE}" STREQUAL Debug)
set(dew_cmake_prefix_suffix debug)
else()
set(dew_cmake_prefix_suffix release)
endif()
# #
# Run dew update # Run dew update
# #
@ -32,22 +41,14 @@ function(integrate_dew)
message(FATAL_ERROR "Failed to install dew with pip: result: ${install_dew_result}.") message(FATAL_ERROR "Failed to install dew with pip: result: ${install_dew_result}.")
endif() endif()
message(STATUS "Building dew dependencies") message(STATUS "Building dew dependencies")
execute_process(COMMAND "${Python3_EXECUTABLE}" -m dew update WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" execute_process(COMMAND "${Python3_EXECUTABLE}" -m dew update --build-type ${dew_cmake_prefix_suffix}
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
RESULT_VARIABLE dew_res) RESULT_VARIABLE dew_res)
if(NOT dew_res EQUAL 0) if(NOT dew_res EQUAL 0)
message(FATAL_ERROR "Unable to run dew: ${dew_res}") message(FATAL_ERROR "Unable to run dew: ${dew_res}")
endif() endif()
endif() endif()
#
# Acquaint CMake with dew prefix
#
if ("${CMAKE_BUILD_TYPE}" STREQUAL Debug)
set(dew_cmake_prefix_suffix debug)
else()
set(dew_cmake_prefix_suffix release)
endif()
set(dew_output_path "${CMAKE_CURRENT_SOURCE_DIR}/.dew") set(dew_output_path "${CMAKE_CURRENT_SOURCE_DIR}/.dew")
set(dew_cmake_prefix_path "${dew_output_path}/prefix-${dew_cmake_prefix_suffix}") set(dew_cmake_prefix_path "${dew_output_path}/prefix-${dew_cmake_prefix_suffix}")
set(dew_cmake_module_path "${dew_cmake_prefix_path}/share/cmake/Modules") set(dew_cmake_module_path "${dew_cmake_prefix_path}/share/cmake/Modules")