summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoramey asgaonkar <160177341+aasgaonkar@users.noreply.github.com>2025-05-22 18:30:00 -0700
committerGitHub <noreply@github.com>2025-05-22 18:30:00 -0700
commit2d34409f2e72673ac9fd766eaeaa75f60882e7ca (patch)
treec3b074b05b00d009d8efc32e76cbb41116060096
parent1ad34781514a0b22ff48374b6de7ac1d3976f313 (diff)
Add slangpy testing in slang CI (#7083)
* Add slangpy testing in slang CI * Add slangpy tests to CI * break CI to test
-rw-r--r--.github/workflows/ci.yml21
1 files changed, 20 insertions, 1 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index dbfd35ca3..03c6dcd53 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -69,7 +69,7 @@ jobs:
platform: x86_64
test-category: full
full-gpu-tests: true
- runs-on: [Windows, self-hosted]
+ runs-on: [Windows, self-hosted, GCP-T4]
has-gpu: true
server-count: 8
# Self-hosted full gpu build - debug
@@ -246,6 +246,25 @@ jobs:
-expected-failure-list tests/expected-failure.txt \
-skip-reference-image-generation \
-show-adapter-info
+ - name: Run slangpy tests
+ if: steps.filter.outputs.should-run == 'true' && matrix.platform != 'wasm' && matrix.full-gpu-tests
+ shell: pwsh
+ run: |
+ python --version
+ Write-Host "Cleaning up existing installations..."
+ Start-Process -FilePath "python" -ArgumentList "-m pip uninstall -y slangpy" -Verb RunAs -Wait
+ Write-Host "Installing slangpy..."
+ python -m pip install --no-cache-dir --verbose slangpy --user
+ Write-Host "Getting Python site-packages directory and copying library files (DLL, SO, DYLIB)..."
+ $SITE_PACKAGES = python -c "import slangpy; print(slangpy.__file__.rsplit('\\', 2)[0])"
+ Write-Host "Site packages directory: $SITE_PACKAGES"
+ Write-Host "Copying library files..."
+ Copy-Item -Path "$bin_dir\*" -Include "*.dll","*.so","*.dylib" -Destination "$SITE_PACKAGES\slangpy\" -Force -ErrorAction Continue
+ Write-Host "Listing files in slangpy directory..."
+ Get-ChildItem -Path "$SITE_PACKAGES\slangpy" | Write-Host
+ Write-Host "Running pytest on slangpy tests..."
+ $env:PYTHONPATH = "$SITE_PACKAGES"
+ python -m pytest "$SITE_PACKAGES\slangpy\tests" -v
- uses: actions/upload-artifact@v4
if: steps.filter.outputs.should-run == 'true' && ! matrix.full-gpu-tests
with: