WGPU: Create cube textures with one layer per face (#108) #279
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
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, 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: msvc, flags: "unit-test", runs-on: { group: nvrgfx, labels: [Windows, X64] } } | |
- {os: linux, platform: "x86_64", compiler: gcc, flags: "unit-test", runs-on: { group: nvrgfx, labels: [Linux, X64] } } | |
# Builds running on GitHub hosted runners (build + tests) | |
- { os: macos, platform: "aarch64", compiler: clang, flags: "unit-test", runs-on: [macos-latest] } | |
# Builds running on GitHub hosted runners (build only) | |
- { os: linux, platform: "x86_64", compiler: clang, runs-on: [ubuntu-latest] } | |
- { os: windows, platform: "aarch64", runs-on: [windows-latest] } | |
- { os: linux, platform: "aarch64", runs-on: [ubuntu-latest] } | |
runs-on: ${{ matrix.runs-on }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Setup Linux | |
if: matrix.os == 'linux' && contains(matrix.runs-on, 'ubuntu-latest') | |
run: sudo apt-get update && sudo apt-get install -y xorg-dev | |
- name: Setup Linux (aarch64 cross-compilation) | |
if: matrix.os == 'linux' && matrix.platform == 'aarch64' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y crossbuild-essential-arm64 | |
echo "CC=aarch64-linux-gnu-gcc" >> "$GITHUB_ENV" | |
echo "CXX=aarch64-linux-gnu-g++" >> "$GITHUB_ENV" | |
echo "CMAKE_ARGS='-DSLANG_RHI_BUILD_EXAMPLES=0'" >> "$GITHUB_ENV" | |
- 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 default -S . -B build ${{env.CMAKE_ARGS}} | |
- name: Build | |
run: cmake --build build --config ${{matrix.config}} | |
- name: Unit Tests | |
if: contains(matrix.flags, 'unit-test') | |
run: ctest --test-dir build --build-config ${{matrix.config}} --verbose |