forked from Universite-Gustave-Eiffel/I-Simpa
-
Notifications
You must be signed in to change notification settings - Fork 1
/
appveyor.yml
112 lines (99 loc) · 5.32 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
# specify custom environment variables
environment:
matrix:
- VisualStudioVersion: 14.3
platform: x64
configuration: Release
vcvarsall_platform: "x64"
global:
MSVC_DEFAULT_OPTIONS: ON
BOOST_ROOT: C:\Libraries\boost_1_78_0
#BOOST_LIBRARYDIR: C:\Libraries\boost_1_73_0\lib64-msvc-14.2
Python3_ROOT_DIR: C:\Python310-x64
Python3_LIBRARY_RELEASE: C:\Python310-x64\libs\python310.lib
WXWIN: C:\wxWidgets-3.2.0\
wxWidgets_ROOT_DIR: C:\wxWidgets-3.2.0
wxWidgets_INCLUDE_DIRS: C:\wxWidgets-3.2.0\include
wxWidgets_LIBRARIES: C:\wxWidgets-3.2.0\lib\vc14x_x64_dll
SWIG_DIR: C:\ProgramData\chocolatey\lib\swig\tools
#SWIG_EXECUTABLE: C:\Libraries\swigwin-3.0.11\swig.exe
CTEST_OUTPUT_ON_FAILURE: 1
# branches to build
branches:
# whitelist
only:
- master
# Operating system (build VM template)
os: Visual Studio 2022
# scripts that are called at very beginning, before repo cloning
init:
- git config --global core.autocrlf input
# clone directory
clone_folder: c:\projects\isimpa
platform: x64
configuration: Release
# scripts to run before build
before_build:
- ps: git rev-parse HEAD
# msbuild will use x64 visual studio compiler
- '"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat"'
# Copy x64 dll from system32 to python27 x64
#- cmd: copy c:\windows\system32\PYTHON27.DLL C:\Python27-x64\python27.dll
- echo Download wxWidgets lib
- ps: Start-FileDownload 'https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.0/wxWidgets-3.2.0.7z'
- ps: Start-FileDownload 'https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.0/wxMSW-3.2.0_vc14x_x64_Dev.7z'
- cmd: 7z x -aoa wxWidgets-3.2.0.7z -oC:\wxWidgets-3.2.0
- cmd: 7z x -aoa wxMSW-3.2.0_vc14x_x64_Dev.7z -oC:\wxWidgets-3.2.0
- cmd: dir %wxWidgets_LIBRARIES%
# Download Release wxWidgets DLL's
- ps: Start-FileDownload 'https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.0/wxMSW-3.2.0_vc14x_x64_ReleaseDLL.7z' -Timeout 15000
- cmd: 7z x -aoa wxMSW-3.2.0_vc14x_x64_ReleaseDLL.7z -oC:\wxWidgets-3.2.0
# install dependencies:
- choco install poedit nsis 7zip.install
#- ps: Start-FileDownload 'https://github.com/nicolas-f/build_resources/raw/master/swigwin-3.0.11.zip' -FileName 'c:\Libraries\swigwin-3.0.11.zip' -Timeout 15000
#- ps: 7z x c:\Libraries\swigwin-3.0.11.zip -oC:\Libraries -r -y
- choco install swig
- cmd: SET PATH=%PATH%;%WXWIN%;%SWIG_DIR%;%wxWidgets_LIB_DIR%;C:\Program Files (x86)\Poedit\Gettexttools\bin;%BOOST_LIBRARYDIR%;
- ps: swig.exe -version
- echo Running cmake...
- cmd: mkdir c:\projects\isimpa\build
- cmd: cd c:\projects\isimpa\build
- cmd: echo wxWidgets_CONFIGURATION:STRING=mswu > CMakeCache.txt
- cmd: echo wxWidgets_LIB_DIR:PATH=%wxWidgets_LIBRARIES% >> CMakeCache.txt
- cmd: echo wxWidgets_ROOT_DIR:PATH=%wxWidgets_ROOT_DIR% >> CMakeCache.txt
- cmd: echo WX_LIB_DIR:INTERNAL=%wxWidgets_LIBRARIES% >> CMakeCache.txt
- cmd: echo WX_ROOT_DIR:INTERNAL=%wxWidgets_ROOT_DIR% >> CMakeCache.txt
- cmd: echo PYTHON_EXECUTABLE:FILEPATH=%PYTHON_EXECUTABLE% >> CMakeCache.txt
- cmd: echo Python_ROOT_DIR:PATH=%Python3_ROOT_DIR% >> CMakeCache.txt
- cmd: echo Python3_ROOT_DIR:PATH=%Python3_ROOT_DIR% >> CMakeCache.txt
- cmake --debug-output -G "Visual Studio 17 2022" -A x64 c:\projects\isimpa
build_script:
- cd c:\projects\isimpa\build
- ECHO Building %configuration% %platform% with MSVC %VisualStudioVersion% using %PlatformToolset% PlatformToolset
- dir
- 'call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat"'
- msbuild "INSTALL.vcxproj" /consoleloggerparameters:Verbosity=minimal /target:Build /p:Configuration=%configuration% /p:Platform=%platform% /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
after_build:
- cd c:\projects\isimpa\build
- ECHO Package I-SIMPA %configuration% %platform% with MSVC %VisualStudioVersion% using %PlatformToolset% PlatformToolset
- msbuild "PACKAGE.vcxproj" /consoleloggerparameters:Verbosity=minimal /target:Build /p:Configuration=%configuration% /p:Platform=%platform% /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
# Test script disabled, don't know why python can't find libsimpa under Appveyor
test_script:
# Skip DLL/LIBS listing, uncomment for debugging missing dlls
#- choco install dependencywalker -y --allow-empty-checksums
#- depends.exe /f:1 /c /oc:c:\projects\isimpa\build\depends.txt c:\projects\isimpa\build\bin\isimpa.exe
- cd c:\projects\isimpa\build
- ECHO Test I-SIMPA %configuration% %platform% with MSVC %VisualStudioVersion% using %PlatformToolset% PlatformToolset
- appveyor-retry msbuild "RUN_TESTS.vcxproj" /target:Build /p:Configuration=%configuration% /p:Platform=%platform% /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
on_finish:
- if exist c:\projects\isimpa\build\depends.txt ( type c:\projects\isimpa\build\depends.txt )
- if exist c:\projects\isimpa\build\Testing\Temporary\LastTest.log ( type c:\projects\isimpa\build\Testing\Temporary\LastTest.log )
artifacts:
- path: 'build\*.exe'
name: isimpa-win64-install
- path: 'build\*.zip'
name: isimpa-win64-standalone
- path: 'build\CMakeFiles\CMakeOutput.log'
name: cmake_output_log
- path: 'build\CMakeFiles\CMakeError.log'
name: cmake_output_log