CUDA texture sampler support (#625) #1881
This file contains hidden or 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
| name: ci | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [main] | |
| paths-ignore: | |
| - "docs/**" | |
| - "LICENSES/**" | |
| - "LICENSE" | |
| - "**.md" | |
| - .github/workflows/ci-gcp.yml | |
| pull_request: | |
| branches: [main] | |
| paths-ignore: | |
| - "docs/**" | |
| - "LICENSES/**" | |
| - "LICENSE" | |
| - "**.md" | |
| - .github/workflows/ci-gcp.yml | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: ["windows", "linux", "macos"] | |
| platform: ["x86_64", "aarch64"] | |
| compiler: ["msvc", "gcc", "clang"] | |
| config: ["Debug", "Release"] | |
| exclude: | |
| # Exclude x86_64 for macos | |
| - { os: macos, platform: x86_64} | |
| # Exclude unavailable compilers | |
| - { os: windows, compiler: gcc } | |
| - { os: windows, platform: aarch64, compiler: clang } | |
| - { os: linux, compiler: msvc } | |
| - { os: macos, compiler: msvc } | |
| - { os: macos, compiler: gcc } | |
| include: | |
| # Builds running on self-hosted runners (build + tests) | |
| - { os: windows, platform: "x86_64", compiler: clang, preset: clang, config: "Debug", flags: "unit-test,coverage", runs-on: { group: nvrgfx, labels: [Windows, X64] } } | |
| - { os: windows, platform: "x86_64", compiler: msvc, preset: default, config: "Release", flags: "unit-test", runs-on: { group: nvrgfx, labels: [Windows, X64] } } | |
| - { os: linux, platform: "x86_64", compiler: clang, preset: clang, config: "Debug", flags: "unit-test,coverage", runs-on: { group: nvrgfx, labels: [Linux, X64] } } | |
| - { os: linux, platform: "x86_64", compiler: clang, preset: clang, config: "Release", flags: "unit-test", runs-on: { group: nvrgfx, labels: [Linux, X64] } } | |
| # Builds running on GitHub hosted runners (build + tests) | |
| - { os: macos, platform: "aarch64", compiler: clang, preset: default, config: "Debug", flags: "unit-test,coverage", runs-on: macos-latest } | |
| - { os: macos, platform: "aarch64", compiler: clang, preset: default, config: "Release", flags: "unit-test", runs-on: macos-latest } | |
| # Builds running on GitHub hosted runners (build + tests on WARP) | |
| - { os: windows, platform: "x86_64", compiler: clang, preset: clang, config: "Release", flags: "unit-test", runs-on: windows-latest } | |
| - { os: windows, platform: "x86_64", compiler: msvc, preset: default, config: "Debug", flags: "unit-test", runs-on: windows-latest } | |
| - { os: windows, platform: "aarch64", compiler: msvc, preset: default, config: "Release", flags: "unit-test", runs-on: windows-11-arm } | |
| # Raytracing tests are flakey on aarch64/Debug builds, so tests are currently disabled | |
| - { os: windows, platform: "aarch64", compiler: msvc, preset: default, config: "Debug", flags: "", runs-on: windows-11-arm } | |
| # Builds running on GitHub hosted runners (build only) | |
| - { os: linux, platform: "x86_64", compiler: gcc, preset: gcc, runs-on: ubuntu-latest } | |
| - { os: linux, platform: "aarch64", compiler: clang, preset: clang, runs-on: ubuntu-24.04-arm } | |
| - { os: linux, platform: "aarch64", compiler: gcc, preset: gcc, runs-on: ubuntu-24.04-arm } | |
| runs-on: ${{ matrix.runs-on }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: 'recursive' | |
| - name: Setup Linux | |
| if: matrix.os == 'linux' && contains(matrix.runs-on, 'ubuntu-') | |
| run: sudo apt-get update && sudo apt-get install -y xorg-dev | |
| - name: Setup MSVC | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| with: | |
| arch: ${{matrix.platform == 'aarch64' && 'amd64_arm64' || 'amd64'}} | |
| - name: Setup CMake/Ninja | |
| uses: lukka/get-cmake@latest | |
| - name: Configure | |
| run: cmake --preset ${{matrix.preset}} -S . -B build ${{ contains(matrix.flags, 'coverage') && '-DSLANG_RHI_ENABLE_COVERAGE=ON' || '' }} | |
| - name: Build | |
| run: cmake --build build --config ${{matrix.config}} | |
| - name: Unit Tests | |
| if: contains(matrix.flags, 'unit-test') | |
| run: ./slang-rhi-tests -check-devices | |
| working-directory: build/${{matrix.config}} | |
| - name: Unit Tests (OptiX 8.0) | |
| if: contains(matrix.flags, 'unit-test') | |
| run: ./slang-rhi-tests -tc="ray-tracing*.cuda" -check-devices -optix-version=80000 | |
| working-directory: build/${{matrix.config}} | |
| - name: Unit Tests (OptiX 8.1) | |
| if: contains(matrix.flags, 'unit-test') | |
| run: ./slang-rhi-tests -tc="ray-tracing*.cuda" -check-devices -optix-version=80100 | |
| working-directory: build/${{matrix.config}} | |
| - name: Coverage Report | |
| if: contains(matrix.flags, 'coverage') | |
| continue-on-error: true | |
| run: cmake --build build --config ${{matrix.config}} --target coverage | |
| - name: Upload Coveralls | |
| if: contains(matrix.flags, 'coverage') | |
| continue-on-error: true | |
| uses: coverallsapp/github-action@v2 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| path-to-lcov: ${{ github.workspace }}/build/coverage.lcov | |
| flag-name: ${{ matrix.os }}-${{ matrix.platform }} | |
| parallel: true | |
| finish: | |
| needs: build | |
| if: ${{ always() }} | |
| continue-on-error: true | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Finish Coveralls | |
| uses: coverallsapp/github-action@v2 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| parallel-finished: true | |
| carryforward: "windows-x86_64,linux-x86_64,macos-aarch64" |