2017-03-14 02:21:15 +03:00
|
|
|
version: 1.0.{build}
|
2017-09-22 19:30:33 +03:00
|
|
|
|
2020-06-17 04:23:52 +03:00
|
|
|
image:
|
2021-03-16 07:45:35 +03:00
|
|
|
- Visual Studio 2019
|
2020-06-17 04:23:52 +03:00
|
|
|
- Ubuntu
|
|
|
|
|
2017-03-14 02:21:15 +03:00
|
|
|
platform: x64
|
2018-04-13 22:29:57 +03:00
|
|
|
configuration: Release
|
2017-09-22 19:30:33 +03:00
|
|
|
|
2017-03-14 02:21:15 +03:00
|
|
|
environment:
|
2020-06-17 04:23:52 +03:00
|
|
|
APPVEYOR_YML_DISABLE_PS_LINUX: true
|
2017-03-14 02:21:15 +03:00
|
|
|
HLSL_SRC_DIR: c:\projects\DirectXShaderCompiler
|
2017-09-22 19:30:33 +03:00
|
|
|
HLSL_BLD_DIR: c:\projects\DirectXShaderCompiler\build
|
2020-06-17 04:23:52 +03:00
|
|
|
ARTIFACTS_DIR_NAME: dxc-artifacts
|
|
|
|
ARTIFACTS_ZIP_NAME_WINDOWS: $(ARTIFACTS_DIR_NAME).zip
|
|
|
|
ARTIFACTS_ZIP_NAME_LINUX: $(ARTIFACTS_DIR_NAME).tar.gz
|
|
|
|
|
|
|
|
clone_folder: c:\projects\DirectXShaderCompiler
|
|
|
|
|
|
|
|
artifacts:
|
|
|
|
- path: build\$(configuration)\$(ARTIFACTS_ZIP_NAME_WINDOWS)
|
|
|
|
|
|
|
|
# The clone folder and artifacts path is different for the Ubuntu image.
|
|
|
|
for:
|
|
|
|
-
|
|
|
|
matrix:
|
|
|
|
only:
|
|
|
|
- image: Ubuntu
|
|
|
|
clone_folder: /home/appveyor/projects/DirectXShaderCompiler
|
|
|
|
artifacts:
|
|
|
|
- path: build/$(ARTIFACTS_ZIP_NAME_LINUX)
|
2017-09-22 19:30:33 +03:00
|
|
|
|
2017-03-14 02:21:15 +03:00
|
|
|
install:
|
2020-06-17 04:23:52 +03:00
|
|
|
- git submodule update --init
|
2019-05-15 16:56:11 +03:00
|
|
|
- cmd: set PATH=C:\ninja;C:\Python36;%PATH%
|
2017-03-14 02:21:15 +03:00
|
|
|
|
2017-09-22 19:30:33 +03:00
|
|
|
before_build:
|
|
|
|
- cmd: call utils\hct\hctstart %HLSL_SRC_DIR% %HLSL_BLD_DIR%
|
2017-03-14 02:21:15 +03:00
|
|
|
|
2017-09-22 19:30:33 +03:00
|
|
|
build_script:
|
2021-03-16 19:15:03 +03:00
|
|
|
- cmd: call utils\hct\hctbuild -%PLATFORM% -%CONFIGURATION% -show-cmake-log -spirvtest
|
2020-06-17 04:23:52 +03:00
|
|
|
- sh: mkdir build && cd build
|
2022-01-28 19:54:52 +03:00
|
|
|
- sh: cmake .. -GNinja -C ../cmake/caches/PredefinedParams.cmake -DSPIRV_BUILD_TESTS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_FLAGS=-Werror -DENABLE_DXIL2SPV=ON
|
2020-06-17 04:23:52 +03:00
|
|
|
- sh: ninja
|
2017-03-14 02:21:15 +03:00
|
|
|
|
2017-09-22 19:30:33 +03:00
|
|
|
test_script:
|
2017-11-29 23:38:21 +03:00
|
|
|
- ps: utils\appveyor\appveyor_test.ps1
|
2018-04-13 22:29:57 +03:00
|
|
|
- cmd: call utils\hct\hcttest -rel spirv_only
|
2020-06-17 04:23:52 +03:00
|
|
|
- sh: ./bin/dxc --help
|
|
|
|
- sh: ./bin/dxc -T ps_6_0 ../tools/clang/test/CodeGenSPIRV/passthru-ps.hlsl2spv
|
|
|
|
- sh: ./bin/dxc -T ps_6_0 -Fo passthru-ps.dxil ../tools/clang/test/CodeGenSPIRV/passthru-ps.hlsl2spv
|
|
|
|
- sh: ./bin/dxc -T ps_6_0 -Fo passthru-ps.spv ../tools/clang/test/CodeGenSPIRV/passthru-ps.hlsl2spv -spirv
|
|
|
|
- sh: ./bin/clang-spirv-tests --spirv-test-root ../tools/clang/test/CodeGenSPIRV/
|
|
|
|
- sh: ./bin/clang-hlsl-tests --HlslDataDir $PWD/../tools/clang/test/HLSL/
|
2022-01-28 19:54:52 +03:00
|
|
|
- sh: ./bin/dxil2spv ../tools/clang/test/Dxil2Spv/passthru-ps.ll
|
2017-09-25 19:44:58 +03:00
|
|
|
|
|
|
|
after_test:
|
2020-06-17 04:23:52 +03:00
|
|
|
# Collect artifacts for Windows
|
2018-05-18 14:55:28 +03:00
|
|
|
- cmd: cd build\%CONFIGURATION%
|
2018-04-24 22:10:11 +03:00
|
|
|
- cmd: echo %APPVEYOR_REPO_COMMIT% > GIT-COMMIT.txt
|
2018-05-18 14:55:28 +03:00
|
|
|
- cmd: xcopy "%HLSL_SRC_DIR%\include\dxc" include\dxc /s /i /y
|
2020-06-17 04:23:52 +03:00
|
|
|
- cmd: 7z a %ARTIFACTS_ZIP_NAME_WINDOWS% include lib\d*.lib bin\d*.exe bin\d*.dll bin\d*.pdb bin\HLSLHost.exe GIT-COMMIT.txt
|
|
|
|
# Collect artifacts for Linux
|
|
|
|
- sh: mkdir "${ARTIFACTS_DIR_NAME}" && cd "${ARTIFACTS_DIR_NAME}" && mkdir bin && mkdir lib && mkdir include && cd ..
|
|
|
|
- sh: cp lib/libdxcompiler.so* "${ARTIFACTS_DIR_NAME}"/lib/
|
|
|
|
- sh: cp bin/dxc "${ARTIFACTS_DIR_NAME}"/bin/
|
|
|
|
- sh: cp -r ../include/dxc "${ARTIFACTS_DIR_NAME}"/include
|
|
|
|
- sh: echo "${APPVEYOR_REPO_COMMIT}" > "${ARTIFACTS_DIR_NAME}"/GIT-COMMIT.txt
|
|
|
|
- sh: tar -czvf "${ARTIFACTS_ZIP_NAME_LINUX}" "${ARTIFACTS_DIR_NAME}"
|
2017-03-14 02:21:15 +03:00
|
|
|
|
|
|
|
notifications:
|
|
|
|
- provider: GitHubPullRequest
|
|
|
|
on_build_success: true
|
|
|
|
on_build_failure: true
|
|
|
|
on_build_status_changed: true
|