Files
SourcetrailDB/appveyor.yml
T

83 lines
2.7 KiB
YAML

version: 0.0.0.{build}
image: Visual Studio 2017
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:
- mkdir build
- cd build
- cmake -G "%CMAKE_GENERATOR%" ../ -DBUILD_BINDINGS_PYTHON=ON -DPYTHON_INCLUDE_DIRS="%PYTHON_PATH%/include" -DPYTHON_INCLUDE_DIRS="%PYTHON_PATH%/include" -DPYTHON_LIBRARIES="%PYTHON_PATH%/libs/python37.lib"
- cd ../
build_script:
- cd build
- msbuild /p:configuration=Release /v:m ALL_BUILD.vcxproj
- cd ../
after_build:
- mkdir artifacts_core
- cd artifacts_core
- mkdir lib
- mkdir include
- mkdir license
- cd ..
- ps: |
copy build/core/release/sourcetraildb.lib artifacts_core/lib/
copy build/core/include/version.h artifacts_core/include/
copy core/include/* artifacts_core/include/
copy LICENSE.txt artifacts_core/license/license_sourcetraildb.txt
copy external/catch/license_catch.txt artifacts_core/license/
copy external/cpp_sqlite/license_cpp_sqlite.txt artifacts_core/license/
copy external/json/license_json.txt artifacts_core/license/
- mkdir artifacts_bindings_python
- cd artifacts_bindings_python
- mkdir license
- cd ..
- ps: |
copy build/bindings_python/release/_sourcetraildb.pyd artifacts_bindings_python/
copy build/bindings_python/release/sourcetraildb.py artifacts_bindings_python/
copy LICENSE.txt artifacts_bindings_python/license/license_sourcetraildb.txt
copy external/catch/license_catch.txt artifacts_bindings_python/license/
copy external/cpp_sqlite/license_cpp_sqlite.txt artifacts_bindings_python/license/
copy external/json/license_json.txt artifacts_bindings_python/license/
test_script:
- "build\\core\\release\\test_core.exe"
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