1:: Copyright (C) 2019 Google, Inc. 2:: 3:: All rights reserved. 4:: 5:: Redistribution and use in source and binary forms, with or without 6:: modification, are permitted provided that the following conditions 7:: are met: 8:: 9:: Redistributions of source code must retain the above copyright 10:: notice, this list of conditions and the following disclaimer. 11:: 12:: Redistributions in binary form must reproduce the above 13:: copyright notice, this list of conditions and the following 14:: disclaimer in the documentation and/or other materials provided 15:: with the distribution. 16:: 17:: Neither the name of Google Inc. nor the names of its 18:: contributors may be used to endorse or promote products derived 19:: from this software without specific prior written permission. 20:: 21:: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22:: "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23:: LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 24:: FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 25:: COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 26:: INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 27:: BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28:: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 29:: CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30:: LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 31:: ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32:: POSSIBILITY OF SUCH DAMAGE. 33:: Copyright (c) 2019 Google LLC. 34:: 35:: Windows Build Script. 36 37@echo on 38 39set SRC=%cd%\github\glslang 40 41:: Force usage of python 3.6 42set PATH=C:\python36;%PATH% 43cd %SRC% 44 45mv External third_party 46 47:: REM Install Bazel. 48wget -q https://github.com/bazelbuild/bazel/releases/download/0.29.1/bazel-0.29.1-windows-x86_64.zip 49unzip -q bazel-0.29.1-windows-x86_64.zip 50 51:: Set up MSVC 52call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64 53set BAZEL_VS=C:\Program Files (x86)\Microsoft Visual Studio 14.0 54set BAZEL_VC=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC 55set BAZEL_SH=c:\tools\msys64\usr\bin\bash.exe 56set BAZEL_PYTHON=c:\tools\python2\python.exe 57 58:: ######################################### 59:: Start building. 60:: ######################################### 61echo "Build everything... %DATE% %TIME%" 62bazel.exe build :all 63if %ERRORLEVEL% NEQ 0 exit /b %ERRORLEVEL% 64echo "Build Completed %DATE% %TIME%" 65 66:: ############## 67:: Run the tests 68:: ############## 69echo "Running Tests... %DATE% %TIME%" 70bazel.exe test :all --test_output=all 71if %ERRORLEVEL% NEQ 0 exit /b %ERRORLEVEL% 72echo "Tests Completed %DATE% %TIME%" 73 74exit /b 0 75 76