diff options
author | dan sinclair <dj2@everburning.com> | 2019-03-07 15:44:31 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-07 15:44:31 -0500 |
commit | 0d744484eba498e30ad02cfb91b35426df470ece (patch) | |
tree | 15e738f15a7c5e4f33a37b538700831bdadcdaa5 /kokoro/scripts | |
parent | 6d37d69d4cde35d95f8420e879d1fa6543e4ff1c (diff) | |
download | amber-0d744484eba498e30ad02cfb91b35426df470ece.tar.gz |
Build with local vulkan data if requested (#319)
This CL adds a flag AMBER_USE_LOCAL_VULKAN which if set when running cmake will have amber use the vulkan header and loaders out of the third_party directory. This should let amber try to build on a system without vulkan so the build can be tested on the bots.
Diffstat (limited to 'kokoro/scripts')
-rw-r--r-- | kokoro/scripts/linux/build.sh | 2 | ||||
-rw-r--r-- | kokoro/scripts/macos/build.sh | 2 | ||||
-rw-r--r-- | kokoro/scripts/windows/build.bat | 130 |
3 files changed, 68 insertions, 66 deletions
diff --git a/kokoro/scripts/linux/build.sh b/kokoro/scripts/linux/build.sh index a178631..7b625fd 100644 --- a/kokoro/scripts/linux/build.sh +++ b/kokoro/scripts/linux/build.sh @@ -52,7 +52,7 @@ mkdir build && cd $SRC/build # Invoke the build. BUILD_SHA=${KOKORO_GITHUB_COMMIT:-$KOKORO_GITHUB_PULL_REQUEST_COMMIT} echo $(date): Starting build... -cmake -GNinja -DCMAKE_BUILD_TYPE=$BUILD_TYPE $CMAKE_C_CXX_COMPILER .. +cmake -GNinja -DCMAKE_BUILD_TYPE=$BUILD_TYPE $CMAKE_C_CXX_COMPILER -DAMBER_USE_LOCAL_VULKAN=1 .. echo $(date): Build everything... ninja diff --git a/kokoro/scripts/macos/build.sh b/kokoro/scripts/macos/build.sh index 793dd1f..acbb76b 100644 --- a/kokoro/scripts/macos/build.sh +++ b/kokoro/scripts/macos/build.sh @@ -36,7 +36,7 @@ CMAKE_C_CXX_COMPILER="-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++" # Invoke the build. BUILD_SHA=${KOKORO_GITHUB_COMMIT:-$KOKORO_GITHUB_PULL_REQUEST_COMMIT} echo $(date): Starting build... -cmake -GNinja -DCMAKE_BUILD_TYPE=$BUILD_TYPE $CMAKE_C_CXX_COMPILER .. +cmake -GNinja -DCMAKE_BUILD_TYPE=$BUILD_TYPE $CMAKE_C_CXX_COMPILER -DAMBER_USE_LOCAL_VULKAN=1 .. echo $(date): Build everything... ninja diff --git a/kokoro/scripts/windows/build.bat b/kokoro/scripts/windows/build.bat index b39d072..1c5d2ff 100644 --- a/kokoro/scripts/windows/build.bat +++ b/kokoro/scripts/windows/build.bat @@ -1,64 +1,66 @@ -:: Copyright The Amber Authors.
-::
-:: Licensed under the Apache License, Version 2.0 (the "License");
-:: you may not use this file except in compliance with the License.
-:: You may obtain a copy of the License at
-::
-:: http://www.apache.org/licenses/LICENSE-2.0
-::
-:: Unless required by applicable law or agreed to in writing, software
-:: distributed under the License is distributed on an "AS IS" BASIS,
-:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-:: See the License for the specific language governing permissions and
-:: limitations under the License.
-
-@echo on
-
-set BUILD_ROOT=%cd%
-set SRC=%cd%\github\amber
-set BUILD_TYPE=%1
-
-:: Force usage of python 2.7 rather than 3.6
-set PATH=C:\python27;%PATH%
-
-cd %SRC%
-python tools\git-sync-deps
-
-:: #########################################
-:: set up msvc build env
-:: #########################################
-call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
-echo "Using VS 2017..."
-
-cd %SRC%
-mkdir build
-cd build
-
-:: #########################################
-:: Start building.
-:: #########################################
-echo "Starting build... %DATE% %TIME%"
-if "%KOKORO_GITHUB_COMMIT%." == "." (
- set BUILD_SHA=%KOKORO_GITHUB_PULL_REQUEST_COMMIT%
-) else (
- set BUILD_SHA=%KOKORO_GITHUB_COMMIT%
-)
-
-cmake -GNinja -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DCMAKE_C_COMPILER=cl.exe -DCMAKE_CXX_COMPILER=cl.exe ..
-
-if %ERRORLEVEL% GEQ 1 exit /b %ERRORLEVEL%
-
-echo "Build everything... %DATE% %TIME%"
-ninja
-if %ERRORLEVEL% GEQ 1 exit /b %ERRORLEVEL%
-echo "Build Completed %DATE% %TIME%"
-
-:: ################################################
-:: Run the tests (We no longer run tests on VS2013)
-:: ################################################
-echo "Running Tests... %DATE% %TIME%"
-amber_unittests
-if %ERRORLEVEL% GEQ 1 exit /b %ERRORLEVEL%
-echo "Tests Completed %DATE% %TIME%"
-
-exit /b %ERRORLEVEL%
+:: Copyright The Amber Authors. +:: +:: Licensed under the Apache License, Version 2.0 (the "License"); +:: you may not use this file except in compliance with the License. +:: You may obtain a copy of the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, software +:: distributed under the License is distributed on an "AS IS" BASIS, +:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +:: See the License for the specific language governing permissions and +:: limitations under the License. + +@echo on + +set BUILD_ROOT=%cd% +set SRC=%cd%\github\amber +set BUILD_TYPE=%1 + +set PATH=C:\python27;%PATH% + +cd %SRC% +python tools\git-sync-deps + +:: Force usage of python 3.6 +:: Change this after the git-sync-deps as that requires python2 ... +set PATH=C:\python36;%PATH% + +:: ######################################### +:: set up msvc build env +:: ######################################### +call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x64 +echo "Using VS 2017..." + +cd %SRC% +mkdir build +cd build + +:: ######################################### +:: Start building. +:: ######################################### +echo "Starting build... %DATE% %TIME%" +if "%KOKORO_GITHUB_COMMIT%." == "." ( + set BUILD_SHA=%KOKORO_GITHUB_PULL_REQUEST_COMMIT% +) else ( + set BUILD_SHA=%KOKORO_GITHUB_COMMIT% +) + +cmake -GNinja -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DCMAKE_C_COMPILER=cl.exe -DCMAKE_CXX_COMPILER=cl.exe -DAMBER_USE_LOCAL_VULKAN=1 .. +if %ERRORLEVEL% GEQ 1 exit /b %ERRORLEVEL% + +echo "Build everything... %DATE% %TIME%" +ninja +if %ERRORLEVEL% GEQ 1 exit /b %ERRORLEVEL% +echo "Build Completed %DATE% %TIME%" + +:: ################################################ +:: Run the tests (We no longer run tests on VS2013) +:: ################################################ +echo "Running Tests... %DATE% %TIME%" +amber_unittests +if %ERRORLEVEL% GEQ 1 exit /b %ERRORLEVEL% +echo "Tests Completed %DATE% %TIME%" + +exit /b %ERRORLEVEL% |