forked from bleachbit/bleachbit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathappveyor.yml
More file actions
104 lines (91 loc) · 3.84 KB
/
appveyor.yml
File metadata and controls
104 lines (91 loc) · 3.84 KB
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
build: off
version: 6.0.0.{build}
image: Visual Studio 2022
environment:
PYTHON_HOME: 'c:\projects\bleachbit\vcpkg_installed\x86-windows\tools\python3'
PYTHON_EXE: '%PYTHON_HOME%\python.exe'
MSYS_BIN: 'C:\msys64\usr\bin'
SZ_EXE : '"C:/Program Files/7-Zip/7z.exe"'
make : '%MSYS_BIN%\make.exe'
init:
- 'systeminfo | findstr /B /C:"OS Name" /C:"OS Version"' # show Windows version
- 'echo PYTHON_HOME=%PYTHON_HOME%'
- ps: |
Get-WmiObject Win32_Process | Select-Object ProcessName, @{Name="UserName";Expression={$_.GetOwner().User}} | Sort-Object ProcessName, UserName -Unique | Format-Table -AutoSize
# kill unneeded processes
- ps: |
$targetProcesses = @('SearchUI.exe', 'updater.exe', 'TiWorker.exe', 'TrustedInstaller.exe', 'MicrosoftEdgeUpdate.exe', 'ShellExperienceHost.exe')
Get-WmiObject Win32_Process |
Where-Object { $_.ProcessName -in $targetProcesses } |
ForEach-Object {
$result = $_.Terminate()
$status = if ($result -and $result.ReturnValue -eq 0) {
'terminated'
} elseif ($result) {
"failed ($($result.ReturnValue))"
} else {
'unknown'
}
Write-Output ("{0}: {1}" -f $_.ProcessName, $status)
}
install:
- cmd: call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" x86
- # The Visual Studio 2013 image had msys, but Visual Studio 2022 image does not.
#- ps: '& "$env:APPVEYOR_BUILD_FOLDER\windows\msys-install.ps1"'
- ps: '& "$env:APPVEYOR_BUILD_FOLDER\windows\python-gtk3-install.ps1"'
# UPX 4.0.2, 4.1.0, and 4.2.3 cause ModuleNotFoundError during build
# UPX 4.0.1 works
- ps: if (-not (Test-Path upx.zip)) { Start-FileDownload "https://github.com/upx/upx/releases/download/v4.0.1/upx-4.0.1-win64.zip" -FileName upx.zip}
- ps: Get-FileHash upx.zip
- '%SZ_EXE% x upx.zip'
- 'rename upx-4.0.1-win64 upx'
- 'dir .\upx\'
# Show version numbers of installed software.
# This also checks that the software is installed.
- '%make% -v'
- '%MSYS_BIN%\msgunfmt.exe -V'
- '%MSYS_BIN%\strip.exe -V'
- '%PYTHON_EXE% -V'
- '"c:\Program Files (x86)\NSIS\makensis.exe" /version'
build_script:
- ps: $env:REV8 = $env:APPVEYOR_REPO_COMMIT.Substring(0,8)
- 'echo revision = "%REV8%" > bleachbit\Revision.py'
- 'echo build_number = "%APPVEYOR_BUILD_NUMBER%" > bleachbit\Revision.py'
- 'set PATH=%MSYS_BIN%;%PATH%'
- 'echo %PATH%'
- '%make% PYTHON=%PYTHON_EXE% -C po local bleachbit.pot'
- '%PYTHON_EXE% -m windows.setup'
- 'move windows\BleachBit*.exe .'
- 'move windows\BleachBit*.zip .'
- ps: Get-FileHash BleachBit-*
cache:
- gtk3.24-x86-windows.zip -> appveyor.yml, windows/python-gtk3-deps.lst, windows/python-gtk3-install.ps1
test_script:
# coveralls.io
- '%PYTHON_HOME%\Scripts\pip3.exe install python-coveralls requests[security]'
# shorten very long path because of error https://github.com/az0/bleachbit/issues/166
- 'set PATH=c:\windows\system32;c:\windows;c:\windows\system32\wbem;c:\windows\SysWOW64\WindowsPowerShell\v1.0\'
- 'SET DESTRUCTIVE_TESTS=T'
# Catch warnings as errors. Also set in `tests/common.py`.
- 'SET PYTHONWARNINGS=error'
- '%PYTHON_HOME%\Scripts\coverage.exe run --include="bleachbit/*" tests/TestAll.py'
- '%PYTHON_HOME%\Scripts\coverage.exe report'
artifacts:
- path: BleachBit-*-setup.exe
name: FullInstaller
- path: BleachBit-*-setup-English.exe
name: EnglishInstaller
- path: BleachBit-*-portable.zip
name: Portable
- path: .coverage
deploy:
- provider: S3
access_key_id:
secure: CrPvjz7Jvg4gwOHKxUsL0PPR4mqAjB2p15/pvFw3fCk=
secret_access_key:
secure: VoAH5pVyhmTK3/KRuV5WcgfkTR3k/M9QDt7UD6ewcwNfkUvMynwjAHnKCG4vR0Rx
bucket: bleachbitci
folder: dl/$(APPVEYOR_BUILD_VERSION)-$(APPVEYOR_REPO_BRANCH)
artifact:
set-public: true
reduced_redundancy: true