Skip to content

Commit c55533d

Browse files
committed
Merge branch 'difftest_refactor' into vec3-12-bytes
2 parents 538314e + 1b4b2d9 commit c55533d

File tree

35 files changed

+1064
-399
lines changed

35 files changed

+1064
-399
lines changed

.cargo/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[alias]
22
compiletest = "run --release -p compiletests --"
3-
difftest = "run --release -p difftests --"
3+
difftest = "nextest run --release -P difftests -p difftests"
44
run-wasm = ["run", "--release", "-p", "run-wasm", "--"]
55

66
[target.'cfg(target_arch = "wasm32")']

.config/nextest.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[profile.default]
2+
default-filter = '!package(difftest*) & !package(compiletest*) & !package(example-runner-*)'
3+
fail-fast = false
4+
5+
[profile.difftests]
6+
default-filter = 'package(difftests)'
7+
slow-timeout = "2m"
8+
9+
[profile.difftest-runner]
10+
default-filter = 'package(difftest-runner) | package(difftest-types)'

.github/workflows/ci.yaml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
test:
1717
name: Test
1818
strategy:
19+
fail-fast: false
1920
matrix:
2021
os: [ ubuntu-24.04, windows-2022, macOS-latest ]
2122
runs-on: ${{ matrix.os }}
@@ -41,6 +42,8 @@ jobs:
4142
# figure out native target triple while we're at it
4243
- name: install rust-toolchain
4344
run: echo "TARGET=$(rustc --print host-tuple)" >> "$GITHUB_ENV"
45+
- name: install nextest
46+
uses: taiki-e/install-action@nextest
4447
# Fetch dependencies in a separate step to clearly show how long each part
4548
# of the testing takes
4649
- name: cargo fetch --locked
@@ -49,13 +52,13 @@ jobs:
4952
# Core crates
5053
# Compiled in --release because cargo compiletest would otherwise compile in release again.
5154
- name: rustc_codegen_spirv build
52-
run: cargo test -p rustc_codegen_spirv --release --no-default-features --features "use-installed-tools" --no-run
55+
run: cargo nextest run -p rustc_codegen_spirv --release --no-default-features --features "use-installed-tools" --no-run
5356

5457
- name: rustc_codegen_spirv test
55-
run: cargo test -p rustc_codegen_spirv --release --no-default-features --features "use-installed-tools"
58+
run: cargo nextest run -p rustc_codegen_spirv --release --no-default-features --features "use-installed-tools"
5659

5760
- name: workspace test (excluding examples & difftest)
58-
run: cargo test --release --workspace --exclude "example-runner-*" --exclude "difftest*" --no-default-features --features "use-installed-tools"
61+
run: cargo nextest run --release --workspace --exclude "example-runner-*" --exclude "difftest*" --no-default-features --features "use-installed-tools"
5962

6063
# Examples
6164
- name: cargo check examples
@@ -129,6 +132,7 @@ jobs:
129132
compiletest:
130133
name: Compiletest
131134
strategy:
135+
fail-fast: false
132136
matrix:
133137
os: [ ubuntu-24.04, windows-2022, macOS-latest ]
134138
runs-on: ${{ matrix.os }}
@@ -154,6 +158,7 @@ jobs:
154158
difftest:
155159
name: Difftest
156160
strategy:
161+
fail-fast: false
157162
matrix:
158163
os: [ ubuntu-24.04, windows-2022, macOS-latest ]
159164
runs-on: ${{ matrix.os }}
@@ -181,14 +186,18 @@ jobs:
181186
sudo apt install -y xvfb libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers
182187
- name: install rust-toolchain
183188
run: echo "TARGET=$(rustc --print host-tuple)" >> "$GITHUB_ENV"
189+
- name: install nextest
190+
uses: taiki-e/install-action@nextest
184191
- name: cargo fetch --locked
185192
run: cargo fetch --locked --target $TARGET
186193
- name: cargo fetch --locked difftests
187194
run: cargo fetch --locked --manifest-path=tests/difftests/tests/Cargo.toml --target $TARGET
188-
- name: test difftest
189-
run: cargo test -p "difftest*" --release --no-default-features --features "use-installed-tools"
195+
- name: test difftest-runner
196+
run: cargo nextest run -P difftest-runner -p difftest-runner -p difftest-types --release --no-default-features --features "use-installed-tools"
197+
- name: build difftests (without shaders)
198+
run: cargo build --manifest-path ./tests/difftests/tests/Cargo.toml --workspace --release --no-default-features --features "use-installed-tools"
190199
- name: difftests
191-
run: cargo run -p difftests --release --no-default-features --features "use-installed-tools"
200+
run: cargo nextest run -P difftests -p difftests --release --no-default-features --features "use-installed-tools"
192201

