CI: port cygwin job from appveyor to azure-pipelines

pull/4540/head
Christoph Reiter 6 years ago committed by Jussi Pakkanen
parent 4178267bfe
commit 5e91eb3d0c
  1. 12
      .appveyor.yml
  2. 47
      azure-pipelines.yml
  3. 22
      ci/appveyor-install.bat
  4. 6
      ci/run-in-cygwin.bat

@ -22,10 +22,6 @@ environment:
compiler: msys2-mingw
backend: ninja
- arch: x64
compiler: cygwin
backend: ninja
platform:
- x64
@ -80,7 +76,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% )
- cmd: if %compiler%==cygwin ( set PYTHON=python3 ) else ( set PYTHON=python )
# 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" )
@ -88,10 +83,8 @@ install:
- 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" )
# Cygwin
- cmd: if not %compiler%==cygwin ( set "PATH=%cd%;%MESON_PYTHON_PATH%;%PATH%;" )
- cmd: if %compiler%==cygwin ( set WRAPPER=ci\run-in-cygwin.bat )
- cmd: if %compiler%==cygwin ( %WRAPPER% which %PYTHON% ) else ( where %PYTHON% )
- cmd: set "PATH=%cd%;%MESON_PYTHON_PATH%;%PATH%;"
# Setup D compiler and dub packages
- ps: |
@ -114,7 +107,6 @@ install:
DownloadFile -Source 'http://nirbheek.in/files/binaries/pkg-config/win32/pkg-config.exe' `
-Destination 'C:\projects\meson\pkg-config.exe'
}
- cmd: if %compiler%==cygwin ( call ci\appveyor-install.bat )
- ps: |
If($Env:compiler -like 'msvc*') {
DownloadFile -Source "https://download.microsoft.com/download/D/B/B/DBB64BA1-7B51-43DB-8BF1-D1FB45EACF7A/msmpisdk.msi" `

@ -51,3 +51,50 @@ jobs:
steps:
- template: ci/azure-steps.yml
- job: cygwin
pool:
vmImage: VS2017-Win2016
strategy:
matrix:
gccx64ninja: {}
variables:
CYGWIN_ROOT: $(System.Workfolder)\cygwin
CYGWIN_MIRROR: http://cygwin.mirror.constant.com
steps:
- script: |
choco install cygwin --params="/InstallDir:%CYGWIN_ROOT%"
displayName: Install Cygwin
- script: |
%CYGWIN_ROOT%\cygwinsetup.exe -qnNdO -R "%CYGWIN_ROOT%" -s "%CYGWIN_MIRROR%" -g -P ^
gcc-objc++,^
gcc-objc,^
git,^
gobject-introspection,^
libboost-devel,^
libglib2.0-devel,^
libgtk3-devel,^
ninja,^
python3-pip,^
vala,^
zlib-devel
displayName: Install Dependencies
- script: |
set PATH=%CYGWIN_ROOT%\bin;%SYSTEMROOT%\system32
env.exe -- python3 run_tests.py --backend=ninja
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,22 +0,0 @@
set CACHE=C:\cache
set CYGWIN_MIRROR=http://cygwin.mirror.constant.com
if _%arch%_ == _x64_ set SETUP=setup-x86_64.exe && set CYGWIN_ROOT=C:\cygwin64
if _%arch%_ == _x86_ set SETUP=setup-x86.exe && set CYGWIN_ROOT=C:\cygwin
if not exist %CACHE% mkdir %CACHE%
echo Updating Cygwin and installing ninja and test prerequisites
%CYGWIN_ROOT%\%SETUP% -qnNdO -R "%CYGWIN_ROOT%" -s "%CYGWIN_MIRROR%" -l "%CACHE%" -g -P ^
gcc-objc++,^
gcc-objc,^
gobject-introspection,^
libboost-devel,^
libglib2.0-devel,^
libgtk3-devel,^
ninja,^
python3-pip,^
vala,^
zlib-devel
echo Install done

@ -1,6 +0,0 @@
if _%arch%_ == _x64_ set CYGWIN_ROOT=C:\cygwin64
if _%arch%_ == _x86_ set CYGWIN_ROOT=C:\cygwin
set PATH=%CYGWIN_ROOT%\bin;%SYSTEMROOT%\system32
env.exe -- %*
Loading…
Cancel
Save