forked from analogdevicesinc/libad9361-iio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
134 lines (118 loc) · 5.64 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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
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
install:
# Download libiio
- cd c:\
- appveyor DownloadFile https://ci.appveyor.com/api/projects/analogdevicesinc/libiio/artifacts/libiio.zip?branch=master
- 7z x libiio*.zip > nul
- mkdir libiio-win64
- mkdir libiio-win32
- mkdir libiio-mingw-win64
- mkdir libiio-mingw-win32
- mv libiio-*/MS64/* libiio-win64/
- cp libiio-*/include/* libiio-win64/
- mv libiio-*/MS32/* libiio-win32/
- cp libiio-*/include/* libiio-win32/
- mv libiio-*/MinGW32/* libiio-mingw-win32/
- cp libiio-*/include/* libiio-mingw-win32/
- mv libiio-*/MinGW64/* libiio-mingw-win64/
- cp libiio-*/include/* libiio-mingw-win64/
#Install Inno Setup
- choco install InnoSetup
- set PATH=%PATH%;"C:\Program Files (x86)\Inno Setup 5"
build_script:
# 32-bit build - MinGW
- set OLD_PATH=%PATH%
- set OPT_PATH=C:\msys64\mingw32\bin;C:\msys64\mingw64\bin;
- set PATH=%OPT_PATH%%PATH%
- mkdir c:\projects\libad9361-iio\build-mingw-win32
- cd c:\projects\libad9361-iio\build-mingw-win32
# - C:\msys64\usr\bin\bash -lc "pacman --noconfirm -Sy mingw-w64-i686-gcc "
- cmake -G "Unix Makefiles" \
-DLIBIIO_LIBRARIES:FILEPATH=c:/libiio-mingw-win32/libiio.dll.a \
-DLIBIIO_INCLUDEDIR:PATH=c:/libiio-mingw-win32 \
-DCMAKE_CONFIGURATION_TYPES=Release \
-DCMAKE_C_COMPILER:FILEPATH=c:/msys64/mingw32/bin/i686-w64-mingw32-gcc.exe \
-DCMAKE_MAKE_PROGRAM=c:/msys64/mingw32/bin/mingw32-make.exe \
..
- cmake --build . --config Release
- copy c:\libiio-mingw-win32\*.dll c:\projects\libad9361-iio\build-mingw-win32\test\
- copy c:\projects\libad9361-iio\build-mingw-win32\*.dll c:\projects\libad9361-iio\build-mingw-win32\test\
- ctest -V -R
# 64-bit build - MinGW
- mkdir c:\projects\libad9361-iio\build-mingw-win64
- cd c:\projects\libad9361-iio\build-mingw-win64
# - C:\msys64\usr\bin\bash -lc "pacman --noconfirm -Sy mingw-w64-x86_64-gcc"
- cmake -G "Unix Makefiles" \
-DLIBIIO_LIBRARIES:FILEPATH=c:/libiio-mingw-win64/libiio.dll.a \
-DLIBIIO_INCLUDEDIR:PATH=c:/libiio-mingw-win64 \
-DCMAKE_CONFIGURATION_TYPES=Release \
-DCMAKE_C_COMPILER:FILEPATH=c:/msys64/mingw64/bin/x86_64-w64-mingw32-gcc.exe \
-DCMAKE_MAKE_PROGRAM=c:/msys64/mingw64/bin/mingw32-make.exe \
..
- cmake --build . --config Release
- copy c:\libiio-mingw-win64\*.dll c:\projects\libad9361-iio\build-mingw-win64\test\
- copy c:\projects\libad9361-iio\build-mingw-win64\*.dll c:\projects\libad9361-iio\build-mingw-win64\test\
- ctest -V -R
# 32-bit build - VS
- mkdir c:\projects\libad9361-iio\build-win32
- cd c:\projects\libad9361-iio\build-win32
- cmake -G "Visual Studio 12" \
-DLIBIIO_LIBRARIES:FILEPATH=c:/libiio-win32/libiio.lib \
-DLIBIIO_INCLUDEDIR:PATH=c:/libiio-win32 \
-DCMAKE_CONFIGURATION_TYPES=Release \
..
- cmake --build . --config Release
- copy c:\libiio-win32\*.dll c:\projects\libad9361-iio\build-win32\test\Release
- copy c:\projects\libad9361-iio\build-win32\Release\*.dll c:\projects\libad9361-iio\build-win32\test\Release
- ctest -V -C Release
# 64-bit build - VS
- mkdir c:\projects\libad9361-iio\build-win64
- cd c:\projects\libad9361-iio\build-win64
- cmake -G "Visual Studio 12 Win64" \
-DLIBIIO_LIBRARIES:FILEPATH=c:/libiio-win64/libiio.lib \
-DLIBIIO_INCLUDEDIR:PATH=c:/libiio-win64 \
-DCMAKE_CONFIGURATION_TYPES=Release \
..
- cmake --build . --config Release
- copy c:\libiio-win64\*.dll c:\projects\libad9361-iio\build-win64\test\Release
- copy c:\projects\libad9361-iio\build-win64\Release\*.dll c:\projects\libad9361-iio\build-win64\test\Release
- ctest -V -C Release
#Create the installer
- ISCC c:\projects\libad9361-iio\build-win64\libad9361-iio.iss
- appveyor PushArtifact C:\libad9361-setup.exe
# Create ZIPs
- cd c:\projects\libad9361-iio
- mkdir c:\libad9361-win32
- copy ad9361.h c:\libad9361-win32\
- copy bindings\matlab\ad9361-wrapper.h c:\libad9361-win32\
- copy build-win32\Release\libad9361.* c:\libad9361-win32\
- copy c:\libiio-win32\*.dll c:\libad9361-win32\
- 7z a "c:\libad9361-win32.zip" c:\libad9361-win32
- appveyor PushArtifact c:\libad9361-win32.zip
- mkdir c:\libad9361-win64
- copy ad9361.h c:\libad9361-win64\
- copy bindings\matlab\ad9361-wrapper.h c:\libad9361-win64\
- copy build-win64\Release\libad9361.* c:\libad9361-win64\
- copy c:\libiio-win64\*.dll c:\libad9361-win64\
- 7z a "c:\libad9361-win64.zip" c:\libad9361-win64
- appveyor PushArtifact c:\libad9361-win64.zip
- mkdir c:\libad9361-mingw-win32
- copy ad9361.h c:\libad9361-mingw-win32\
- copy bindings\matlab\ad9361-wrapper.h c:\libad9361-mingw-win32\
- copy build-mingw-win32\libad9361.* c:\libad9361-mingw-win32\
- copy c:\libiio-mingw-win32\*.dll c:\libad9361-mingw-win32\
- 7z a "c:\libad9361-mingw-win32.zip" c:\libad9361-mingw-win32
- appveyor PushArtifact c:\libad9361-mingw-win32.zip
- mkdir c:\libad9361-mingw-win64
- copy ad9361.h c:\libad9361-mingw-win64\
- copy bindings\matlab\ad9361-wrapper.h c:\libad9361-mingw-win64\
- copy build-mingw-win64\libad9361.* c:\libad9361-mingw-win64\
- copy c:\libiio-mingw-win64\*.dll c:\libad9361-mingw-win64\
- 7z a "c:\libad9361-mingw-win64.zip" c:\libad9361-mingw-win64
- appveyor PushArtifact c:\libad9361-mingw-win64.zip