feat: use cargo-gpu instead of out-of-workspace shaders binary #451
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: push | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
env: | |
# For setup-rust, see https://github.com/moonrepo/setup-rust/issues/22 | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
jobs: | |
renderling-build-shaders: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: moonrepo/setup-rust@v1 | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
workspaces: shaders | |
# ensure the shader binaries were properly checked in | |
- run: cargo +nightly-2024-04-24 install --git https://github.com/rust-gpu/cargo-gpu | |
- run: rm -rf crates/renderling/src/linkage/* | |
- run: RUST_LOG=trace cargo shaders | |
- run: git diff --exit-code --no-ext-diff crates/renderling/src/linkage | |
renderling-clippy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: moonrepo/setup-rust@v1 | |
- run: cargo clippy | |
renderling-build-example: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: moonrepo/setup-rust@v1 | |
- run: cargo build -p example | |
renderling-test-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: moonrepo/setup-rust@v1 | |
- run: sudo apt-get -y install mesa-vulkan-drivers libvulkan1 vulkan-tools vulkan-validationlayers | |
- run: cargo test | |
env: | |
RUST_BACKTRACE: 1 | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: test-output-linux | |
path: test_output/**/*.png | |
renderling-test-macos: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: moonrepo/setup-rust@v1 | |
- run: cargo test | |
env: | |
RUST_BACKTRACE: 1 | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: test-output-macos | |
path: test_output/**/*.png | |
renderling-test-windows: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: moonrepo/setup-rust@v1 | |
- run: cargo test | |
env: | |
RUST_BACKTRACE: 1 | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: test-output-windows | |
path: test_output/**/*.png | |
# various linuxes w/ physical gpus | |
# renderling-test-linux-other: | |
# continue-on-error: true | |
# strategy: | |
# matrix: | |
# label: [intel, amd, pi4] | |
# runs-on: ${{ matrix.label }} | |
# steps: | |
# - uses: actions/checkout@v2 | |
# - uses: moonrepo/setup-rust@v1 | |
# with: | |
# cache: false | |
# - uses: Swatinem/rust-cache@v2 | |
# with: | |
# cache-all-crates: "true" | |
# cache-on-failure: "true" | |
# - run: apt-get -q -y update && apt-get -q -y install mesa-vulkan-drivers libvulkan1 vulkan-tools vulkan-validationlayers | |
# - run: cargo test -j 1 -- --test-threads=1 --nocapture | |
# continue-on-error: ${{ matrix.label == 'pi4' }} | |
# env: | |
# RUST_BACKTRACE: 1 | |
# - uses: actions/upload-artifact@v4 | |
# if: always() | |
# with: | |
# name: test-output-${{ matrix.label }} | |
# path: test_output/**/*.png |