From 0d448c1002271e1d575f6658a01b0914b5ba6e7c Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Wed, 17 Apr 2024 12:35:38 +0200 Subject: [PATCH 1/8] CI: mingw --- ci/azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/azure-pipelines.yml b/ci/azure-pipelines.yml index 2ce9385..8bbc224 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 From 50fa3a424287e9edf6de8e8ab519fc3b60cc91b6 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Wed, 17 Apr 2024 12:41:33 +0200 Subject: [PATCH 2/8] Trim msys2 installation --- ci/setup-msys2.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ci/setup-msys2.yml b/ci/setup-msys2.yml index 94e8ee8..ae7f373 100644 --- a/ci/setup-msys2.yml +++ b/ci/setup-msys2.yml @@ -70,6 +70,7 @@ steps: - 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,12 +89,16 @@ steps: mingw-w64-%MSYSTEM_CARCH%-tools-git ^ mingw-w64-%MSYSTEM_CARCH%-winpthreads-git ^ 2>error.log + if not errorlevel 1 ( + pacman -Qdtq | pacman -Rns - 2>error.log + ) if errorlevel 1 ( type error.log 1>&2 exit /b 1 ) else ( type error.log ) + pacman -Q condition: not(variables['openorienteering.superbuild.msysBuildId']) displayName: 'Install MSYS2 MinGW packages for OpenOrienteering Superbuild' From 3e1c70ad56540a97e3fbfdc65c2c423e37dddfd0 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Wed, 17 Apr 2024 13:47:08 +0200 Subject: [PATCH 3/8] Fix conditions --- ci/azure-pipelines.yml | 2 +- ci/setup-msys2.yml | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ci/azure-pipelines.yml b/ci/azure-pipelines.yml index 8bbc224..45503d1 100644 --- a/ci/azure-pipelines.yml +++ b/ci/azure-pipelines.yml @@ -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 ae7f373..c36336c 100644 --- a/ci/setup-msys2.yml +++ b/ci/setup-msys2.yml @@ -47,12 +47,12 @@ steps: pipelineId: $(openorienteering.superbuild.msysBuildId) artifactName: 'MSYS2-$(MINGW)-base' targetPath: $(SUPERBUILD_INSTALL_DIR_NATIVE) - condition: variables['openorienteering.superbuild.msysBuildId'] + condition: ne('-', variables['openorienteering.superbuild.msysBuildId']) 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('-', variables['openorienteering.superbuild.msysBuildId']) displayName: 'Install MSYS2' - script: | @@ -65,7 +65,7 @@ steps: type error.log ) %SUPERBUILD_INSTALL_DIR_NATIVE%\usr\bin\pacman --noconfirm -Syuu - condition: not(variables['openorienteering.superbuild.msysBuildId']) + condition: eq('-', variables['openorienteering.superbuild.msysBuildId']) displayName: 'Update MSYS2 and prepare for MinGW' - script: | @@ -99,14 +99,14 @@ steps: type error.log ) pacman -Q - condition: not(variables['openorienteering.superbuild.msysBuildId']) + condition: eq('-', variables['openorienteering.superbuild.msysBuildId']) 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('-', variables['openorienteering.superbuild.msysBuildId']) displayName: 'Reduce installation size for CI' - script: | @@ -114,7 +114,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('-', variables['openorienteering.superbuild.msysBuildId']) displayName: 'Install CMake' - script: | From 90a123f80c0633db9822342a39a434670794c818 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Thu, 18 Apr 2024 08:44:05 +0200 Subject: [PATCH 4/8] Update setup-msys2.yml --- ci/setup-msys2.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ci/setup-msys2.yml b/ci/setup-msys2.yml index c36336c..66592e0 100644 --- a/ci/setup-msys2.yml +++ b/ci/setup-msys2.yml @@ -90,7 +90,8 @@ steps: mingw-w64-%MSYSTEM_CARCH%-winpthreads-git ^ 2>error.log if not errorlevel 1 ( - pacman -Qdtq | pacman -Rns - 2>error.log + pacman -Qdtq + REM -PIPE- pacman -Rns - 2>error.log ) if errorlevel 1 ( type error.log 1>&2 From 1db8fb136d0cad5e7c422fd6be369da4461c5071 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Thu, 18 Apr 2024 09:05:10 +0200 Subject: [PATCH 5/8] Update setup-msys2.yml --- ci/setup-msys2.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ci/setup-msys2.yml b/ci/setup-msys2.yml index 66592e0..33d2b89 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. +variables: +- 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: $(msys_build_id) artifactName: 'MSYS2-$(MINGW)-base' targetPath: $(SUPERBUILD_INSTALL_DIR_NATIVE) - condition: ne('-', variables['openorienteering.superbuild.msysBuildId']) + condition: ne('-', $(msys_build_id)) displayName: 'Download MSYS2 base artifacts' - script: | choco install msys2 --params="/InstallDir:%SUPERBUILD_INSTALL_DIR_NATIVE% /NoUpdate /NoPath" - condition: eq('-', variables['openorienteering.superbuild.msysBuildId']) + condition: eq('-', $(msys_build_id)) displayName: 'Install MSYS2' - script: | From 0ab457420e00a0ac8dae76fa11b2dcdc58555a74 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Thu, 18 Apr 2024 09:27:20 +0200 Subject: [PATCH 6/8] Update setup-msys2.yml --- ci/setup-msys2.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ci/setup-msys2.yml b/ci/setup-msys2.yml index 33d2b89..4b25016 100644 --- a/ci/setup-msys2.yml +++ b/ci/setup-msys2.yml @@ -27,7 +27,7 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -variables: +parameters: - msys_build_id: '-' # variables['openorienteering.superbuild.msysBuildId'] steps: @@ -47,15 +47,15 @@ steps: - task: DownloadPipelineArtifact@0 inputs: - pipelineId: $(msys_build_id) + pipelineId: ${{ parameters.msys_build_id }} artifactName: 'MSYS2-$(MINGW)-base' targetPath: $(SUPERBUILD_INSTALL_DIR_NATIVE) - condition: ne('-', $(msys_build_id)) + condition: ne('-', ${{ parameters.msys_build_id }}) displayName: 'Download MSYS2 base artifacts' - script: | choco install msys2 --params="/InstallDir:%SUPERBUILD_INSTALL_DIR_NATIVE% /NoUpdate /NoPath" - condition: eq('-', $(msys_build_id)) + condition: eq('-', ${{ parameters.msys_build_id }}) displayName: 'Install MSYS2' - script: | @@ -68,7 +68,7 @@ steps: type error.log ) %SUPERBUILD_INSTALL_DIR_NATIVE%\usr\bin\pacman --noconfirm -Syuu - condition: eq('-', variables['openorienteering.superbuild.msysBuildId']) + condition: eq('-', ${{ parameters.msys_build_id }}) displayName: 'Update MSYS2 and prepare for MinGW' - script: | @@ -103,14 +103,14 @@ steps: type error.log ) pacman -Q - condition: eq('-', variables['openorienteering.superbuild.msysBuildId']) + 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: eq('-', variables['openorienteering.superbuild.msysBuildId']) + condition: eq('-', ${{ parameters.msys_build_id }}) displayName: 'Reduce installation size for CI' - script: | @@ -118,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: eq('-', variables['openorienteering.superbuild.msysBuildId']) + condition: eq('-', ${{ parameters.msys_build_id }}) displayName: 'Install CMake' - script: | From faaadfd1f66a26584cc212edc902963ee42c931d Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Thu, 18 Apr 2024 14:41:55 +0200 Subject: [PATCH 7/8] Update setup-msys2.yml --- ci/setup-msys2.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/setup-msys2.yml b/ci/setup-msys2.yml index 4b25016..93047a3 100644 --- a/ci/setup-msys2.yml +++ b/ci/setup-msys2.yml @@ -28,7 +28,7 @@ # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. parameters: -- msys_build_id: '-' # variables['openorienteering.superbuild.msysBuildId'] + msys_build_id: '-' # variables['openorienteering.superbuild.msysBuildId'] steps: - script: | From d6d08032490b71e9e7fb3c8f2af3f598e7262a86 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Thu, 18 Apr 2024 22:23:29 +0200 Subject: [PATCH 8/8] Update setup-msys2.yml --- ci/setup-msys2.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ci/setup-msys2.yml b/ci/setup-msys2.yml index 93047a3..ed93103 100644 --- a/ci/setup-msys2.yml +++ b/ci/setup-msys2.yml @@ -50,12 +50,12 @@ steps: pipelineId: ${{ parameters.msys_build_id }} artifactName: 'MSYS2-$(MINGW)-base' targetPath: $(SUPERBUILD_INSTALL_DIR_NATIVE) - condition: ne('-', ${{ parameters.msys_build_id }}) + condition: ne('-', '${{ parameters.msys_build_id }}') displayName: 'Download MSYS2 base artifacts' - script: | choco install msys2 --params="/InstallDir:%SUPERBUILD_INSTALL_DIR_NATIVE% /NoUpdate /NoPath" - condition: eq('-', ${{ parameters.msys_build_id }}) + condition: eq('-', '${{ parameters.msys_build_id }}') displayName: 'Install MSYS2' - script: | @@ -68,7 +68,7 @@ steps: type error.log ) %SUPERBUILD_INSTALL_DIR_NATIVE%\usr\bin\pacman --noconfirm -Syuu - condition: eq('-', ${{ parameters.msys_build_id }}) + condition: eq('-', '${{ parameters.msys_build_id }}') displayName: 'Update MSYS2 and prepare for MinGW' - script: | @@ -103,14 +103,14 @@ steps: type error.log ) pacman -Q - condition: eq('-', ${{ parameters.msys_build_id }}) + 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: eq('-', ${{ parameters.msys_build_id }}) + condition: eq('-', '${{ parameters.msys_build_id }}') displayName: 'Reduce installation size for CI' - script: | @@ -118,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: eq('-', ${{ parameters.msys_build_id }}) + condition: eq('-', '${{ parameters.msys_build_id }}') displayName: 'Install CMake' - script: |