Skip to content
This repository was archived by the owner on Apr 15, 2026. It is now read-only.

Commit b9f8028

Browse files
committed
ci: split main test between test-os and test-rust-gpu-versions jobs
1 parent 5721eb3 commit b9f8028

1 file changed

Lines changed: 33 additions & 22 deletions

File tree

.github/workflows/push.yaml

Lines changed: 33 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,63 +5,74 @@ on:
55
branches:
66
- main
77
pull_request:
8+
workflow_dispatch:
89

910
env:
1011
# For setup-rust, see https://github.com/moonrepo/setup-rust/issues/22
1112
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1213

1314
jobs:
14-
install-and-build-shaders:
15+
test-os:
1516
strategy:
1617
fail-fast: false
1718
matrix:
1819
os:
1920
- ubuntu-latest
2021
- macos-latest
2122
- windows-latest
22-
rust-gpu-version: [latest]
23-
include:
23+
runs-on: ${{ matrix.os }}
24+
env:
25+
RUST_LOG: debug
26+
steps:
27+
- uses: actions/checkout@v4
28+
- uses: cargo-bins/cargo-binstall@main
29+
- run: cargo binstall cargo-nextest
30+
- run: cargo fetch --locked
31+
- name: shader-crate-template cargo fetch --locked
32+
run: |
33+
cd ./crates/shader-crate-template
34+
cargo fetch --locked
35+
- run: cargo nextest run
36+
- name: Run a full build
37+
run: cargo xtask test-build
38+
39+
test-rust-gpu-releases:
40+
strategy:
41+
fail-fast: false
42+
matrix:
43+
rust-gpu-version:
2444
# As well as testing on each OS, we also want to test to make sure we're still supporting
2545
# older versions of `rust-gpu`. However, we can assume that these tests are already okay
2646
# across platforms, so we only need to test on Linux, the chepeast in terms of minutes.
2747
#
2848
# `0.7.0` currently fails building `spirv-builder-cli` with:
2949
# """
30-
# package `is_terminal_polyfill v1.70.1` cannot be built because it requires rustc
50+
# package `is_terminal_polyfill v1.70.1` cannot be built because it requires rustc
3151
# 1.70.0 or newer, while the currently active rustc version is 1.69.0-nightly
3252
# """
3353
# It's probably easily fixable. But also `0.7.0` was released in April 2023, so there's
3454
# unlikely many users of it?
35-
- os: ubuntu-latest
36-
rust-gpu-version: 0.8.0
37-
- os: ubuntu-latest
38-
rust-gpu-version: 0.9.0
39-
runs-on: ${{ matrix.os }}
40-
defaults:
41-
run:
42-
shell: bash
55+
- 0.8.0
56+
- 0.9.0
57+
runs-on: ubuntu-latest
4358
env:
4459
RUST_LOG: debug
4560
steps:
4661
- uses: actions/checkout@v4
47-
- name: Fetch root dependencies
48-
run: cargo fetch --locked
49-
- name: Fetch shader-crate-template dependencies
50-
run: |
51-
cd ./crates/shader-crate-template
52-
cargo fetch --locked
53-
- run: cargo test
5462
- name: Run a full build
5563
run: cargo xtask test-build --rust-gpu-version ${{ matrix.rust-gpu-version }}
56-
64+
5765
lints:
5866
runs-on: ubuntu-latest
5967
steps:
6068
- uses: actions/checkout@v4
6169
- uses: cargo-bins/cargo-binstall@main
62-
- name: Install cargo-shear
63-
run: cargo binstall cargo-shear
70+
- run: cargo binstall cargo-shear
6471
- run: cargo fetch --locked
6572
- run: cargo clippy -- --deny warnings
6673
- run: cargo fmt --check
6774
- run: cargo shear
75+
76+
defaults:
77+
run:
78+
shell: bash

0 commit comments

Comments
 (0)