From ae22573665fb839215e6573bb3b6cb584d9b3eba Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Fri, 29 May 2020 09:34:35 -0400 Subject: [PATCH] appveyor: move to Visual Studio 2019 try to replicate #520 Signed-off-by: Robin Getz --- appveyor.yml | 38 ++++++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 7111ea344..fb7b7ec75 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -4,11 +4,24 @@ clone_depth: 1 skip_commits: message: /(iiod|IIOD):.*/ +# We build everything in one build, so we can put it in one installer/zip + 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 + global: + # Tell msys2 to add mingw64 to the path + MSYSTEM: MINGW64 + # Tell msys2 to inherit the current directory when starting the shell + CHERE_INVOKING: 1 + matrix: + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 + generator: "Visual Studio 16 2019" + RD32PATH: "Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Redist\\MSVC" +# - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 +# generator: "Visual Studio 15 2017" +# - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 +# generator: "Visual Studio 14 2015" +# - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 +# generator: "Visual Studio 12 2013" configuration: - Release @@ -28,7 +41,6 @@ build_script: - set OLD_PATH=%PATH% - set OPT_PATH=C:\msys64\mingw32\bin;C:\msys64\mingw64\bin; - set PATH=%OPT_PATH%%PATH% - - set GENERATOR=Unix Makefiles - cd C:\projects\libiio - set folder-path=C:\projects\libiio\build-mingw-win32\%configuration% # MinGW 32 bit @@ -52,7 +64,7 @@ build_script: # Download a 32-bit version of windres.exe - appveyor DownloadFile http://swdownloads.analog.com/cse/build/windres.exe.gz -FileName C:\windres.exe.gz - C:\msys64\usr\bin\bash -lc "cd /c ; gunzip windres.exe.gz" - - C:\msys64\usr\bin\bash -lc "cmake -G '%GENERATOR%' -DCMAKE_RC_COMPILER=/c/windres.exe -DGIT_EXECUTABLE=C:/Program\ Files/Git/cmd/git.exe -DCMAKE_BUILD_TYPE=%configuration% -DCMAKE_INSTALL_PREFIX=/mingw32 -DCMAKE_C_COMPILER:FILEPATH=/mingw32/bin/i686-w64-mingw32-gcc.exe -DCMAKE_CXX_COMPILER:FILEPATH=/mingw32/bin/i686-w64-mingw32-g++.exe -DPKG_CONFIG_EXECUTABLE:FILEPATH=/mingw32/bin/pkg-config.exe -DENABLE_IPV6:BOOL=OFF -DLIBSERIALPORT_LIBRARIES=/c/libs/32/libserialport.dll.a -DLIBSERIALPORT_INCLUDE_DIR=/c/include -DLIBLZMA_LIBRARY=c:/msys64/mingw32/lib/liblzma.dll.a /c/projects/libiio && make -j3" + - C:\msys64\usr\bin\bash -lc "cmake -G 'Unix Makefiles' -DCMAKE_RC_COMPILER=/c/windres.exe -DGIT_EXECUTABLE=C:/Program\ Files/Git/cmd/git.exe -DCMAKE_BUILD_TYPE=%configuration% -DCMAKE_INSTALL_PREFIX=/mingw32 -DCMAKE_C_COMPILER:FILEPATH=/mingw32/bin/i686-w64-mingw32-gcc.exe -DCMAKE_CXX_COMPILER:FILEPATH=/mingw32/bin/i686-w64-mingw32-g++.exe -DPKG_CONFIG_EXECUTABLE:FILEPATH=/mingw32/bin/pkg-config.exe -DENABLE_IPV6:BOOL=OFF -DLIBSERIALPORT_LIBRARIES=/c/libs/32/libserialport.dll.a -DLIBSERIALPORT_INCLUDE_DIR=/c/include -DLIBLZMA_LIBRARY=c:/msys64/mingw32/lib/liblzma.dll.a /c/projects/libiio && make -j3" # MinGW 64 bit - cd c:\projects\libiio @@ -71,7 +83,7 @@ build_script: # set the specific version of doxygen, need to look at this later. - C:\msys64\usr\bin\bash -lc "pacman -U --noconfirm http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-doxygen-1.8.14-2-any.pkg.tar.xz" - C:\msys64\usr\bin\bash -lc "pacman -U --noconfirm http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-graphviz-2.40.1-4-any.pkg.tar.xz" - - C:\msys64\usr\bin\bash -lc "cmake -G '%GENERATOR%' -DCMAKE_BUILD_TYPE=%configuration% -DCMAKE_INSTALL_PREFIX=/mingw64 -DCMAKE_C_COMPILER:FILEPATH=/mingw64/bin/x86_64-w64-mingw32-gcc.exe -DCMAKE_CXX_COMPILER:FILEPATH=/mingw64/bin/x86_64-w64-mingw32-g++.exe -DPKG_CONFIG_EXECUTABLE:FILEPATH=/mingw64/bin/pkg-config.exe -DENABLE_IPV6:BOOL=OFF -DLIBSERIALPORT_LIBRARIES=/c/libs/64/libserialport.dll.a -DLIBSERIALPORT_INCLUDE_DIR=/c/include /c/projects/libiio && make -j3" + - C:\msys64\usr\bin\bash -lc "cmake -G 'Unix Makefiles' -DCMAKE_BUILD_TYPE=%configuration% -DCMAKE_INSTALL_PREFIX=/mingw64 -DCMAKE_C_COMPILER:FILEPATH=/mingw64/bin/x86_64-w64-mingw32-gcc.exe -DCMAKE_CXX_COMPILER:FILEPATH=/mingw64/bin/x86_64-w64-mingw32-g++.exe -DPKG_CONFIG_EXECUTABLE:FILEPATH=/mingw64/bin/pkg-config.exe -DENABLE_IPV6:BOOL=OFF -DLIBSERIALPORT_LIBRARIES=/c/libs/64/libserialport.dll.a -DLIBSERIALPORT_INCLUDE_DIR=/c/include /c/projects/libiio && make -j3" # Move the tests folder - cd c:\projects\libiio @@ -79,7 +91,6 @@ build_script: - mkdir build-mingw-win64\tests\ build-mingw-win64\tests\"%configuration%"& copy build-mingw-win64\Release\tests\*.exe build-mingw-win64\tests\"%configuration%"\ - set PATH=%OLD_PATH% - - set GENERATOR=Visual Studio 12 - cd c:\projects\libiio - set folder-path=c:\projects\libiio\build-win32 @@ -88,8 +99,9 @@ build_script: - echo "Running cmake for Visual Studio 32 bit... " - mkdir build-win32 - cd build-win32 + - echo %generator% - set MCS_EXECUTABLE_PATH="C:\Windows\Microsoft.NET\Framework\v4.0.30319" - - cmake -G "%GENERATOR%" -DCMAKE_BUILD_TYPE:STRING="%configuration%" -DENABLE_IPV6:BOOL=OFF -DCMAKE_SYSTEM_PREFIX_PATH="C:" -DCSHARP_BINDINGS:BOOL=ON -DPYTHON_BINDINGS:BOOL=ON -DLIBXML2_LIBRARIES="C:\\libs\\32\\libxml2.lib" -DLIBUSB_LIBRARIES="C:\\libs\\32\\libusb-1.0.lib" -DLIBSERIALPORT_LIBRARIES="C:\\libs\\32\\libserialport.dll.a" .. + - cmake -G "%generator%" -A Win32 -DCMAKE_BUILD_TYPE:STRING="%configuration%" -DENABLE_IPV6:BOOL=OFF -DCMAKE_SYSTEM_PREFIX_PATH="C:" -DCSHARP_BINDINGS:BOOL=ON -DPYTHON_BINDINGS:BOOL=ON -DLIBXML2_LIBRARIES="C:\\libs\\32\\libxml2.lib" -DLIBUSB_LIBRARIES="C:\\libs\\32\\libusb-1.0.lib" -DLIBSERIALPORT_LIBRARIES="C:\\libs\\32\\libserialport.dll.a" .. - cmake --build . --config %configuration% - cd bindings/python @@ -109,7 +121,7 @@ build_script: - echo "Running cmake for Visual Studio 64 bit... " - mkdir build-win64 - cd build-win64 - - cmake -G "%GENERATOR% Win64" -DCMAKE_BUILD_TYPE:STRING="%configuration%" -DENABLE_IPV6:BOOL=OFF -DCMAKE_SYSTEM_PREFIX_PATH="C:" -DCSHARP_BINDINGS:BOOL=ON -DPYTHON_BINDINGS:BOOL=ON -DLIBXML2_LIBRARIES="C:\\libs\\64\\libxml2.lib" -DLIBUSB_LIBRARIES="C:\\libs\\64\\libusb-1.0.lib" -DLIBSERIALPORT_LIBRARIES="C:\\libs\\64\\libserialport.dll.a" .. + - cmake -G "%generator%" -A x64 -DCMAKE_BUILD_TYPE:STRING="%configuration%" -DENABLE_IPV6:BOOL=OFF -DCMAKE_SYSTEM_PREFIX_PATH="C:" -DCSHARP_BINDINGS:BOOL=ON -DPYTHON_BINDINGS:BOOL=ON -DLIBXML2_LIBRARIES="C:\\libs\\64\\libxml2.lib" -DLIBUSB_LIBRARIES="C:\\libs\\64\\libusb-1.0.lib" -DLIBSERIALPORT_LIBRARIES="C:\\libs\\64\\libserialport.dll.a" .. - cmake --build . --config %configuration% - cd bindings/python @@ -168,8 +180,10 @@ build_script: - C:\msys64\usr\bin\bash -lc "cd c:/libs/32 ; cp libserialport-*.dll /c/%ARCHIVE_NAME%/MinGW32" - C:\msys64\usr\bin\bash -lc "cd c:/libs/64 ; cp libserialport-*.dll /c/%ARCHIVE_NAME%/MinGW64" - - copy "c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\redist\x86\Microsoft.VC120.CRT\msvcr120.dll" c:\%ARCHIVE_NAME%\MS32 - - copy "c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\redist\x64\Microsoft.VC120.CRT\msvcr120.dll" c:\%ARCHIVE_NAME%\MS64 + - echo %RD32PATH% + - dir c:\%RD32PATH% + - copy c:\%RD32PATH% c:\%ARCHIVE_NAME%\MS32 + - copy c:\%RD64PATH% c:\%ARCHIVE_NAME%\MS64 - copy c:\projects\libiio\CI\travis\zip.txt c:\%ARCHIVE_NAME%\README.txt - 7z a "c:\libiio.zip" c:\%ARCHIVE_NAME%