feat(metal): support for ray tracing + fixes #229
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: validate | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| types: [opened, synchronize] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| type: [Debug, Release] | |
| os: | |
| [ | |
| ubuntu-22.04, | |
| ubuntu-22.04-arm, | |
| windows-latest, | |
| macos-15-intel, | |
| macos-15, | |
| ] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: ccache | |
| uses: hendrikmuhs/ccache-action@v1.2 | |
| with: | |
| key: ${{ runner.os }}-plume-ccache-${{ matrix.type }} | |
| - name: Install Windows Dependencies | |
| if: runner.os == 'Windows' | |
| run: | | |
| choco install ninja | |
| vcpkg install sdl2 --triplet x64-windows-static | |
| Remove-Item -Path "C:\ProgramData\Chocolatey\bin\ccache.exe" -Force -ErrorAction SilentlyContinue | |
| "C:\vcpkg\installed\x64-windows-static\bin" >> $env:GITHUB_PATH | |
| - name: Install Linux Dependencies | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y ninja-build libsdl2-dev libgtk-3-dev | |
| # Install SDL2 | |
| echo ::group::install SDL2 | |
| wget https://www.libsdl.org/release/SDL2-2.26.1.tar.gz | |
| tar -xzf SDL2-2.26.1.tar.gz | |
| cd SDL2-2.26.1 | |
| ./configure | |
| make -j 10 | |
| sudo make install | |
| sudo cp -av /usr/local/lib/libSDL* /lib/x86_64-linux-gnu/ | |
| echo ::endgroup:: | |
| # Enable ccache | |
| export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | |
| - name: Install macOS Dependencies | |
| if: runner.os == 'macOS' | |
| run: | | |
| brew install ninja sdl2 | |
| - name: Configure Developer Command Prompt | |
| if: runner.os == 'Windows' | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| - name: Build Plume (Unix) | |
| if: runner.os != 'Windows' | |
| run: |- | |
| # enable ccache | |
| export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | |
| cmake -DCMAKE_BUILD_TYPE=${{ matrix.type }} -DPLUME_BUILD_EXAMPLES=ON -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_MAKE_PROGRAM=ninja -G Ninja -S . -B cmake-build | |
| cmake --build cmake-build --config ${{ matrix.type }} --target plume | |
| cmake --build cmake-build --config ${{ matrix.type }} --target plume_triangle | |
| - name: Build Plume (Windows) | |
| if: runner.os == 'Windows' | |
| run: |- | |
| # enable ccache | |
| set $env:PATH="$env:USERPROFILE/.cargo/bin;$env:PATH" | |
| $cpuCores = (Get-CimInstance -ClassName Win32_Processor).NumberOfLogicalProcessors | |
| # remove LLVM from PATH so it doesn't overshadow the one provided by VS | |
| $env:PATH = ($env:PATH -split ';' | Where-Object { $_ -ne 'C:\Program Files\LLVM\bin' }) -join ';' | |
| cmake -DCMAKE_BUILD_TYPE=${{ matrix.type }} -DPLUME_BUILD_EXAMPLES=ON -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER=clang-cl -DCMAKE_MAKE_PROGRAM=ninja -G Ninja -S . -B cmake-build | |
| cmake --build cmake-build --config ${{ matrix.type }} --target plume -j $cpuCores | |
| cmake --build cmake-build --config ${{ matrix.type }} --target plume_triangle -j $cpuCores | |
| - name: Upload Windows Build | |
| if: runner.os == 'Windows' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: plume-windows-${{ matrix.type }} | |
| path: | | |
| cmake-build/bin/plume_triangle.exe | |
| - name: Upload Linux Build | |
| if: runner.os == 'Linux' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: plume-linux-${{ matrix.type }}-${{ matrix.os }} | |
| path: | | |
| cmake-build/bin/plume_triangle | |
| - name: Upload macOS Build | |
| if: runner.os == 'macOS' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: plume-macos-${{ matrix.type }}-${{ matrix.os }} | |
| path: | | |
| cmake-build/bin/plume_triangle |