Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trim Msys2 installation #95

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ci/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ parameters:
- name: jobPattern
displayName: 'Enable jobs which contain this substring'
type: string
default: ''
default: 'mingw64'

jobs:
- job: Source
Expand Down Expand Up @@ -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:
Expand Down
23 changes: 16 additions & 7 deletions ci/setup-msys2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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: |
Expand All @@ -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 ^
Expand All @@ -88,28 +92,33 @@ 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: |
curl -L -o cmake.zip https://github.com/Kitware/CMake/releases/download/v3.17.4/cmake-3.17.4-win64-x64.zip
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: |
Expand Down