Skip to content

Commit

Permalink
CI: port msys2 jobs from appveyor to azure-pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
lazka authored and jpakkane committed Nov 26, 2018
1 parent 1c8c888 commit 5e2dd5b
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 15 deletions.
15 changes: 0 additions & 15 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,6 @@ environment:
backend: vs2015
BOOST_ROOT: C:\Libraries\Boost_1_60_0

- arch: x86
compiler: msys2-mingw
backend: ninja

- arch: x64
compiler: msys2-mingw
backend: ninja

platform:
- x64

Expand Down Expand Up @@ -76,13 +68,6 @@ install:
# Set paths and config for each build type.
- cmd: if %compiler%==msvc2015 ( call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %arch% )
- cmd: if %compiler%==msvc2017 ( call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat" -arch=%arch% )
# MinGW setup, lines are split to prevent "The input line is too long." error.
- cmd: if %arch%==x86 ( set "PACMAN_ARCH=i686" ) else ( set "PACMAN_ARCH=x86_64" )
- cmd: if %arch%==x86 ( set "PACMAN_BITS=32" ) else ( set "PACMAN_BITS=64" )
- cmd: if %compiler%==msys2-mingw ( set "PATH=C:\msys64\mingw%PACMAN_BITS%\bin;%PATH%" )
- cmd: if %compiler%==msys2-mingw ( set "MESON_PYTHON_PATH=C:\msys64\mingw%PACMAN_BITS%\bin" )
- cmd: if %compiler%==msys2-mingw ( set "PYTHON=python3" )
- cmd: if %compiler%==msys2-mingw ( C:\msys64\usr\bin\pacman -S --needed --noconfirm "mingw%PACMAN_BITS%/mingw-w64-%PACMAN_ARCH%-python3" "mingw%PACMAN_BITS%/mingw-w64-%PACMAN_ARCH%-python3-setuptools" )

- cmd: set "PATH=%cd%;%MESON_PYTHON_PATH%;%PATH%;"

Expand Down
50 changes: 50 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,53 @@ jobs:
inputs:
testResultsFiles: meson-test-run.xml
testRunTitle: $(System.JobName)

- job: msys2_mingw
pool:
vmImage: VS2017-Win2016
strategy:
matrix:
gccx86ninja:
MSYSTEM: MINGW32
MSYS2_ARCH: i686
gccx64ninja:
MSYSTEM: MINGW64
MSYS2_ARCH: x86_64
variables:
MSYS2_ROOT: $(System.Workfolder)\msys64
steps:
- script: |
choco install msys2 --params="/InstallDir:%MSYS2_ROOT% /NoUpdate /NoPath"
displayName: Install MSYS2
- script: |
set PATH=%MSYS2_ROOT%\usr\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem
%MSYS2_ROOT%\usr\bin\pacman --noconfirm -Syyuu
%MSYS2_ROOT%\usr\bin\pacman --noconfirm -Syuu
displayName: Update MSYS2
- script: |
set PATH=%MSYS2_ROOT%\usr\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem
%MSYS2_ROOT%\usr\bin\pacman --noconfirm --needed -S git base-devel mingw-w64-$(MSYS2_ARCH)-toolchain mingw-w64-$(MSYS2_ARCH)-python3 mingw-w64-$(MSYS2_ARCH)-python3-setuptools mingw-w64-$(MSYS2_ARCH)-python2 mercurial
displayName: Install Dependencies
- script: |
set PATH=%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem
%MSYS2_ROOT%\usr\bin\bash -lc "wget https://github.com/mesonbuild/cidata/raw/master/ninja.exe; mv ninja.exe /$MSYSTEM/bin"
set PATHEXT=%PATHEXT%;.py
%MSYS2_ROOT%\usr\bin\bash -lc "MSYSTEM= python3 run_tests.py --backend=ninja"
env:
CHERE_INVOKING: yes
displayName: Run Tests
- task: CopyFiles@2
condition: not(canceled())
inputs:
contents: 'meson-test-run.*'
targetFolder: $(Build.ArtifactStagingDirectory)
- task: PublishBuildArtifacts@1
inputs:
artifactName: $(System.JobName)
# publishing artifacts from PRs from a fork is currently blocked
condition: and(eq(variables['system.pullrequest.isfork'], false), not(canceled()))
- task: PublishTestResults@2
condition: not(canceled())
inputs:
testResultsFiles: meson-test-run.xml
testRunTitle: $(System.JobName)

1 comment on commit 5e2dd5b

@lazka
Copy link
Contributor Author

@lazka lazka commented on 5e2dd5b Nov 26, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI failed due to #4549

Please sign in to comment.