Fix appveyor failures: do not use PowerShell since it triggers NativeCommandError if pacman prints to stderr

Split command to avoid "The input line is too long." error.
Also use --needed for pacman to not reinstall already installed packages.
pull/3235/head
Aleksey Filippov 7 years ago committed by Jussi Pakkanen
parent 7f042b5fe2
commit 22b19995b1
  1. 22
      .appveyor.yml

@ -79,20 +79,14 @@ install:
- cmd: if %compiler%==msvc2015 ( call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %arch% ) - 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%==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 ) - cmd: if %compiler%==cygwin ( set PYTHON=python3 ) else ( set PYTHON=python )
- ps: | # MinGW setup, lines are split to prevent "The input line is too long." error.
If($Env:compiler -eq 'msys2-mingw') { - cmd: if %arch%==x86 ( set "PACMAN_ARCH=i686" ) else ( set "PACMAN_ARCH=x86_64" )
If($Env:arch -eq 'x86') { - cmd: if %arch%==x86 ( set "PACMAN_BITS=32" ) else ( set "PACMAN_BITS=64" )
$env:Path = 'C:\msys64\mingw32\bin;' + $env:Path - cmd: if %compiler%==msys2-mingw ( set "PATH=C:\msys64\mingw%PACMAN_BITS%\bin;%PATH%" )
$env:MESON_PYTHON_PATH = 'C:\msys64\mingw32\bin' - cmd: if %compiler%==msys2-mingw ( set "MESON_PYTHON_PATH=C:\msys64\mingw%PACMAN_BITS%\bin" )
$env:PYTHON = 'python3' - cmd: if %compiler%==msys2-mingw ( set "PYTHON=python3" )
C:\msys64\usr\bin\pacman -S --noconfirm mingw32/mingw-w64-i686-python3 - cmd: if %compiler%==msys2-mingw ( C:\msys64\usr\bin\pacman -S --needed --noconfirm "mingw%PACMAN_BITS%/mingw-w64-%PACMAN_ARCH%-python3" )
} Else { # Cygwin
$env:Path = 'C:\msys64\mingw64\bin;' + $env:Path
$env:MESON_PYTHON_PATH = 'C:\msys64\mingw64\bin'
$env:PYTHON = 'python3'
C:\msys64\usr\bin\pacman -S --noconfirm mingw64/mingw-w64-x86_64-python3
}
}
- cmd: if not %compiler%==cygwin ( set "PATH=%cd%;%MESON_PYTHON_PATH%;%PATH%;" ) - 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 ( set WRAPPER=ci\run-in-cygwin.bat )
- cmd: if %compiler%==cygwin ( %WRAPPER% which %PYTHON% ) else ( where %PYTHON% ) - cmd: if %compiler%==cygwin ( %WRAPPER% which %PYTHON% ) else ( where %PYTHON% )

Loading…
Cancel
Save