xtask: use --no-deps when building docs for the site #690
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
| # Happens on push to main, and all PRs | |
| 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 }} | |
| CARGO_GPU_COMMITSH: 31153a8edd3bc626d4b9fb0cd7bdb7a8b30797d3 | |
| jobs: | |
| # Installs cargo deps and sets the cache directory for subsequent jobs | |
| install-cargo-gpu: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, ubuntu-24.04, macos-latest] | |
| runs-on: ${{ matrix.os }} | |
| defaults: | |
| run: | |
| shell: bash | |
| env: | |
| RUST_LOG: debug | |
| RUNNER_OS: ${{ matrix.os }} | |
| outputs: | |
| cachepath-macOS: ${{ steps.cachepathstep.outputs.cachepath-macOS }} | |
| cachepath-Linux: ${{ steps.cachepathstep.outputs.cachepath-Linux }} | |
| cachepath-Windows: ${{ steps.cachepathstep.outputs.cachepath-Windows }} | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: actions/cache@v4 | |
| with: | |
| path: ~/.cargo | |
| # THIS KEY MUST MATCH BELOW | |
| key: cargo-cache-${{ env.CARGO_GPU_COMMITSH }}-${{ runner.os }} | |
| - uses: moonrepo/setup-rust@v1 | |
| - run: rustup default stable | |
| - run: rustup update | |
| - run: | | |
| cargo install --git https://github.com/rust-gpu/cargo-gpu --rev $CARGO_GPU_COMMITSH cargo-gpu | |
| - run: cargo gpu show commitsh | |
| - id: cachepathstep | |
| run: | | |
| CACHE_PATH=`cargo gpu show cache-directory` | |
| echo $CACHE_PATH | |
| echo "cachepath-$RUNNER_OS=$CACHE_PATH" >> "$GITHUB_OUTPUT" | |
| # Builds the shaders and ensures there is no git diff | |
| renderling-build-shaders: | |
| needs: install-cargo-gpu | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # temporarily skip windows, revisit after a fix for this error is found: | |
| # https://github.com/rust-lang/cc-rs/issues/1331 | |
| os: [ubuntu-latest, ubuntu-24.04, macos-latest] #, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| defaults: | |
| run: | |
| shell: bash | |
| env: | |
| RUST_LOG: debug | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: actions/cache@v4 | |
| with: | |
| path: ~/.cargo | |
| # THIS KEY MUST MATCH ABOVE | |
| key: cargo-cache-${{ env.CARGO_GPU_COMMITSH }}-${{ runner.os }} | |
| - uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ${{ needs.install-cargo-gpu.outputs.cachepath-macOS }} | |
| ${{ needs.install-cargo-gpu.outputs.cachepath-Linux }} | |
| ${{ needs.install-cargo-gpu.outputs.cachepath-Windows }} | |
| key: rust-gpu-cache-0-${{ runner.os }} | |
| - uses: moonrepo/setup-rust@v1 | |
| - run: cargo gpu show commitsh | |
| - run: rm -rf crates/renderling/src/linkage/* crates/renderling/shaders | |
| - run: cargo shaders | |
| - run: cargo linkage | |
| - run: cargo build -p renderling | |
| - run: git diff --exit-code --no-ext-diff | |
| # BAU clippy lints | |
| renderling-clippy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: moonrepo/setup-rust@v1 | |
| - run: cargo clippy | |
| # Ensures the example glTF viewer compiles | |
| renderling-build-example: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: moonrepo/setup-rust@v1 | |
| - run: cargo build -p example | |
| # BAU tests | |
| renderling-test: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: moonrepo/setup-rust@v1 | |
| - uses: actions/cache@v4 | |
| with: | |
| path: ~/.cargo | |
| key: ${{ runner.os }}-test-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: ${{ runner.os }}-cargo- | |
| - name: Install linux deps | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get -y update | |
| sudo apt-get -y install mesa-vulkan-drivers libvulkan1 vulkan-tools vulkan-validationlayers | |
| - name: Install cargo-nextest | |
| run: cargo install --locked cargo-nextest || true | |
| - name: Test | |
| run: cargo nextest run -j 1 | |
| env: | |
| RUST_BACKTRACE: 1 | |
| - uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: test-output-${{ runner.os }} | |
| path: test_output | |
| ## WASM tests, commented out until we can get a proper headless browser on CI | |
| # renderling-wasm-test: | |
| # # strategy: | |
| # # matrix: | |
| # # # empty string means ff, --chrome is chrome | |
| # # browser: ["", "--chrome"] | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # - uses: actions/checkout@v2 | |
| # - uses: moonrepo/setup-rust@v1 | |
| # - uses: actions/cache@v4 | |
| # with: | |
| # path: ~/.cargo | |
| # key: ${{ runner.os }}-test-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| # restore-keys: ${{ runner.os }}-cargo- | |
| # - name: Install linux deps | |
| # if: runner.os == 'Linux' | |
| # run: | | |
| # sudo apt-get -y update | |
| # sudo apt-get -y install mesa-vulkan-drivers libvulkan1 vulkan-tools vulkan-validationlayers | |
| # - name: Install wasm-pack | |
| # run: cargo install --locked wasm-pack || true | |
| # - name: Test WASM | |
| # env: | |
| # RUST_LOG: info | |
| # run: cargo test-wasm --chrome #${{ matrix.browser }} | |
| # - uses: actions/upload-artifact@v4 | |
| # if: always() | |
| # with: | |
| # name: test-output-${{ runner.os }}-wasm | |
| # path: test_output |