Okay so .appveyor.yml cmd scripts must not have multiline commands, ugh.

This commit is contained in:
Pietro Gagliardi 2019-04-07 20:16:04 -04:00
parent 3f815718b1
commit acc0586fd6
1 changed files with 17 additions and 29 deletions

View File

@ -36,14 +36,12 @@ environment:
platform:
- x64
before_build:
# Note: AppVeyor tries to be "helpful" and splits cmd.exe scripts into their constitutent lines to check their error codes. There is no way to switch this off; for true multi-line scripts we have to use PowerShell. But we need to use vcvarsall.bat, so that's out of the question.
install:
- cmd: |
rem Set Python Version
if %arch%==386 (
set PYTHON_ROOT=C:\python37
) else (
set PYTHON_ROOT=C:\python37-x64
)
set PYTHON_ROOT=C:\python37-x64
if %arch%==386 ( set PYTHON_ROOT=C:\python37 )
set "PATH=%PYTHON_ROOT%;%PYTHON_ROOT%\Scripts;%PATH%"
rem Install Latest Meson
@ -54,45 +52,35 @@ before_build:
mkdir C:\ninja
powershell -Command "Expand-Archive -LiteralPath C:\ninja-win.zip -DestinationPath C:\ninja"
set "PATH=C:\ninja;%PATH%"
rem Parameters for the build_script phase, to reduce their noise.
set "mingwPath=C:\msys64\mingw64\bin"
set vcvarsallArch=x86
if %arch%==386 ( set "mingwPath=C:\msys64\mingw32\bin" )
if %arch%==386 ( set vcvarsallArch=amd64 )
build_script:
- cmd: |
if %compiler%==mingw-Win32 (
if %arch%==386 (
set "PATH=C:\msys64\mingw32\bin;%PATH%"
) else (
set "PATH=C:\msys64\mingw64\bin;%PATH%"
)
) else (
if %arch%==386 (
call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86
) else (
call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" amd64
)
)
if %compiler%==mingw ( set "PATH=%mingwPath%;%PATH%" )
if %compiler%<>mingw ( call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" %vcvarsallArch% )
meson setup build --buildtype=release --default-library=%libtype%
ninja -C build
after_build:
- cmd: |
if %APPVEYOR_REPO_TAG%==true (
set "version=%APPVEYOR_REPO_TAG_NAME%"
) else (
set "version=%APPVEYOR_REPO_BRANCH%"
)
set "version=%APPVEYOR_REPO_BRANCH%"
if %APPVEYOR_REPO_TAG%==true ( set "version=%APPVEYOR_REPO_TAG_NAME%" )
set "artifact=%version%-windows-%arch%-%compiler%-%libtype%"
pushd build\meson-out
if %buildtype%==static (
rem TODO msvc only?
ren libui.a libui.lib
)
rem TODO msvc only?
if %buildtype%==static ( ren libui.a libui.lib )
copy ..\..\ui.h .
copy ..\..\ui_windows.h .
rem remove unnecessary files
rem TODO should we do this on Azure too?
del libui.exp
7z a "%APPVEYOR_BUILD_FOLDER%\libui-%artifact%.zip" %libfiles% ui.h ui_windows.h
7z a "%APPVEYOR_BUILD_FOLDER%\examples-%artifact%.zip" *.exe
7z a "%APPVEYOR_BUILD_FOLDER%\examples-%artifact%.zip" controlgallery.exe cpp-multithread.exe datetime.exe drawtext.exe histogram.exe tester.exe timer.exe
popd
artifacts: