Advertisement
Guest User

Untitled

a guest
Jul 19th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.98 KB | None | 0 0
  1. # Sdrangel Appveyor
  2. version: "{branch}-ci-{build}"
  3. os: unstable
  4.  
  5. shallow_clone: true
  6.  
  7. cache:
  8. - C:\softs
  9.  
  10. # Verbose
  11. build:
  12. verbosity: detailed
  13.  
  14. # Setup the environments
  15. environment:
  16. matrix:
  17. - MINGW_ARCH: i686
  18. MINGW_ROOT: C:\msys64\mingw32
  19. BOOST_ROOT: C:\msys64\mingw32
  20. BOOST_LIBRARYDIR: C:\msys64\mingw32\lib
  21. BOOST_INCLUDEDIR: C:\msys64\mingw32\include\boost
  22. CMAKE_GENERATOR: 'MSYS Makefiles'
  23. Q_FLAGS: 'CONFIG+=MINGW32'
  24. QT_DIR: C:\Qt\5.11.1\mingw53_32
  25. MAKE: mingw32-make
  26. # No MinGW 64bit Qt :/
  27. # - MINGW_ARCH: x86_64
  28. # MINGW_ROOT: C:\msys64\mingw64
  29. # BOOST_ROOT: C:\msys64\mingw64
  30. # BOOST_LIBRARYDIR: C:\msys64\mingw64\lib
  31. # BOOST_INCLUDEDIR: C:\msys64\mingw64\include\boost
  32. # CMAKE_GENERATOR: 'MSYS Makefiles'#
  33. - MSVC_ARCH: x86
  34. BOOST_ROOT: C:\Libraries\boost_1_60_0
  35. BOOST_LIBRARYDIR: C:\Libraries\boost_1_60_0\lib32-msvc-14.0
  36. BOOST_INCLUDEDIR: C:\Libraries\boost_1_60_0\boost
  37. CMAKE_GENERATOR: 'NMake Makefiles'
  38. Q_FLAGS: 'CONFIG+=windeployqt -tp vc'
  39. QT_DIR: C:\Qt\5.11.1\msvc2015
  40. MAKE: nmake
  41. - MSVC_ARCH: x64
  42. BOOST_ROOT: C:\Libraries\boost_1_60_0
  43. BOOST_INCLUDEDIR: C:\Libraries\boost_1_60_0\boost
  44. BOOST_LIBRARYDIR: C:\Libraries\boost_1_60_0\lib64-msvc-14.0
  45. CMAKE_GENERATOR: 'NMake Makefiles'
  46. Q_FLAGS: 'CONFIG+=windeployqt-tp vc'
  47. QT_DIR: C:\Qt\5.11.1\msvc2015_64
  48. MAKE: nmake
  49.  
  50. # Install dependencies
  51. install:
  52. # Setup path
  53. - set PATH=%PATH%;%QT_DIR%\bin;C:\MinGW\bin
  54. # Fix mingw
  55. - if defined MINGW_ROOT set PATH=%MINGW_ROOT%\bin;C:\msys64\usr\bin\;%PATH%
  56. - if defined MINGW_ARCH bash -lc "pacman --needed --noconfirm -S mingw-w64-%MINGW_ARCH%-boost"
  57. - if defined MSVC_ARCH call "%VS140COMNTOOLS%\..\..\VC\vcvarsall.bat" %MSVC_ARCH%
  58. # Setup paths
  59. - mkdir "C:\deps" & exit 0
  60. - mkdir "C:\softs" & exit 0
  61. - mkdir %APPVEYOR_BUILD_FOLDER%\release\32bit & exit 0
  62. - mkdir %APPVEYOR_BUILD_FOLDER%\release\64bit & exit 0
  63. # Download dependencies and Patch .pro files
  64. - ps: $proFiles = Get-ChildItem . *.pro -rec
  65. ## Boost (1.60.0)
  66. - ps: >-
  67. foreach ($file in $proFiles)
  68. {
  69. (Get-Content $file.PSPath) |
  70. Foreach-Object { $_ -replace [Regex]::Escape("D:\boost_1_58_0"), "C:\boost_1_60_0" } |
  71. Set-Content $file.PSPath
  72. }
  73. ## Libusb (1.0.22)
  74. - IF not exist "C:\libusb.7z" appveyor DownloadFile "https://github.com/libusb/libusb/releases/download/v1.0.22/libusb-1.0.22.7z" -FileName "C:\libusb.7z" & exit 0
  75. - 7z x -y "C:\libusb.7z" -o"C:\softs\libusb" & exit 0
  76. - ps: >-
  77. foreach ($file in $proFiles)
  78. {
  79. (Get-Content $file.PSPath) |
  80. Foreach-Object { $_ -replace [Regex]::Escape("D:\softs\libusb-1.0.20"), "C:\softs\libusb" } |
  81. Set-Content $file.PSPath
  82. }
  83. ## Airspy (git master)
  84. - git clone --depth 1 https://github.com/airspy/airspyone_host.git C:\softs\airspyone_host & exit 0
  85. - ps: >-
  86. foreach ($file in $proFiles)
  87. {
  88. (Get-Content $file.PSPath) |
  89. Foreach-Object { $_ -replace [Regex]::Escape("D:\softs\libairspy"), "C:\softs\airspyone_host" } |
  90. Set-Content $file.PSPath
  91. }
  92. ## Airspyhf (git master)
  93. - git clone --depth 1 https://github.com/airspy/airspyhf.git C:\softs\airspyhf & exit 0
  94. ## Hackrf (git master)
  95. - git clone --depth 1 https://github.com/mossmann/hackrf.git C:\softs\hackrf & exit 0
  96. ## Librtlsdr (git master)
  97. - git clone --depth 1 https://github.com/steve-m/librtlsdr.git C:\softs\librtlsdr & exit 0
  98. ## BladeRF (1.5.1)
  99. - git clone https://github.com/Nuand/bladeRF.git C:\softs\bladeRF & exit 0
  100. - cd C:\softs\bladeRF & exit 0
  101. - git checkout tags/libbladeRF_v1.5.1 -b libbladeRF_v1.5.1 & exit 0
  102. - cd %APPVEYOR_BUILD_FOLDER% & exit 0
  103. ## Libiio (git master)
  104. - git clone --depth 1 https://github.com/analogdevicesinc/libiio.git C:\softs\libiio & exit 0
  105. ### Libiio Dependencies
  106. #### 32 bit
  107. - IF not exist "C:\deps\iconv-1.9.2.win32.zip" appveyor DownloadFile "http://xmlsoft.org/sources/win32/iconv-1.9.2.win32.zip" -FileName "C:\deps\iconv-1.9.2.win32.zip" & exit 0
  108. - 7z x "C:\deps\iconv-1.9.2.win32.zip" -y o"C:\softs\iconv-1.9.2.win32" & exit 0
  109. - IF not exist "C:\deps\libxml2-2.7.8.win32.zip" appveyor DownloadFile "http://xmlsoft.org/sources/win32/libxml2-2.7.8.win32.zip" -FileName "C:\deps\libxml2-2.7.8.win32.zip" & exit 0
  110. - 7z x "C:\deps\libxml2-2.7.8.win32.zip" -y o"C:\softs\libxml2-2.7.8.win32" & exit 0
  111. - IF not exist "C:\deps\zlib-1.2.5.win32.zip" appveyor DownloadFile "http://xmlsoft.org/sources/win32/zlib-1.2.5.win32.zip" -FileName "C:\deps\zlib-1.2.5.win32.zip" & exit 0
  112. - 7z x "C:\deps\zlib-1.2.5.win32.zip" -y o"C:\softs\zlib-1.2.5.win32" & exit 0
  113. #### 64 bit
  114. - IF not exist "C:\deps\libxml2-2.9.3-win32-x86_64.7z" appveyor DownloadFile "http://xmlsoft.org/sources/win32/64bit/libxml2-2.9.3-win32-x86_64.7z" -FileName "C:\deps\libxml2-2.9.3-win32-x86_64.7z" & exit 0
  115. - 7z x "C:\deps\libxml2-2.9.3-win32-x86_64.7z" -y o"C:\softs\libxml2-2.9.3-win32-x86_64" & exit 0
  116. ## LimeSuite (git master)
  117. - git clone --depth 1 https://github.com/myriadrf/LimeSuite.git C:\softs\LimeSuite & exit 0
  118. ## Perseus (git master)
  119. - git clone https://github.com/Microtelecom/libperseus-sdr C:\softs\libperseus-sdr & exit 0
  120. - cd C:\softs\libperseus-sdr & exit 0
  121. - git pull --all & exit 0
  122. - if defined MIGW_ARCH call git checkout windows & exit 0
  123. - if defined MSVC_ARCH call git checkout msvc & exit 0
  124. - cd %APPVEYOR_BUILD_FOLDER% & exit 0
  125. ## cm256cc (git master)
  126. - git clone --depth 1 https://github.com/f4exb/cm256cc.git C:\softs\cm256cc & exit 0
  127. ## serialDV (git master)
  128. - git clone --depth 1 https://github.com/f4exb/serialDV.git C:\softs\serialDV & exit 0
  129. ## DSDcc (git master)
  130. - git clone --depth 1 https://github.com/f4exb/dsdcc.git C:\softs\dsdcc & exit 0
  131. ### mbelib (DSDcc dependency) (git master)
  132. - git clone --depth 1 https://github.com/szechyjs/mbelib.git C:\softs\mbelib & exit 0
  133. ## opencv (git master) ?
  134. - git clone --depth 1 https://github.com/opencv/opencv.git C:\softs\opencv & exit 0
  135. ## Patch default path
  136. - ps: >-
  137. foreach ($file in $proFiles)
  138. {
  139. (Get-Content $file.PSPath) |
  140. Foreach-Object { $_ -replace [Regex]::Escape("D:\softs"), "C:\softs" } |
  141. Set-Content $file.PSPath
  142. }
  143. # Patch files for crapy Windows :/
  144. ## sdrbase/dsp/freqlockcomplex.cpp
  145. - ps: >-
  146. $defMPI = "#ifndef M_PI`n#define M_PI 3.14159265358979323846`n#endif`n"@
  147. $defMPI + (Get-Content "sdrbase/dsp/freqlockcomplex.cpp" -Raw) | Set-Content "sdrbase/dsp/freqlockcomplex.cpp"
  148. ## .pro files backslash
  149. - ps: >-
  150. foreach ($file in $proFiles)
  151. {
  152. (Get-Content $file.PSPath) |
  153. Foreach-Object { $_ -replace [Regex]::Escape("/"), "\" } |
  154. Set-Content $file.PSPath
  155. }
  156.  
  157. # Build the project
  158. before_build:
  159. - cd %APPVEYOR_BUILD_FOLDER%
  160. - qmake sdrangel.windows.pro CONFIG+=release CONFIG+=qtquickcompiler %Q_FLAGS%
  161.  
  162. build_script:
  163. - cd %APPVEYOR_BUILD_FOLDER%
  164. - '%MAKE%'
  165.  
  166. after_build:
  167. - cd %APPVEYOR_BUILD_FOLDER%
  168. # Patch .bat files
  169. - ps: $batFiles = Get-ChildItem . *.bat -rec
  170. ## Shared
  171. - ps: >-
  172. foreach ($file in $batFiles)
  173. {
  174. (Get-Content $file.PSPath) |
  175. Foreach-Object { $_ -replace [Regex]::Escape("D:\softs\libusb-1.0.20"), "C:\libusb" } |
  176. Set-Content $file.PSPath
  177. }
  178. - ps: >-
  179. foreach ($file in $batFiles)
  180. {
  181. (Get-Content $file.PSPath) |
  182. Foreach-Object { $_ -replace [Regex]::Escape("D:\softs"), "C:\softs" } |
  183. Set-Content $file.PSPath
  184. }
  185. # Generate the release
  186. - if %MINGW_ARCH% == i686 call windows.install.bat release C:\release\32bit & exit 0
  187. - if %MSVC_ARCH% == x86 call windows.install.bat release %APPVEYOR_BUILD_FOLDER%\release\32bit & exit 0
  188. - if %MSVC_ARCH% == x64 call windows64.install.bat release %APPVEYOR_BUILD_FOLDER%\release\64bit & exit 0
  189.  
  190. # Save artifacts
  191. artifacts:
  192. - path: 'release\*'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement