Skip to content

Commit

Permalink
Update appveyor.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
doadin authored Aug 3, 2024
1 parent 89dfa66 commit 5b98461
Showing 1 changed file with 12 additions and 67 deletions.
79 changes: 12 additions & 67 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,106 +2,51 @@ version: "{build}"
branches:
only:
- master
- RC_2_0
- RC_1_2
- RC_1_1
image: Visual Studio 2017
clone_depth: 1
environment:
matrix:
- variant: debug
compiler: gcc
model: 32
crypto: openssl
ssl_lib: /usr/local/include
ssl_include: /usr/local/lib
lib: 1
- cmake: 1
- variant: release
- variant: test_release
compiler: msvc-14.1
model: 64
python: 1
python_dist: 1
crypto: openssl
ssl_lib: c:\OpenSSL-v111-Win64\lib
ssl_include: c:\OpenSSL-v111-Win64\include
tests: 1
bjam: 1

artifacts:
- path: bindings/python/dist/*
- path: '**\*.pyd'
name: python-module

install:
- git submodule update --init --recursive
- set ROOT_DIRECTORY=%CD%
- cd %ROOT_DIRECTORY%
- if not defined api ( set api="desktop" )
- if not defined compiler ( set compiler="" )
- if not defined crypto ( set crypto=built-in )
- if not defined ssl_lib ( set ssl_lib=c:\ )
- if not defined ssl_include ( set ssl_include=c:\ )
- cd %ROOT_DIRECTORY%
- set BOOST_ROOT=c:\Libraries\boost_1_69_0
- set PYTHON_ROOT=C:\Python37-x64
- set PYTHON_INTERPRETER=C:\Python37-x64\python.exe
- set MSYS_PATH=c:\msys64\mingw32\bin
- set BOOST_ROOT=C:\Libraries\boost_1_69_0
- set BOOST_BUILD_PATH=%BOOST_ROOT%\tools\build
- echo %BOOST_ROOT%
- echo %BOOST_BUILD_PATH%
- set PATH=%PATH%;%BOOST_BUILD_PATH%
- set PATH=%BOOST_ROOT%;%BOOST_BUILD_PATH%;%PYTHON_ROOT%;%MSYS_PATH%;%PATH%
- ps: '"using msvc : 14.1 ;`nusing gcc ;`nusing python : 3.7 : c:\\Python37-x64 : c:\\Python37-x64\\include : c:\\Python37-x64\\libs ;`n" | Set-Content $env:HOMEDRIVE\$env:HOMEPATH\user-config.jam'
- type %HOMEDRIVE%%HOMEPATH%\user-config.jam
- cd %ROOT_DIRECTORY%
- set PATH=c:\msys64\mingw32\bin;%PATH%
- g++ --version
- set PATH=c:\Python37-x64;%PATH%
- set PYTHON_INTERPRETER=c:\Python37-x64\python.exe
- python --version
- echo %ROOT_DIRECTORY%
- cd %BOOST_BUILD_PATH%
- cd %BOOST_ROOT%
- bootstrap.bat >nul
- cd %ROOT_DIRECTORY%

build_script:

# just the library
- cd %ROOT_DIRECTORY%
- if defined lib (
b2.exe --hash openssl-lib=%ssl_lib% openssl-include=%ssl_include% warnings=all warnings-as-errors=on %compiler% address-model=%model% picker-debugging=on invariant-checks=full variant=%variant% link=shared crypto=%crypto% asserts=on export-extra=on windows-api=%api% windows-version=win10 cxxstd=14
)

# test
- cd %ROOT_DIRECTORY%\test
- if defined tests (
b2.exe --hash openssl-lib=%ssl_lib% openssl-include=%ssl_include% warnings=all warnings-as-errors=on %compiler% address-model=%model% picker-debugging=on invariant-checks=full variant=%variant% link=shared crypto=%crypto% asserts=on export-extra=on windows-api=%api% windows-version=win10 testing.execute=off deterministic-tests
)

# python binding
- cd %ROOT_DIRECTORY%\bindings\python
# we use 64 bit python builds
# boost.python itself doesn't build warning free, so we can't build
# with warnings-as-errors
- if defined python (
b2.exe --hash openssl-lib=%ssl_lib% openssl-include=%ssl_include% warnings=all %compiler% address-model=%model% picker-debugging=on invariant-checks=full variant=%variant% link=shared crypto=%crypto% asserts=on export-extra=on windows-api=%api% windows-version=win10 libtorrent-link=shared stage_module stage_dependencies
b2.exe --hash openssl-version=pre1.1 warnings=all -j %NUMBER_OF_PROCESSORS% %compiler% address-model=%model% variant=%variant% runtime-link=static link=static libtorrent-link=static boost-link=static crypto=%crypto% asserts=on export-extra=on dht=on stage_module stage_dependencies
)
- if defined python_dist (
c:\Python37-x64\python.exe setup.py bdist --format=msi
)

# minimal support for cmake build
# we need to build the boost libraries we use with C++14
# and stage it for cmake to pick up
- if defined cmake (
cd %BOOST_ROOT% &&
bjam cxxstd=14 release --with-python --with-system --layout=system address-model=64 link=shared stage &&
cd %ROOT_DIRECTORY% &&
mkdir build &&
cd build &&
cmake -DBOOST_LIBRARYDIR=%BOOST_ROOT%\stage\lib -DCMAKE_CXX_STANDARD=14 -Dbuild_tests=ON -Dbuild_examples=ON -Dbuild_tools=ON -Dpython-bindings=%python% -Dboost-python-module-name="python" -Dskip-python-runtime-test=true -DPython_ADDITIONAL_VERSIONS="2.7" -G "Visual Studio 15 2017" -A x64 .. &&
cmake --build . --config Release --parallel %NUMBER_OF_PROCESSORS% -- -verbosity:minimal
)

test_script:
- cd %ROOT_DIRECTORY%\test
- if defined tests (
appveyor-retry b2.exe -l500 --hash openssl-lib=%ssl_lib% openssl-include=%ssl_include% warnings=all warnings-as-errors=on %compiler% address-model=%model% picker-debugging=on invariant-checks=full variant=%variant% link=shared crypto=%crypto% asserts=on export-extra=on windows-api=%api% windows-version=win10 deterministic-tests
)

- if defined cmake (
appveyor-retry ctest
)

0 comments on commit 5b98461

Please sign in to comment.