Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions kokoro/dxc-smoketest/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash
# Copyright (c) 2018 Google LLC.
#
# 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.

# Fail on any error.
set -e
# Display commands being run.
set -x

SCRIPT_DIR=`dirname "$BASH_SOURCE"`
source $SCRIPT_DIR/../scripts/linux/build.sh RELEASE gcc cmake-dxc-smoketest
17 changes: 17 additions & 0 deletions kokoro/dxc-smoketest/continuous.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright (c) 2018 Google LLC.
#
# 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.

# Continuous build configuration.
build_file: "SPIRV-Tools/kokoro/dxc-smoketest/build.sh"

17 changes: 17 additions & 0 deletions kokoro/dxc-smoketest/presubmit.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright (c) 2018 Google LLC.
#
# 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.

# Presubmit build configuration.
build_file: "SPIRV-Tools/kokoro/dxc-smoketest/build.sh"

41 changes: 39 additions & 2 deletions kokoro/scripts/linux/build-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function clean_dir() {
mkdir "$dir"
}

if [ $TOOL != "cmake-smoketest" ]; then
if [ $TOOL != "cmake-shaderc-smoketest" ] && [ $TOOL != "cmake-dxc-smoketest" ]; then
# Get source for dependencies, as specified in the DEPS file
/usr/bin/python3 utils/git-sync-deps --treeless
fi
Expand Down Expand Up @@ -115,7 +115,7 @@ if [ $TOOL = "cmake" ]; then
ninja install
cd $KOKORO_ARTIFACTS_DIR
tar czf install.tgz install
elif [ $TOOL = "cmake-smoketest" ]; then
elif [ $TOOL = "cmake-shaderc-smoketest" ]; then
using cmake-3.31.2
using ninja-1.10.0

Expand Down Expand Up @@ -156,6 +156,43 @@ elif [ $TOOL = "cmake-smoketest" ]; then
echo $(date): Starting ctest...
ctest --output-on-failure -j4
echo $(date): ctest completed.
elif [ $TOOL = "cmake-dxc-smoketest" ]; then
using cmake-3.31.2
using ninja-1.10.0

# Get shaderc.
DXC_DIR=/tmp/dxc
clean_dir "$DXC_DIR"
cd $DXC_DIR
git clone https://github.com/microsoft/DirectXShaderCompiler.git .
cd $DXC_DIR/external

# Get DXC dependencies. Link the appropriate SPIRV-Tools.
git submodule update --init DirectX-Headers
rm -rf SPIRV-Tools
ln -s $ROOT_DIR SPIRV-Tools
git clone https://github.com/KhronosGroup/SPIRV-Headers.git SPIRV-Headers

cd $DXC_DIR
mkdir build
cd $DXC_DIR/build

# Invoke the build.
echo $(date): Configuring build...
cmake $DXC_DIR \
-C $DXC_DIR/cmake/caches/PredefinedParams.cmake \
-DCMAKE_BUILD_TYPE="Release" \
-G Ninja

echo $(date): Building ClangSPIRVTests...
ninja ClangSPIRVTests

echo $(date): Testing ClangSPIRVTests...
tools/clang/unittests/SPIRV/ClangSPIRVTests

echo $(date): Testing check-clang-codegenspirv...
ninja check-clang-codegenspirv

elif [ $TOOL = "cmake-android-ndk" ]; then
using cmake-3.31.2
using ndk-r27c
Expand Down
2 changes: 1 addition & 1 deletion kokoro/shaderc-smoketest/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ set -e
set -x

SCRIPT_DIR=`dirname "$BASH_SOURCE"`
source $SCRIPT_DIR/../scripts/linux/build.sh RELEASE gcc cmake-smoketest
source $SCRIPT_DIR/../scripts/linux/build.sh RELEASE gcc cmake-shaderc-smoketest