forked from NVIDIA-RTX/RTXDI
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added various command line options for automated functional testing, …
…a GitLab CI configuration, and reduced the console output in non-verbose mode. The tests and reference images are stored separately.
- Loading branch information
1 parent
522f7b8
commit 51b7081
Showing
24 changed files
with
706 additions
and
169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ | |
*.sublime-project | ||
*.sublime-workspace | ||
compile-shaders.bat | ||
/tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
stages: | ||
- build | ||
- test | ||
|
||
variables: | ||
GIT_SUBMODULE_STRATEGY: none | ||
TEST_REPO_BRANCH: main | ||
|
||
# Variables that should be specified from the project settings: | ||
# - GITHUB_USERNAME : username for the private dependencies on GitHub | ||
# - GITHUB_ACCESS_TOKEN : access token for the private dependencies on GitHub | ||
# - TEST_REPO_URL : URL of the repository with tests, including the username and token parts if necessary | ||
# - ENABLE_JOBS : list of jobs to run, such as "build-linux,test-linux" | ||
|
||
# The script assumes that the following software is installed on the runner: | ||
# - GCC or Clang (Linux) | ||
# - Visual Studio 2019 (Windows) | ||
# - CMake 3.10+ | ||
# - Ninja build system | ||
# - Python 3.8+ and scikit-image | ||
|
||
|
||
# Add the GitHub credentials for the submodules | ||
.checkout-submodules: &checkout-submodules | ||
- git submodule set-url RTXGI https://${GITHUB_USERNAME}:${GITHUB_ACCESS_TOKEN}@github.com/NVIDIAGameWorks/RTXGI.git | ||
- git submodule set-url NRD https://${GITHUB_USERNAME}:${GITHUB_ACCESS_TOKEN}@github.com/NVIDIAGameWorks/RayTracingDenoiser.git | ||
- git submodule update --init --recursive | ||
|
||
|
||
# Remove the credentials to avoid storing them in the runner working tree | ||
.cleanup-submodules: &cleanup-submodules | ||
- git submodule set-url RTXGI https://github.com/NVIDIAGameWorks/RTXGI.git | ||
- git submodule set-url NRD https://github.com/NVIDIAGameWorks/RayTracingDenoiser.git | ||
|
||
|
||
# Clone the tests repository | ||
.clone-tests: &clone-tests | ||
- git clone -b ${TEST_REPO_BRANCH} ${TEST_REPO_URL} tests | ||
|
||
|
||
build-linux: | ||
stage: build | ||
tags: | ||
- linux | ||
rules: | ||
- if: '$ENABLE_JOBS =~ /build-linux/' | ||
before_script: | ||
- *checkout-submodules | ||
- ./update_dependencies.sh | ||
script: | ||
- mkdir build && cd build | ||
- cmake .. -GNinja | ||
- ninja | ||
after_script: | ||
- *cleanup-submodules | ||
artifacts: | ||
name: "rtxdi-linux-${CI_COMMIT_SHORT_SHA}" | ||
paths: | ||
- build/bin/ | ||
|
||
build-windows: | ||
stage: build | ||
tags: | ||
- windows | ||
rules: | ||
- if: '$ENABLE_JOBS =~ /build-windows/' | ||
before_script: | ||
- *checkout-submodules | ||
- ./update_dependencies.bat | ||
script: | ||
- ./set_vs_vars.ps1 | ||
- mkdir build | ||
- cd build | ||
- cmake .. -GNinja -DRTXDI_CONSOLE_APP=ON | ||
- cmake --build . | ||
after_script: | ||
- *cleanup-submodules | ||
artifacts: | ||
name: "rtxdi-windows-${CI_COMMIT_SHORT_SHA}" | ||
paths: | ||
- build/bin/ | ||
|
||
test-linux: | ||
stage: test | ||
tags: | ||
- linux | ||
rules: | ||
- if: '$ENABLE_JOBS =~ /test-linux/' | ||
dependencies: | ||
- build-linux | ||
before_script: | ||
- ./update_dependencies.sh | ||
- *clone-tests | ||
script: | ||
- cd tests | ||
- python test.py | ||
artifacts: | ||
name: "rtxdi-linux-test-outputs-${CI_COMMIT_SHORT_SHA}" | ||
when: on_failure | ||
paths: | ||
- tests/outputs/ | ||
|
||
test-windows-dx12: | ||
stage: test | ||
tags: | ||
- windows | ||
rules: | ||
- if: '$ENABLE_JOBS =~ /test-windows-dx12/' | ||
dependencies: | ||
- build-windows | ||
before_script: | ||
- ./update_dependencies.bat | ||
- *clone-tests | ||
script: | ||
- cd tests | ||
- python test.py | ||
artifacts: | ||
name: "rtxdi-windows-test-outputs-dx12-${CI_COMMIT_SHORT_SHA}" | ||
when: on_failure | ||
paths: | ||
- tests/outputs/ | ||
|
||
test-windows-vulkan: | ||
stage: test | ||
tags: | ||
- windows | ||
rules: | ||
- if: '$ENABLE_JOBS =~ /test-windows-vulkan/' | ||
dependencies: | ||
- build-windows | ||
before_script: | ||
- ./update_dependencies.bat | ||
- *clone-tests | ||
script: | ||
- cd tests | ||
- python test.py --vulkan | ||
artifacts: | ||
name: "rtxdi-windows-test-outputs-vulkan-${CI_COMMIT_SHORT_SHA}" | ||
when: on_failure | ||
paths: | ||
- tests/outputs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule donut
updated
from 35d4ab to eb2a06
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# | ||
# Find vswhere (installed with recent Visual Studio versions). | ||
# | ||
If ($vsWhere = Get-Command "vswhere.exe" -ErrorAction SilentlyContinue) { | ||
$vsWhere = $vsWhere.Path | ||
} ElseIf (Test-Path "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe") { | ||
$vsWhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" | ||
} | ||
Else { | ||
Write-Error "vswhere not found. Aborting." -ErrorAction Stop | ||
} | ||
Write-Host "vswhere found at: $vsWhere" -ForegroundColor Yellow | ||
|
||
|
||
# | ||
# Get path to Visual Studio installation using vswhere. | ||
# | ||
$vsPath = &$vsWhere -latest -version "[16.0,17.0)" -products * ` | ||
-requires Microsoft.Component.MSBuild ` | ||
-property installationPath | ||
If ([string]::IsNullOrEmpty("$vsPath")) { | ||
Write-Error "Failed to find Visual Studio 2019 installation. Aborting." -ErrorAction Stop | ||
} | ||
Write-Host "Using Visual Studio installation at: ${vsPath}" -ForegroundColor Yellow | ||
|
||
|
||
# | ||
# Make sure the Visual Studio Command Prompt variables are set. | ||
# | ||
If (Test-Path env:LIBPATH) { | ||
Write-Host "Visual Studio Command Prompt variables already set." -ForegroundColor Yellow | ||
} Else { | ||
# Load VC vars | ||
Push-Location "${vsPath}\VC\Auxiliary\Build" | ||
cmd /c "vcvarsall.bat x64&set" | | ||
ForEach-Object { | ||
If ($_ -match "=") { | ||
$v = $_.split("="); Set-Item -Force -Path "ENV:\$($v[0])" -Value "$($v[1])" | ||
} | ||
} | ||
Pop-Location | ||
Write-Host "Visual Studio Command Prompt variables set." -ForegroundColor Yellow | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.