diff --git a/appveyor.yml b/appveyor.yml index 643d6f17d9..e662bea937 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -4,5 +4,8 @@ environment: global: PLATFORMTOOLSET: "v140" +install: +- call ci\appveyor_install.bat + build_script: -- ci\build0.bat +- call ci\build0.bat diff --git a/ci/appveyor_install.bat b/ci/appveyor_install.bat new file mode 100755 index 0000000000..c4bcaf7e8b --- /dev/null +++ b/ci/appveyor_install.bat @@ -0,0 +1,42 @@ +:: Good documentation for Windows batch files: +:: https://ss64.com/nt/ +:: +:: Write the script between the two horizontal lines (`--------------`). +:: Put `call :check` after each command. This will ensure that if the command +:: fails, then the script will abort immediately with a nonzero exit code. +:: Doing that makes it equivalent to `set -e` in Bash. +:: +:: Enable echo (equivalent of `set -x` in Bash) +@echo on +:: Inherit all current variables from the master environment +setlocal +:: +:: ----------------------------------------------------------------------------- + +set CONDA_INSTALL_LOCN=C:\\Miniconda36-x64 +call :check + +call %CONDA_INSTALL_LOCN%\Scripts\activate.bat +call :check + +call conda config --set always_yes yes --set changeps1 no +call :check +call conda info -a +call :check +call conda update -q conda +call :check +call conda install python=3.7 pytest llvmlite prompt_toolkit +call :check +pip install antlr4-python3-runtime +call :check + +:: ----------------------------------------------------------------------------- +:: End of script. We exit the script now. +goto :eof + +:: Function definitions +:check +if errorlevel 1 ( + echo "Non zero exit code returned, aborting..." + (goto) 2>nul & endlocal & exit /b %errorlevel% +)