-
Notifications
You must be signed in to change notification settings - Fork 87
/
appveyor.yml
132 lines (119 loc) · 5.21 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# Build worker image (VM template)
image:
- Ubuntu1604
- Ubuntu1804
- Ubuntu2004
- Visual Studio 2017
- Visual Studio 2019
platform: x64
configuration: Release
for:
-
matrix:
only:
- image: Ubuntu1604
clone_folder: ~/pbcvt
init:
- sh: export REQUESTED_PYTHON_VERSION=2.X
test_script:
- sh: cd $APPVEYOR_BUILD_FOLDER/tests
- python -m pytest tests.py
-
matrix:
only:
- image: Ubuntu1804
clone_folder: ~/pbcvt
init:
- sh: export REQUESTED_PYTHON_VERSION=3.X
test_script:
- sh: cd $APPVEYOR_BUILD_FOLDER/tests
- python3 -m pytest tests.py
-
matrix:
only:
- image: Ubuntu2004
clone_folder: ~/pbcvt
init:
- sh: export REQUESTED_PYTHON_VERSION=3.X
test_script:
- sh: cd $APPVEYOR_BUILD_FOLDER/tests
- python3 -m pytest tests.py
-
matrix:
only:
- image: Visual Studio 2017
clone_folder: c:\projects\pbcvt
test_script:
- cmd: cd %APPVEYOR_BUILD_FOLDER%/tests
- python -m pytest tests.py
-
matrix:
only:
- image: Visual Studio 2019
clone_folder: c:\projects\pbcvt
test_script:
- cmd: cd %APPVEYOR_BUILD_FOLDER%/tests
- python -m pytest tests.py
init:
# Windows 10
# skip unsupported combinations
- cmd: set REQUESTED_PYTHON_VERSION=3.X
- cmd: set arch=
- cmd: ECHO on
- cmd: if "%PLATFORM%"=="x64" ( set arch=Win64)
- cmd: echo %arch%
- cmd: echo %APPVEYOR_BUILD_WORKER_IMAGE%
- cmd: set VC2019ARCH=
# VS 2019
- cmd: if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2019" ( set VC2019ARCH=-A "x64" )
- cmd: if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2019" ( set CMAKE_GENERATOR="Visual Studio 16 2019" )
- cmd: if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2019" ( call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat" )
- cmd: if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2019" ( set BOOST_ROOT2="C:\projects\boost_1_73")
- cmd: if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2019" ( set Boost_DIR="%BOOST_ROOT2%\lib\cmake\Boost-1.73.0" )
# VS 2017
- cmd: if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2017" ( set CMAKE_GENERATOR="Visual Studio 15 2017 %arch%" )
- cmd: if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2017" ( call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat" )
# Diagnostics
- cmd: echo %CMAKE_GENERATOR%
- cmd: cmake --version
- cmd: msbuild /version
# scripts that run after cloning repository
install:
# Windows
# VS 2019
- cmd: if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2019" ( mkdir %BOOST_ROOT2% )
- cmd: "if \"%APPVEYOR_BUILD_WORKER_IMAGE%\"==\"Visual Studio 2019\" ( echo using python : 3.7 : C:\\\\Python37-x64\\\\python.exe ; > %BOOST_ROOT2%\\user-config.jam )"
- cmd: if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2019" ( cd "C:\Libraries\boost_1_73_0" && bootstrap )
- cmd: if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2019" ( cd "C:\Libraries\boost_1_73_0" && b2 --user-config=%BOOST_ROOT2%\\user-config.jam python=3.7 toolset=msvc-14.2 release debug runtime-link=shared link=static --build-type=complete --abbreviate-paths architecture=x86 address-model=64 --with-python install -j4 -d0 --prefix=%BOOST_ROOT2%)
# All Windows Images
- cmd: choco install -y opencv
- cmd: set PATH=C:\tools\opencv\build\bin;C:\tools\opencv\build\x64\vc15\bin;C:\Python37-x64;C:\Python37-x64\Scripts;%PATH%
- cmd: set OpenCV_DIR=C:\tools\opencv\build\x64\vc15\lib
# install numpy & pytest
- cmd: pip install numpy pytest
# Ubuntu (all)
- sh: sudo DEBIAN_FRONTEND=noninteractive apt-get update -qq && sudo apt-get install -qq
- sh: sudo DEBIAN_FRONTEND=noninteractive apt-get -y install python3-dev python3-numpy python3-pytest
- sh: sudo DEBIAN_FRONTEND=noninteractive apt-get -y install python-dev python-numpy python-pytest
- sh: sudo DEBIAN_FRONTEND=noninteractive apt-get -y install libboost-python-dev
- sh: sudo DEBIAN_FRONTEND=noninteractive apt-get -y install libtbb-dev libopencv-dev
build_script:
# Windows 10
- cmd: cd %APPVEYOR_BUILD_FOLDER%
- cmd: mkdir build
- cmd: cd build
- cmd: cmake --version
- cmd: if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2017" ( cmake .. -G %CMAKE_GENERATOR% -DCMAKE_BUILD_TYPE=%Configuration% -DBUILD_TEST_PROJECT=ON -DPYTHON_DESIRED_VERSION=%REQUESTED_PYTHON_VERSION% -DBOOST_ROOT=C:\Libraries\boost_1_69_0 )
- cmd: if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2019" ( cmake .. -G %CMAKE_GENERATOR% %VC2019ARCH% -DCMAKE_BUILD_TYPE=%Configuration% -DBUILD_TEST_PROJECT=ON -DPYTHON_DESIRED_VERSION=%REQUESTED_PYTHON_VERSION% -DBoost_DIR=C:\projects\boost_1_73\lib\cmake\Boost-1.73.0 )
- cmd: cmake --build . --target ALL_BUILD --config %Configuration% -- /maxcpucount:4
# Ubuntu (all)
- sh: echo Ubuntu build script
- sh: echo Requested python version -
- sh: echo $REQUESTED_PYTHON_VERSION
- sh: mkdir build; cd build
- sh: cmake -DCMAKE_BUILD_TYPE=$Configuration -DBUILD_TEST_PROJECT=ON -DPYTHON_DESIRED_VERSION=$REQUESTED_PYTHON_VERSION ..
- sh: make -j4
#build:
# project: c:\projects\pbcvt\build\pbcvt.sln
# verbosity: minimal
# parallel: true