forked from labstreaminglayer/pylsl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
64 lines (53 loc) · 2.26 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
version: 1.15.0.{build}
pull_requests:
do_not_increment_build_number: true
shallow_clone: true
environment:
APPVEYOR_BUILD_WORKER_IMAGE: "Ubuntu1804"
URL_PREFIX: https://github.com/sccn/liblsl/releases/download/v1.15.0/liblsl-1.15-
TWINE_USERNAME: cboulay
# Note: TWINE_PASSWORD is set in Appveyor web settings
#https://www.appveyor.com/docs/getting-started-with-appveyor-for-linux/#running-windows-and-linux-builds-side-by-side
build_script:
- python -m pip install --user --upgrade setuptools wheel
- ps: >-
# First build the source and universal wheel that ships without a lsl library.
# Users that get this version will need a separate step to install liblsl.
python setup.py -q sdist bdist_wheel
# Now do the platform wheels - these come with liblsl.
$files = @{
win_amd64 = 'Win_amd64.zip'
win32 = 'Win_i386.zip'
macosx_10_13_x86_64 = 'OSX_amd64.tar.bz2'
};
ls;
$files.GetEnumerator() | foreach -Process {
iwr ($env:URL_PREFIX + $_.value) -ErrorAction Stop -OutFile $_.value;
iex "mkdir -p pylsl/lib";
if($_.value.EndsWith('.7z')) {
iex "7z e $($_.value) bin/liblsl* -Opylsl/lib"
}
if($_.value.Endswith('.zip')) {
iex "unzip -oj $($_.value) bin/lsl* -d pylsl/lib"
}
if($_.value.EndsWith('.so')) {
Copy-Item $_.value -Destination pylsl/lib/liblsl.so
}
if($_.value.Endswith('.bz2')) {
# https://xkcd.com/1168/
tar xvf $_.value --wildcards -C pylsl 'lib/liblsl*'
}
ls pylsl/lib/
python setup.py bdist_wheel -p $_.key
Remove-Item -Path pylsl/lib/* -Force -Recurse
Remove-Item -Path build -Force -Recurse
};
if ($env:APPVEYOR_REPO_TAG -eq "true") {
python -m pip install --user twine
python -m twine upload dist/*.whl
} else {
echo "Not uploading to pypi; APPVEYOR_REPO_TAG : $env:APPVEYOR_REPO_TAG"
}
artifacts:
- path: "dist/*.whl"
name: Wheels