From 81ea66d7f6787db48f6ab557d630c5edc3e7f834 Mon Sep 17 00:00:00 2001 From: iakov Date: Sat, 25 Nov 2023 15:52:28 +0300 Subject: [PATCH] Add UITools specific test --- ci/helloworld_qttools.7z | Bin 0 -> 425 bytes ci/steps.yml | 65 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 ci/helloworld_qttools.7z diff --git a/ci/helloworld_qttools.7z b/ci/helloworld_qttools.7z new file mode 100644 index 0000000000000000000000000000000000000000..cd17b1deba7f96081606922b69f2bc65f38510a3 GIT binary patch literal 425 zcmV;a0apGudc3bE8~_BrMqVps0RR910000Z000000000iqKSau0Wbj1T>vPR02zD{ zJPOVR2i@3&U=&nY0OL0r!PzOwKx%*Z<2`@8REEln9wu!8u?K&~jIx&&0@ohucx&4x zR%QF#s!&~kCv4RNug~q^(HqX1#&Qn@8!tZ~@^{JFh~$XvNMpmVrGZX@2zQ!zZ(9F& z-{o5iQ1Ml%^YayeIiZ;x`l{=5RajY{49y40ZN;~{O|vLCeN#XPan4F+_9{k4s^LV} z^%ip|MMIY2_Xd>gHt#UmMA*-6$}9Bv2zDyGeDk4VawWhxgf+ds0U#&2KNFd@$r{27Xf9i*09@A&{~FMj z3p1CbOAxyIpn5_KFr3?2okZ-gUqe;kW1M|lAqevX02c;;*8vHDj{pY?0RRCb0|5aA TT>uaO01SZo3IS)M3BdpW{XVvs literal 0 HcmV?d00001 diff --git a/ci/steps.yml b/ci/steps.yml index c9dab016..2915b355 100644 --- a/ci/steps.yml +++ b/ci/steps.yml @@ -311,6 +311,71 @@ steps: eq(variables['SUBCOMMAND'], 'install-qt') ) displayName: build test with qmake w/o extra module + +# When --archives non-empty + - script: | + set -ex + rm -rf $(Build.BinariesDirectory)/tests + mkdir $(Build.BinariesDirectory)/tests + (cd $(Build.BinariesDirectory)/tests && 7zr x $(Build.SourcesDirectory)/ci/helloworld_qttools.7z) + export PATH=$(QT_BINDIR):$PATH + qmake -d $(Build.BinariesDirectory)/tests/helloworld_qttools + make + condition: | + and( + eq( variables['TARGET'], 'desktop' ), + not( startsWith( variables['ARCH'], 'wasm_' ) ), + or( + eq(variables['Agent.OS'], 'Linux'), + eq(variables['Agent.OS'], 'Darwin') + ), + contains(variables['SUBARCHIVES'], 'qttools'), + eq(variables['SUBCOMMAND'], 'install-qt') + ) + displayName: build test with qmake for Linux and macOS with specific Qt modules (QT += uitools) + - powershell: | + if ( $env:TOOLCHAIN -eq 'MSVC' ) { + # Load modules from cache + $Env:PSModulePath = '$(MODULES_FOLDER)', $Env:PSModulePath -join [System.IO.Path]::PathSeparator + Write-Host $Env:PSModulePath + Import-Module "Pscx" + Import-Module "VSSetup" + + Import-VisualStudioVars -VisualStudioVersion $(VSVER) -Architecture $(ARCHITECTURE) + $env:Path += ";$(WIN_QT_BINDIR)" + try { rm -r -fo $(Build.BinariesDirectory)\tests } catch { $Error.Clear() } + mkdir $(Build.BinariesDirectory)\tests + cd $(Build.BinariesDirectory)\tests + 7z x $(Build.SourcesDirectory)\ci\helloworld_qttools.7z + qmake -d $(Build.BinariesDirectory)\tests\helloworld_qttools + nmake + } elseif ( $env:TOOLCHAIN -eq 'MINGW' ) { + Set-Item -Path Env:Path -Value ("$(Build.BinariesDirectory)\Qt\Tools\$(MINGW_FOLDER)\bin;$(WIN_QT_BINDIR);" + $Env:Path) + Write-Host "Path == " + $env:Path + if (![bool] (Get-Command -ErrorAction Ignore -Type Application mingw32-make)) { + python -m aqt install-tool $(if (($QT_BASE_MIRROR + "") -ne "") { "-b $QT_BASE_MIRROR" } else {""}) ` + --outputdir $(Build.BinariesDirectory)/Qt $(HOST) desktop tools_mingw qt.tools.$(MINGW_VARIANT) + if ($?) { + Write-Host 'Successfully installed tools_mingw' + } else { + throw 'Failed to install tools_mingw' + } + } + try { rm -r -fo $(Build.BinariesDirectory)\tests } catch { $Error.Clear() } + mkdir $(Build.BinariesDirectory)\tests + cd $(Build.BinariesDirectory)\tests + 7z x $(Build.SourcesDirectory)\ci\helloworld_qttools.7z + qmake -d $(Build.BinariesDirectory)\tests\helloworld_qttools + mingw32-make + } + condition: | + and( + eq( variables['Agent.OS'], 'Windows_NT'), + contains(variables['SUBARCHIVES'], 'qttools'), + eq(variables['SUBCOMMAND'], 'install-qt') + ) + displayName: build test with qmake with specific Qt modules (QT += uitools) + - powershell: | # Load modules from cache $Env:PSModulePath = '$(MODULES_FOLDER)', $Env:PSModulePath -join [System.IO.Path]::PathSeparator