132 строки
3.8 KiB
YAML
132 строки
3.8 KiB
YAML
trigger:
|
|
- main
|
|
- release*
|
|
|
|
resources:
|
|
- repo: self
|
|
|
|
stages:
|
|
- stage: Build
|
|
jobs:
|
|
- job: Windows
|
|
timeoutInMinutes: 90
|
|
|
|
pool:
|
|
vmImage: windows-2022
|
|
|
|
variables:
|
|
HLSL_SRC_DIR: '$(Build.SourcesDirectory)'
|
|
HLSL_BLD_DIR: '$(Agent.BuildDirectory)'
|
|
platform: x64
|
|
|
|
strategy:
|
|
matrix:
|
|
VS2022_Release:
|
|
configuration: Release
|
|
VS2022_Debug:
|
|
configuration: Debug
|
|
|
|
steps:
|
|
- checkout: self
|
|
clean: true
|
|
submodules: true
|
|
- script: |
|
|
call utils\hct\hctstart.cmd %HLSL_SRC_DIR% %HLSL_BLD_DIR%
|
|
call utils\hct\hctbuild.cmd -$(platform) -$(configuration) -show-cmake-log -spirvtest
|
|
displayName: 'Building'
|
|
- script: |
|
|
call utils\hct\hctstart.cmd %HLSL_SRC_DIR% %HLSL_BLD_DIR%
|
|
call utils\hct\hcttest.cmd -$(configuration) noexec
|
|
displayName: 'DXIL Tests'
|
|
|
|
- job: Nix
|
|
timeoutInMinutes: 90
|
|
|
|
variables:
|
|
macOS: macOS-latest
|
|
linux: Ubuntu-latest
|
|
|
|
strategy:
|
|
matrix:
|
|
Linux_Clang_Release:
|
|
image: ${{ variables.linux }}
|
|
configuration: Release
|
|
CC: clang
|
|
CXX: clang++
|
|
CMAKE_OPTS: -DLLVM_ENABLE_WERROR=On -DLLVM_USE_SANITIZER='Address;Undefined' -DLLVM_ENABLE_LIBCXX=On -DLLVM_USE_LINKER=lld
|
|
CHECK_ALL_ENV: ASAN_OPTIONS=alloc_dealloc_mismatch=0
|
|
OS: Linux
|
|
Linux_Clang_Debug:
|
|
image: ${{ variables.linux }}
|
|
configuration: Debug
|
|
CC: clang
|
|
CXX: clang++
|
|
CMAKE_OPTS: -DLLVM_ENABLE_WERROR=On -DLLVM_USE_LINKER=lld
|
|
Linux_Gcc_Release:
|
|
image: ${{ variables.linux }}
|
|
configuration: Release
|
|
CC: gcc-9
|
|
CXX: g++-9
|
|
Linux_Gcc_Debug:
|
|
image: ${{ variables.linux }}
|
|
configuration: Debug
|
|
CC: gcc-9
|
|
CXX: g++-9
|
|
MacOS_Clang_Release:
|
|
image: ${{ variables.macOS }}
|
|
configuration: Release
|
|
CC: clang
|
|
CXX: clang++
|
|
CMAKE_OPTS: -DLLVM_ENABLE_WERROR=On
|
|
OS: MacOS
|
|
MacOS_Clang_Debug:
|
|
image: ${{ variables.macOS }}
|
|
configuration: Debug
|
|
CC: clang
|
|
CXX: clang++
|
|
CMAKE_OPTS: -DLLVM_ENABLE_WERROR=On
|
|
|
|
pool:
|
|
vmImage: $(image)
|
|
|
|
steps:
|
|
- checkout: self
|
|
clean: true
|
|
submodules: true
|
|
|
|
- task: UsePythonVersion@0
|
|
inputs:
|
|
versionSpec: '3.x'
|
|
|
|
- bash: sudo apt-get install ninja-build
|
|
displayName: 'Installing dependencies'
|
|
condition: eq(variables['image'], variables['linux'])
|
|
|
|
- bash: |
|
|
brew update
|
|
brew install ninja
|
|
ulimit -Sn 1024
|
|
displayName: 'Installing dependencies'
|
|
condition: eq(variables['image'], variables['macOS'])
|
|
- bash: |
|
|
cmake -B build -G Ninja $BUILD_SOURCESDIRECTORY -DLLVM_LIT_ARGS='-v --xunit-xml-output=testresults.xunit.xml' -C $BUILD_SOURCESDIRECTORY/cmake/caches/PredefinedParams.cmake -DSPIRV_BUILD_TESTS=ON -DCMAKE_BUILD_TYPE=$(configuration) -DCMAKE_C_COMPILER=$(CC) -DCMAKE_CXX_COMPILER=$(CXX) $(CMAKE_OPTS)
|
|
displayName: 'Running Cmake'
|
|
- bash: |
|
|
ninja -C build test-depends
|
|
displayName: 'Building'
|
|
- bash: |
|
|
./build/bin/dxc -T ps_6_0 tools/clang/test/CodeGenSPIRV/passthru-ps.hlsl2spv
|
|
./build/bin/dxc -T ps_6_0 -Fo passthru-ps.dxil tools/clang/test/CodeGenSPIRV/passthru-ps.hlsl2spv
|
|
./build/bin/dxc -T ps_6_0 -Fo passthru-ps.spv tools/clang/test/CodeGenSPIRV/passthru-ps.hlsl2spv -spirv
|
|
ls -ld $AGENT_BUILDDIRECTORY
|
|
ls -ld $BUILD_SOURCESDIRECTORY
|
|
displayName: 'Smoke tests'
|
|
- bash: $(CHECK_ALL_ENV) ninja -C build check-all
|
|
displayName: 'DXC tests'
|
|
- task: PublishTestResults@2
|
|
inputs:
|
|
testResultsFormat: 'JUnit'
|
|
testResultsFiles: '**/testresults.xunit.xml'
|
|
condition: succeededOrFailed()
|
|
|