forked from bruderstein/PythonScript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
101 lines (84 loc) · 4.81 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
version: 3.0.4.{build}
image: Visual Studio 2017
environment:
matrix:
- PlatformToolset: v141_xp
#- PlatformToolset: v140_xp
platform:
- x64
- Win32
configuration:
- Release
- Debug
# see https://www.boost.org/doc/libs/1_72_0/libs/python/doc/html/building/python_debugging_builds.html
# not available by boost nuget package
#- PythonDebug
install:
- git submodule -q update --init
- if "%platform%"=="x64" set archi=amd64
- if "%platform%"=="x64" set platform_input=x64
- if "%platform%"=="Win32" set archi=x86
- if "%platform%"=="Win32" set platform_input=Win32
- if "%PlatformToolset%"=="v140_xp" call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %archi%
- if "%PlatformToolset%"=="v141_xp" call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %archi%
- del "%APPVEYOR_BUILD_FOLDER%"\PythonScript\project\packages.config
- copy "%APPVEYOR_BUILD_FOLDER%"\PythonScript\project\packages_appveyor.config "%APPVEYOR_BUILD_FOLDER%"\PythonScript\project\packages.config
- nuget restore "%APPVEYOR_BUILD_FOLDER%"\PythonScript\project\packages.config -PackagesDirectory "%APPVEYOR_BUILD_FOLDER%"\packages
- nuget restore "%APPVEYOR_BUILD_FOLDER%"\PythonScript.Tests\packages.config -PackagesDirectory "%APPVEYOR_BUILD_FOLDER%"\packages
build_script:
- cd "%APPVEYOR_BUILD_FOLDER%"
- del "%APPVEYOR_BUILD_FOLDER%"\PythonScript\project\PythonSettings.props
- copy "%APPVEYOR_BUILD_FOLDER%"\PythonScript\project\PythonSettings_appveyor.props "%APPVEYOR_BUILD_FOLDER%"\PythonScript\project\PythonSettings.props
- msbuild PythonScript.sln /m /p:configuration="%configuration%" /p:platform="%platform_input%" /p:PlatformToolset="%PlatformToolset%" /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
after_build:
- if "%configuration%"=="Release" cd "%APPVEYOR_BUILD_FOLDER%"\docs
- if "%configuration%"=="Release" set PATH=C:\Python38-x64;C:\Python38-x64\Scripts;%PATH%
- if "%configuration%"=="Release" python -m pip install --upgrade pip
- if "%configuration%"=="Release" pip install -U sphinx
- if "%configuration%"=="Release" make.bat html
- cd "%APPVEYOR_BUILD_FOLDER%"\installer
- set WIX_PATH="C:\Program Files (x86)\WiX Toolset v3.11\bin"
- set PATH=%WIX_PATH%;%PATH%
- if "%platform_input%"=="x64" SET PYTHONBUILDDIR_X64="%APPVEYOR_BUILD_FOLDER%"\packages\python.3.8.6\tools
- if "%platform_input%"=="Win32" SET PYTHONBUILDDIR="%APPVEYOR_BUILD_FOLDER%"\packages\pythonx86.3.8.6\tools
- copy "%APPVEYOR_BUILD_FOLDER%"\installer\buildPaths.bat.orig "%APPVEYOR_BUILD_FOLDER%"\installer\buildPaths.bat
- if "%configuration%"=="Release" buildAll.bat %platform_input%
- cd "%APPVEYOR_BUILD_FOLDER%"
- ps: >-
if ($env:PLATFORM_INPUT -eq "x64") {
Push-AppveyorArtifact "$env:PLATFORM_INPUT\$env:CONFIGURATION\PythonScript.dll" -FileName PythonScript.dll
}
if ($env:PLATFORM_INPUT -eq "Win32" ) {
Push-AppveyorArtifact "bin\$env:CONFIGURATION\PythonScript.dll" -FileName PythonScript.dll
}
if ($($env:APPVEYOR_REPO_TAG) -eq "true" -and $env:CONFIGURATION -eq "Release" -and $env:PLATFORMTOOLSET -eq "v141_xp") {
if($env:PLATFORM_INPUT -eq "x64"){
$ZipFileName = "PythonScript_$($env:APPVEYOR_REPO_TAG_NAME)_x64.zip"
7z a $ZipFileName $env:APPVEYOR_BUILD_FOLDER\$env:PLATFORM_INPUT\$env:CONFIGURATION\*.dll
Push-AppveyorArtifact $ZipFileName -FileName $ZipFileName
Get-ChildItem .\installer\build\**\*.msi | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name -DeploymentName releases}
Get-ChildItem .\installer\build\**\*.zip | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name -DeploymentName releases}
}
if($env:PLATFORM_INPUT -eq "Win32"){
$ZipFileName = "PythonScript_$($env:APPVEYOR_REPO_TAG_NAME)_x86.zip"
7z a $ZipFileName $env:APPVEYOR_BUILD_FOLDER\bin\$env:CONFIGURATION\*.dll
Push-AppveyorArtifact $ZipFileName -FileName $ZipFileName
Get-ChildItem .\installer\build\**\*.msi | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name -DeploymentName releases}
Get-ChildItem .\installer\build\**\*.zip | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name -DeploymentName releases}
}
}
artifacts:
#- path: installer\build\**\*.*
# name: releases
deploy:
provider: GitHub
auth_token:
secure: z5nuqsjm/L3HYsjSkMsVBH8EPAK17v3OOXzZDyp9hWx9J6Ff/gDYtbzWMoUtW0dI
artifact: releases
draft: false
prerelease: false
force_update: true
on:
appveyor_repo_tag: true
PlatformToolset: v141_xp
configuration: Release