193202
# This allows us to have a single job we can branch protect on, rather than needing
194203
# to update the branch protection rules when the test matrix changes

Cargo.lock

Lines changed: 36 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ members = [
2929
"tests/compiletests",
3030
"tests/compiletests/deps-helper",
3131
"tests/difftests/bin",
32-
"tests/difftests/lib",
32+
"tests/difftests/runner",
33+
"tests/difftests/types",
3334
]
3435

3536
[workspace.package]
@@ -53,7 +54,9 @@ rustc_codegen_spirv-types = { path = "./crates/rustc_codegen_spirv-types", versi
5354
rustc_codegen_spirv-target-specs = { path = "crates/rustc_codegen_spirv-target-specs", version = "=0.9.0" }
5455

5556
# difftest libraries mirrored from difftest workspace
56-
difftest = { path = "tests/difftests/lib" }
57+
difftest = { path = "tests/difftests/tests/lib" }
58+
difftest-runner = { path = "tests/difftests/runner", default-features = false }
59+
difftest-types = { path = "tests/difftests/types" }
5760

5861
# External dependencies that need to be mentioned more than once.
5962
tracing = "0.1"

crates/rustc_codegen_spirv/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ skip-toolchain-check = []
3434
# HACK(eddyb) these only exist to unify features across dependency trees,
3535
# in order to avoid multiple separate instances of `rustc_codegen_spirv`.
3636
ahash = { version = "0.8.11", features = ["no-rng"] }
37-
bytemuck = { version = "1.20.0", features = ["aarch64_simd", "derive"] }
37+
bytemuck = { workspace = true, features = ["aarch64_simd"] }
3838
log = { version = "0.4.22", features = ["std"] }
3939
regex = { version = "1", features = ["perf"] }
4040
rustix = { version = "1.0.8", features = ["all-apis"] }

crates/spirv-std/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ workspace = true
1414
spirv-std-types.workspace = true
1515
spirv-std-macros.workspace = true
1616
bitflags = "1.3.2"
17-
bytemuck = { version = "1.18.0", features = ["derive"], optional = true }
17+
bytemuck = { workspace = true, optional = true }
1818

1919
[target.'cfg(target_arch = "spirv")'.dependencies]
2020
num-traits = { workspace = true, features = ["libm"] }

tests/difftests/bin/Cargo.toml

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,17 @@ repository.workspace = true
99
# See rustc_codegen_spirv/Cargo.toml for details on these features
1010
[features]
1111
default = ["use-compiled-tools"]
12-
use-installed-tools = []
13-
use-compiled-tools = []
12+
use-installed-tools = ["difftest-runner/use-installed-tools"]
13+
use-compiled-tools = ["difftest-runner/use-compiled-tools"]
1414

1515
[dependencies]
1616
anyhow = "1.0"
17-
tracing = "0.1"
18-
tracing-subscriber = { version = "0.3.20", features = ["fmt", "env-filter"] }
19-
tempfile = "3.5"
20-
tester = "0.9.1"
21-
serde = { version = "1.0", features = ["derive"] }
22-
serde_json = "1.0"
23-
thiserror = "2.0.12"
24-
toml = { version = "0.9.2", default-features = false, features = ["parse", "serde"] }
25-
bytesize = "2.0.1"
26-
bytemuck = "1.21.0"
27-
difftest = { path = "../lib" }
28-
tabled = { version = "0.20.0", default-features = false, features = ["std"] }
17+
difftest-runner.workspace = true
2918

3019
[lints]
3120
workspace = true
21+
22+
[[test]]
23+
name = "difftests"
24+
path = "src/test.rs"
25+
harness = false

0 commit comments

Comments
 (0)