From 5e91eb3d0c6750bc70504c02ca942f69aeb46178 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Mon, 19 Nov 2018 23:22:12 +0100 Subject: CI: port cygwin job from appveyor to azure-pipelines --- .appveyor.yml | 12 ++---------- azure-pipelines.yml | 47 +++++++++++++++++++++++++++++++++++++++++++++++ ci/appveyor-install.bat | 22 ---------------------- ci/run-in-cygwin.bat | 6 ------ 4 files changed, 49 insertions(+), 38 deletions(-) delete mode 100755 ci/appveyor-install.bat delete mode 100644 ci/run-in-cygwin.bat diff --git a/.appveyor.yml b/.appveyor.yml index 8d17cd791..bb2231b3c 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -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" ` diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 9cc01a1ba..f42c6c858 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -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) diff --git a/ci/appveyor-install.bat b/ci/appveyor-install.bat deleted file mode 100755 index 1e6017998..000000000 --- a/ci/appveyor-install.bat +++ /dev/null @@ -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 diff --git a/ci/run-in-cygwin.bat b/ci/run-in-cygwin.bat deleted file mode 100644 index 146d28ecd..000000000 --- a/ci/run-in-cygwin.bat +++ /dev/null @@ -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 -- %* -- cgit v1.2.1