forked from analogdevicesinc/libm2k
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
111 lines (95 loc) · 4.71 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
102
103
104
105
106
107
108
109
110
111
image:
- Visual Studio 2019
#init:
# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
version: '{branch}.{build}'
clone_depth: 1
environment:
# Tell msys2 to add mingw64 to the path
MSYSTEM: MINGW64
# Tell msys2 to inherit the current directory when starting the shell
CHERE_INVOKING: 1
TWINE_USERNAME: __token__
cache:
- C:\glog -> CI\appveyor\install_glog.bat
install:
#Download libiio deps
- echo "Downloading deps..."
- cd c:\
- appveyor DownloadFile http://swdownloads.analog.com/cse/build/libiio-win-deps-libusb1.0.24.zip
- 7z x -y "c:\libiio-win-deps-libusb1.0.24.zip"
# Build and install libiio
- bash -c "/c/projects/libm2k/CI/appveyor/install_deps_msvc.sh"
# Download SWIG
- cd c:\
- appveyor DownloadFile https://sourceforge.net/projects/swig/files/swigwin/swigwin-4.0.0/swigwin-4.0.0.zip
- 7z x swigwin-4.0.0.zip -oswig
- cd swig/swigwin-4.0.0
- xcopy * .. /s /e /h /Q
#Install Inno Setup
- choco install InnoSetup
- set PATH=%PATH%;"C:\Program Files (x86)\Inno Setup 5"
build_script:
# Download glog
- cd c:\
- C:\projects\libm2k\CI\appveyor\install_glog.bat "Release" "x64"
- C:\projects\libm2k\CI\appveyor\install_glog.bat "Release" "Win32"
- bash -c "/c/projects/libm2k/CI/appveyor/build_appveyor_msvc.sh"
#Create the installer
- copy "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Redist\MSVC\14.29.30133\x86\Microsoft.VC142.CRT\msvcp140.dll" c:\projects\libm2k\build-win32
- copy "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Redist\MSVC\14.29.30133\x64\Microsoft.VC142.CRT\msvcp140.dll" c:\projects\libm2k\build-win64
- copy "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Redist\MSVC\14.29.30133\x86\Microsoft.VC142.CRT\vcruntime140.dll" c:\projects\libm2k\build-win32
- copy "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Redist\MSVC\14.29.30133\x64\Microsoft.VC142.CRT\vcruntime140.dll" c:\projects\libm2k\build-win64
- ISCC c:\projects\libm2k\build-win64\libm2k.iss
- appveyor PushArtifact C:\libm2k-system-setup.exe
# Create ZIPs
- cd c:\projects\libm2k
- mkdir c:\wheelhouse
- mkdir c:\libm2k-win32
- mkdir c:\libm2k-win32\dist
- xcopy include c:\libm2k-win32 /s /e /h
- copy build-win32\libm2k.* c:\libm2k-win32\
- copy build-win32\_libm2k.* c:\libm2k-win32\
- copy build-win32\libm2k_lv.dll c:\libm2k-win32\
- copy build-win32\libm2k-sharp.dll c:\libm2k-win32\
- copy build-win32\libm2k-sharp-cxx-wrap.dll c:\libm2k-win32\
- copy build-win32\*.exe c:\libm2k-win32\
- copy build-win32\msvc*.dll c:\libm2k-win32\
- copy build-win32\vcruntime*.dll c:\libm2k-win32\
- copy build-win32\dist\*.whl c:\libm2k-win32\dist\
- copy build-win32\dist\*.whl c:\wheelhouse
- copy c:\libiio-win32\*.dll c:\libm2k-win32\
- copy c:\glog\build_0_4_0-Win32\Release\glog.dll c:\libm2k-win32\
- 7z a "c:\libm2k-win32.zip" c:\libm2k-win32
- ps: Get-ChildItem c:\libm2k-win32\dist\*.whl | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
- appveyor PushArtifact c:\libm2k-win32.zip
- mkdir c:\libm2k-win64
- mkdir c:\libm2k-win64\dist
- xcopy include c:\libm2k-win64 /s /e /h
- copy build-win64\libm2k.* c:\libm2k-win64\
- copy build-win64\_libm2k.* c:\libm2k-win64\
- copy build-win64\libm2k_lv.dll c:\libm2k-win64\
- copy build-win64\libm2k-sharp.dll c:\libm2k-win64\
- copy build-win64\libm2k-sharp-cxx-wrap.dll c:\libm2k-win64\
- copy build-win64\*.exe c:\libm2k-win64\
- copy build-win64\msvc*.dll c:\libm2k-win64\
- copy build-win64\vcruntime*.dll c:\libm2k-win64\
- copy build-win64\dist\*.whl c:\libm2k-win64\dist\
- copy build-win64\dist\*.whl c:\wheelhouse
- copy c:\libiio-win64\*.dll c:\libm2k-win64\
- copy c:\glog\build_0_4_0-x64\Release\glog.dll c:\libm2k-win64\
- 7z a "c:\libm2k-win64.zip" c:\libm2k-win64
- ps: Get-ChildItem c:\libm2k-win64\dist\*.whl | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
- appveyor PushArtifact c:\libm2k-win64.zip
# push to testpypi only if this is a master build
# on releases push to mainline pypi
# on other branches, wheels will be available in the zip archive
deploy_script:
- ps: >-
If($Env:APPVEYOR_REPO_TAG -eq "true")
{
c:\Python39-x64\python.exe -m pip install --upgrade pip twine
c:\Python39-x64\python.exe -m twine upload --repository testpypi c:\wheelhouse\*
}
#on_finish:
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))