Skip to content

Enable GCP runner for RHI workflow #1037

Enable GCP runner for RHI workflow

Enable GCP runner for RHI workflow #1037

Workflow file for this run

name: CI
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
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: windows, platform: "x86_64", compiler: msvc, preset: default, config: "Debug", flags: "unit-test", runs-on: { group: gcp, 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 only)
- { os: windows, platform: "x86_64", compiler: clang, preset: clang, config: "Release", runs-on: windows-latest }
- { os: linux, platform: "x86_64", compiler: gcc, preset: gcc, runs-on: ubuntu-latest }
- { os: windows, platform: "aarch64", compiler: msvc, preset: default, runs-on: windows-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') && matrix.runs-on.group != 'gcp'
run: |
./build/bin/slang-rhi-tests
- name: Unit Tests (Windows GCP)
if: contains(matrix.flags, 'unit-test') && matrix.os == 'windows' && matrix.runs-on.group == 'gcp'
run: |
.\build\bin\slang-rhi-tests.exe -tce=ray-tracing*
shell: powershell
- 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"