diff --git a/CI/publish_deps.ps1 b/CI/publish_deps.ps1 index 19a93a302..d95d5a875 100644 --- a/CI/publish_deps.ps1 +++ b/CI/publish_deps.ps1 @@ -16,16 +16,16 @@ wget http://swdownloads.analog.com/cse/build/libiio-deps-20220517.zip -OutFile " dir C:\ghcup\ghc\ if ($COMPILER -eq "MinGW Makefiles") { - cp $src_dir\dependencies\libs\64\libserialport-0.dll $env:BUILD_ARTIFACTSTAGINGDIRECTORY - cp $src_dir\dependencies\libs\64\libusb-1.0.dll $env:BUILD_ARTIFACTSTAGINGDIRECTORY - cp $src_dir\dependencies\libs\64\libzstd.dll $env:BUILD_ARTIFACTSTAGINGDIRECTORY - cp C:\ghcup\ghc\9.2.8\mingw\bin\libgcc_s_seh-1.dll $env:BUILD_ARTIFACTSTAGINGDIRECTORY - cp C:\ghcup\ghc\9.6.5\mingw\bin\libiconv-2.dll $env:BUILD_ARTIFACTSTAGINGDIRECTORY - cp C:\ghcup\ghc\9.6.5\mingw\bin\zlib1.dll $env:BUILD_ARTIFACTSTAGINGDIRECTORY - cp C:\ghcup\ghc\9.6.5\mingw\bin\liblzma-5.dll $env:BUILD_ARTIFACTSTAGINGDIRECTORY - cp C:\ghcup\ghc\9.6.5\mingw\bin\libwinpthread-1.dll $env:BUILD_ARTIFACTSTAGINGDIRECTORY - cp C:\ghcup\ghc\9.6.5\mingw\bin\libxml2-2.dll $env:BUILD_ARTIFACTSTAGINGDIRECTORY - cp C:\ghcup\ghc\9.2.8\mingw\bin\libstdc++-6.dll $env:BUILD_ARTIFACTSTAGINGDIRECTORY + cp C:\msys64\mingw64\bin\libserialport-0.dll $env:BUILD_ARTIFACTSTAGINGDIRECTORY + cp C:\msys64\mingw64\bin\libusb-1.0.dll $env:BUILD_ARTIFACTSTAGINGDIRECTORY + cp C:\msys64\mingw64\bin\libxml2-2.dll $env:BUILD_ARTIFACTSTAGINGDIRECTORY + cp C:\msys64\mingw64\bin\libzstd.dll $env:BUILD_ARTIFACTSTAGINGDIRECTORY + cp C:\msys64\mingw64\bin\libgcc_s_seh-1.dll $env:BUILD_ARTIFACTSTAGINGDIRECTORY + cp C:\msys64\mingw64\bin\libiconv-2.dll $env:BUILD_ARTIFACTSTAGINGDIRECTORY + cp C:\msys64\mingw64\bin\zlib1.dll $env:BUILD_ARTIFACTSTAGINGDIRECTORY + cp C:\msys64\mingw64\bin\liblzma-5.dll $env:BUILD_ARTIFACTSTAGINGDIRECTORY + cp C:\msys64\mingw64\bin\libwinpthread-1.dll $env:BUILD_ARTIFACTSTAGINGDIRECTORY + cp C:\msys64\mingw64\bin\libstdc++-6.dll $env:BUILD_ARTIFACTSTAGINGDIRECTORY } else { cp $src_dir\dependencies\libs\64\libxml2.dll $env:BUILD_ARTIFACTSTAGINGDIRECTORY cp $src_dir\dependencies\libs\64\libserialport-0.dll $env:BUILD_ARTIFACTSTAGINGDIRECTORY diff --git a/azure-pipelines.yml b/azure-pipelines.yml index fa88d4619..17bce6c3f 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -108,8 +108,6 @@ stages: matrix: MinGW_W64: COMPILER: 'MinGW Makefiles' - ARCH: 'x86_64' - USE_CSHARP: 'OFF' artifactName: 'Windows-MinGW-W64' pool: vmImage: 'windows-2022' @@ -125,28 +123,22 @@ stages: inputs: targetType: inline script: | - ghcup install ghc 9.2.8 git submodule update --init - if ( !( Test-Path deps ) ) { - mkdir deps - } - cd deps - mkdir libxml - wget https://www.zlatkovic.com/pub/libxml/64bit/libxml2-2.9.3-win32-x86_64.7z -OutFile "libxml.7z" - 7z x -y libxml.7z - rm libxml.7z - cd C:\ - wget http://swdownloads.analog.com/cse/build/libiio-deps-20220517.zip -OutFile "libiio-win-deps.zip" - 7z x -y "C:\libiio-win-deps.zip" + $env:PATH += ";C:\msys64\bin;C:\msys64\mingw64\bin;C:\msys64\usr\bin" + C:\msys64\usr\bin\bash.exe -c "./CI/azure/build_mingw.sh install_pacman_deps" - task: PowerShell@2 inputs: - targetType: 'filePath' - filePath: .\CI\build_win.ps1 + targetType: inline + script: | + $env:PATH += ";C:\msys64\bin;C:\msys64\mingw64\bin;C:\msys64\usr\bin" + mkdir build-mingw + cd build-mingw + C:\msys64\usr\bin\bash.exe -c "../CI/azure/build_mingw.sh build_libiio" displayName: 'Build' - task: CopyFiles@2 displayName: 'Copy .exe files' inputs: - sourceFolder: '$(Agent.BuildDirectory)/s/build-x64/utils' + sourceFolder: '$(Agent.BuildDirectory)/s/build-mingw/utils' contents: '*.exe' targetFolder: '$(Build.ArtifactStagingDirectory)' - task: CopyFiles@2 @@ -156,17 +148,18 @@ stages: contents: 'iio.h' targetFolder: '$(Build.ArtifactStagingDirectory)' - task: CopyFiles@2 - displayName: 'Copy libiio.dll and libiio.dll.a' + displayName: 'Copy libiio.dll, libiio.dll.a and libiio1.dll' inputs: - sourceFolder: '$(Agent.BuildDirectory)/s/build-x64' + sourceFolder: '$(Agent.BuildDirectory)/s/build-mingw' contents: | libiio.dll libiio.dll.a + libiio1.dll targetFolder: '$(Build.ArtifactStagingDirectory)' - task: CopyFiles@2 displayName: 'Copy .tar.gz files' inputs: - sourceFolder: '$(Agent.BuildDirectory)/s/build-x64/bindings/python' + sourceFolder: '$(Agent.BuildDirectory)/s/build-mingw/bindings/python' contents: '*.gz' targetFolder: '$(Build.ArtifactStagingDirectory)' - task: PowerShell@2