diff --git a/ci/azure-pipelines.yml b/ci/azure-pipelines.yml index 2ce9385..45503d1 100644 --- a/ci/azure-pipelines.yml +++ b/ci/azure-pipelines.yml @@ -31,7 +31,7 @@ parameters: - name: jobPattern displayName: 'Enable jobs which contain this substring' type: string - default: '' + default: 'mingw64' jobs: - job: Source @@ -87,7 +87,7 @@ jobs: - job: MinGW_Linux - condition: and(False, succeeded(), eq('MinGW_Linux', '${{ parameters.jobPattern }}')) + condition: and(succeeded(), eq('MinGW_Linux', '${{ parameters.jobPattern }}')) timeoutInMinutes: 120 dependsOn: Source variables: diff --git a/ci/setup-msys2.yml b/ci/setup-msys2.yml index 94e8ee8..ed93103 100644 --- a/ci/setup-msys2.yml +++ b/ci/setup-msys2.yml @@ -27,6 +27,9 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +parameters: + msys_build_id: '-' # variables['openorienteering.superbuild.msysBuildId'] + steps: - script: | echo ##vso[task.setVariable variable=CHERE_INVOKING]enabled_from_arguments @@ -44,15 +47,15 @@ steps: - task: DownloadPipelineArtifact@0 inputs: - pipelineId: $(openorienteering.superbuild.msysBuildId) + pipelineId: ${{ parameters.msys_build_id }} artifactName: 'MSYS2-$(MINGW)-base' targetPath: $(SUPERBUILD_INSTALL_DIR_NATIVE) - condition: variables['openorienteering.superbuild.msysBuildId'] + condition: ne('-', '${{ parameters.msys_build_id }}') displayName: 'Download MSYS2 base artifacts' - script: | choco install msys2 --params="/InstallDir:%SUPERBUILD_INSTALL_DIR_NATIVE% /NoUpdate /NoPath" - condition: not(variables['openorienteering.superbuild.msysBuildId']) + condition: eq('-', '${{ parameters.msys_build_id }}') displayName: 'Install MSYS2' - script: | @@ -65,11 +68,12 @@ steps: type error.log ) %SUPERBUILD_INSTALL_DIR_NATIVE%\usr\bin\pacman --noconfirm -Syuu - condition: not(variables['openorienteering.superbuild.msysBuildId']) + condition: eq('-', '${{ parameters.msys_build_id }}') displayName: 'Update MSYS2 and prepare for MinGW' - script: | set PATH=%SUPERBUILD_INSTALL_DIR_NATIVE%\usr\bin;%WINDIR%\system32;%WINDIR%;%WINDIR%\system32\wbem + pacman -D --asdeps `pacman -Qqe | grep -v base` pacman --noconfirm -S --needed ^ bison ^ diffutils ^ @@ -88,20 +92,25 @@ steps: mingw-w64-%MSYSTEM_CARCH%-tools-git ^ mingw-w64-%MSYSTEM_CARCH%-winpthreads-git ^ 2>error.log + if not errorlevel 1 ( + pacman -Qdtq + REM -PIPE- pacman -Rns - 2>error.log + ) if errorlevel 1 ( type error.log 1>&2 exit /b 1 ) else ( type error.log ) - condition: not(variables['openorienteering.superbuild.msysBuildId']) + pacman -Q + condition: eq('-', '${{ parameters.msys_build_id }}') displayName: 'Install MSYS2 MinGW packages for OpenOrienteering Superbuild' - script: | set PATH=%SUPERBUILD_INSTALL_DIR_NATIVE%\usr\bin;%WINDIR%\system32;%WINDIR%;%WINDIR%\system32\wbem pacman --noconfirm -Scc exit /b 0 - condition: not(variables['openorienteering.superbuild.msysBuildId']) + condition: eq('-', '${{ parameters.msys_build_id }}') displayName: 'Reduce installation size for CI' - script: | @@ -109,7 +118,7 @@ steps: if not errorlevel 1 unzip cmake.zip if not errorlevel 1 xcopy /S /Y cmake-3.17.4-win64-x64\. %SUPERBUILD_INSTALL_DIR_NATIVE%\%MINGW%\ - condition: Or(True, not(variables['openorienteering.superbuild.msysBuildId'])) + condition: eq('-', '${{ parameters.msys_build_id }}') displayName: 'Install CMake' - script: |