Merge pull request #540 from KhronosGroup/appveyor

Add AppVeyor.
This commit is contained in:
Hans-Kristian Arntzen 2018-04-18 16:58:26 +02:00 коммит произвёл GitHub
Родитель 2804d9acd7 cc82d14ee8
Коммит dd39d36726
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 45 добавлений и 1 удалений

Просмотреть файл

@ -128,12 +128,21 @@ if (${PYTHONINTERP_FOUND})
add_test(NAME spirv-cross-test
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test_shaders.py
${CMAKE_CURRENT_SOURCE_DIR}/shaders)
add_test(NAME spirv-cross-test-no-opt
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test_shaders.py
${CMAKE_CURRENT_SOURCE_DIR}/shaders-no-opt)
add_test(NAME spirv-cross-test-metal
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test_shaders.py --metal
${CMAKE_CURRENT_SOURCE_DIR}/shaders-msl)
add_test(NAME spirv-cross-test-metal-no-opt
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test_shaders.py --metal
${CMAKE_CURRENT_SOURCE_DIR}/shaders-msl-no-opt)
add_test(NAME spirv-cross-test-hlsl
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test_shaders.py --hlsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders-hlsl)
add_test(NAME spirv-cross-test-hlsl-no-opt
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test_shaders.py --hlsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders-hlsl-no-opt)
add_test(NAME spirv-cross-test-opt
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test_shaders.py --opt
${CMAKE_CURRENT_SOURCE_DIR}/shaders)

31
appveyor.yml Normal file
Просмотреть файл

@ -0,0 +1,31 @@
environment:
matrix:
- GENERATOR: "Visual Studio 12 2013 Win64"
CONFIG: Debug
- GENERATOR: "Visual Studio 12 2013 Win64"
CONFIG: Release
- GENERATOR: "Visual Studio 14 2015 Win64"
CONFIG: Debug
- GENERATOR: "Visual Studio 14 2015 Win64"
CONFIG: Release
- GENERATOR: "Visual Studio 12 2013"
CONFIG: Debug
- GENERATOR: "Visual Studio 12 2013"
CONFIG: Release
- GENERATOR: "Visual Studio 14 2015"
CONFIG: Debug
- GENERATOR: "Visual Studio 14 2015"
CONFIG: Release
build_script:
- git submodule update --init
- cmake "-G%GENERATOR%" -H. -B_builds
- cmake --build _builds --config "%CONFIG%"

Просмотреть файл

@ -140,16 +140,20 @@ def shader_to_win_path(shader):
return shader
ignore_fxc = False
def validate_shader_hlsl(shader):
subprocess.check_call(['glslangValidator', '-e', 'main', '-D', '--target-env', 'vulkan1.1', '-V', shader])
is_no_fxc = '.nofxc.' in shader
if (not force_no_external_validation) and (not is_no_fxc):
global ignore_fxc
if (not ignore_fxc) and (not force_no_external_validation) and (not is_no_fxc):
try:
win_path = shader_to_win_path(shader)
subprocess.check_call(['fxc', '-nologo', shader_model_hlsl(shader), win_path])
except OSError as oe:
if (oe.errno != os.errno.ENOENT): # Ignore not found errors
raise
else:
ignore_fxc = True
except subprocess.CalledProcessError:
print('Failed compiling HLSL shader:', shader, 'with FXC.')
sys.exit(1)