-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
88 lines (64 loc) · 2.77 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
version: 0.1-{build}
environment:
Platform: Win32
matrix:
- PlatformToolset: Default
Configuration: Release
install:
- cmd: git submodule update --init --recursive
- ps: Start-Process -FilePath "python" -ArgumentList "-m ensurepip"
- py -3 -m pip install msgpack-python pytest chippy
# (NOTE): In order to set the Playback output with pywinauto, we need
# a 32-bit Python, since foobar2000 itself is on 32 bit. Trying to do
# otherwise will fail the automation itself.
# Now, we could have used ``py -3.5-32`` instead for selecting the 32-bit
# Python installed, but this does not work on AppVeyor, although at the
# moment of this commit, ``py -3.4-32`` works just fine.
# So for now, we just hardcode the use of 32-bit Python as an absolute path.
- C:\Python35\python.exe -m pip install pywinauto
artifacts:
- path: foo_rpc*.fb2k-component
name: foo_rpc
build_script:
- ps: >-
$foobar_link = "https://www.dropbox.com/s/zymo8qgoyzflhs2/foobar2000.zip?dl=1"
Invoke-WebRequest -Uri $foobar_link -OutFile foobar.zip
Add-Type -AssemblyName System.IO.Compression.FileSystem
$zip_path = Join-Path $pwd "foobar.zip"
$portable_test = "C:\\Projects\\foo-rpc\\portable_test"
mkdir $portable_test
[System.IO.Compression.ZipFile]::ExtractToDirectory($zip_path, $portable_test)
$toolset = If ($Env:PlatformToolset -ne "Default") {"/p:PlatformToolset=" + $Env:PlatformToolset} Else {""}
dir $portable_test
$command = 'msbuild "foo_rpc.sln" /m /verbosity:normal /p:Configuration=Release /p:Platform="X86" `
/logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"'
iex $command
$host.SetShouldExit($LASTEXITCODE)
after_build:
- ps: 7z a foo_rpc-$ENV:APPVEYOR_BUILD_VERSION.zip .\Release\foo_rpc.dll
- ps: mv foo_rpc-$ENV:APPVEYOR_BUILD_VERSION.zip foo_rpc-$ENV:APPVEYOR_BUILD_VERSION.fb2k-component
before_test:
# See note from install section for why we use an absolute path.
- C:\Python35\python.exe C:\\projects\\foo-rpc\\ci\\preconfigure_foobar.py
# TODO: RDP support
# init:
# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
# on_finish:
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
test_script:
- 'py -3 -m pytest tests'
on_success:
- ps: appveyor PushArtifact foo_rpc-$ENV:APPVEYOR_BUILD_VERSION.fb2k-component
deploy:
- provider: BinTray
on:
branch: master
appveyor_repo_tag: true
username: PCManticore
api_key:
secure: gD4t00YJoTUyIEQMr/4ssXgo0PZkqNtdFa1cgUkFPQM7EPhQSHmJKwpJG1OLH2WJ
subject: pcmanticore
repo: foo_rpc
package: foo_rpc
publish: true
override: true