add support for appveyor 64 bit windows builds

This commit is contained in:
mlangkabel
2018-12-03 13:52:50 +01:00
parent a3da0edf1e
commit 6daaff9dab
+47 -25
View File
@@ -1,59 +1,81 @@
version: 0.0.0.{build}
image: Visual Studio 2017
# TODO use "Visual Studio 15 2017 Win64" for 64 bit builds
artifacts:
- path: artifacts_core
name: sourcetraildb_core_windows_32bit_$(appveyor_build_version)
type: Zip
- path: artifacts_bindings_python
name: sourcetrailbd_python_windows_32bit_$(appveyor_build_version)
type: Zip
environment:
matrix:
- ARCHITECTURE: 32bit
PYTHON_PATH: C:/Python37
- ARCHITECTURE: 64bit
PYTHON_PATH: C:/Python37-x64
install:
- ps: |
if ($env:ARCHITECTURE -eq "32bit") {
echo "Architecture set to 32 bit."
$env:CMAKE_GENERATOR="Visual Studio 15 2017"
} elseif ($env:ARCHITECTURE -eq "64bit") {
echo "Architecture set to 64 bit."
$env:CMAKE_GENERATOR="Visual Studio 15 2017 Win64"
} else {
echo "No architecture set. Falling back to 32 bit build."
$env:ARCHITECTURE="32bit"
$env:CMAKE_GENERATOR="Visual Studio 15 2017"
}
# Install SWIG by Choco
choco install -y --no-progress swig
before_build:
# Setup core project
- cd core
- mkdir build
- cd build
- mkdir 32bit
- cd 32bit
- cmake -G "Visual Studio 15 2017" ../..
- mkdir %ARCHITECTURE%
- cd %ARCHITECTURE%
- cmake -G "%CMAKE_GENERATOR%" ../..
- cd ../../..
# Setup bindings_python project
- cd bindings_python
- mkdir build
- cd build
- mkdir 32bit
- cd 32bit
- cmake -G "Visual Studio 15 2017" ../.. -DPYTHON_INCLUDE_DIRS="C:/Python37/include" -DPYTHON_LIBRARIES="C:/Python37/libs/python37.lib"
- mkdir %ARCHITECTURE%
- cd %ARCHITECTURE%
- cmake -G "%CMAKE_GENERATOR%" ../.. -DPYTHON_INCLUDE_DIRS="%PYTHON_PATH%/include" -DPYTHON_LIBRARIES="%PYTHON_PATH%/libs/python37.lib"
- cd ../../..
build_script:
- cd core/build/32bit
- cd core/build/%ARCHITECTURE%
- msbuild /p:configuration=Release /v:m ALL_BUILD.vcxproj
- cd ../../..
- cd bindings_python/build/32bit
- cd bindings_python/build/%ARCHITECTURE%
- msbuild /p:configuration=Release /v:m ALL_BUILD.vcxproj
- cd ../../..
after_build:
- mkdir artifacts_core
- cd artifacts_core
- mkdir lib
- mkdir include
- cd ..
- cd ..
- ps: |
copy core/build/32bit/release/sourcetraildb.lib artifacts_core/lib/
copy core/build/32bit/include/version.h artifacts_core/include/
copy core/build/$env:ARCHITECTURE/release/sourcetraildb.lib artifacts_core/lib/
copy core/build/$env:ARCHITECTURE/include/version.h artifacts_core/include/
copy core/include/* artifacts_core/include/
- mkdir artifacts_bindings_python
- ps: |
copy bindings_python/build/32bit/release/_sourcetraildb.pyd artifacts_bindings_python/
copy bindings_python/build/32bit/release/sourcetraildb.py artifacts_bindings_python/
- echo All done!
copy bindings_python/build/$env:ARCHITECTURE/release/_sourcetraildb.pyd artifacts_bindings_python/
copy bindings_python/build/$env:ARCHITECTURE/release/sourcetraildb.py artifacts_bindings_python/
artifacts:
- path: artifacts_core
name: sourcetraildb_core_windows_%ARCHITECTURE%_$(appveyor_build_version)
type: Zip
- path: artifacts_bindings_python
name: sourcetrailbd_python_windows_%ARCHITECTURE%_$(appveyor_build_version)
type: Zip