-
Notifications
You must be signed in to change notification settings - Fork 66
/
appveyor.yml
94 lines (78 loc) · 4.2 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
version: 3.0.19.{build}
image: Visual Studio 2022
environment:
matrix:
- PlatformToolset: v143
platform:
- x64
- Win32
configuration:
- Release
- Debug
# see https://www.boost.org/doc/libs/1_86_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%"=="v143" call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" %archi%
- 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%"
- 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:\Python312-x64;C:\Python312-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.12.7\tools
- if "%platform_input%"=="Win32" SET PYTHONBUILDDIR="%APPVEYOR_BUILD_FOLDER%"\packages\pythonx86.3.12.7\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 "v143") {
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: true
force_update: true
on:
appveyor_repo_tag: true
PlatformToolset: v143
configuration: Release