Skip to content

Commit 5aad49d

Browse files
committed
Merge branch 'no_artifacts' into spirv_builder_cleanup
2 parents b55dcab + 86d74b6 commit 5aad49d

File tree

2 files changed

+6
-22
lines changed

2 files changed

+6
-22
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
- main
55
pull_request:
66
merge_group:
7+
workflow_dispatch:
78

89
name: CI
910

@@ -32,10 +33,6 @@ jobs:
3233
install_runtime: true
3334
cache: true
3435
stripdown: true
35-
36-
# FIXME(eddyb) consider using lavapipe instead, or even trying both.
37-
install_swiftshader: true
38-
# install_lavapipe: true
3936
- if: ${{ runner.os == 'Linux' }}
4037
name: Linux - Install native dependencies
4138
run: sudo apt install libwayland-cursor0 libxkbcommon-dev libwayland-dev
@@ -97,10 +94,6 @@ jobs:
9794
install_runtime: true
9895
cache: true
9996
stripdown: true
100-
101-
# FIXME(eddyb) consider using lavapipe instead, or even trying both.
102-
install_swiftshader: true
103-
# install_lavapipe: true
10497
- name: install rust-toolchain
10598
run: cargo version
10699
- name: cargo fetch --locked
@@ -145,10 +138,6 @@ jobs:
145138
install_runtime: true
146139
cache: true
147140
stripdown: true
148-
149-
# FIXME(eddyb) consider using lavapipe instead, or even trying both.
150-
install_swiftshader: true
151-
# install_lavapipe: true
152141
- name: install rust-toolchain
153142
run: echo "TARGET=$(rustc --print host-tuple)" >> "$GITHUB_ENV"
154143
- name: cargo fetch --locked
@@ -240,10 +229,6 @@ jobs:
240229
install_runtime: true
241230
cache: true
242231
stripdown: true
243-
244-
# FIXME(eddyb) consider using lavapipe instead, or even trying both.
245-
install_swiftshader: true
246-
# install_lavapipe: true
247232
# cargo version is a random command that forces the installation of rust-toolchain
248233
- name: install rust-toolchain
249234
run: cargo version

crates/spirv-builder/src/lib.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,10 @@ pub enum SpirvBuilderError {
121121
MetadataFileMissing(#[from] std::io::Error),
122122
#[error("unable to parse multi-module metadata file")]
123123
MetadataFileMalformed(#[from] serde_json::Error),
124+
#[error(
125+
"`{ARTIFACT_SUFFIX}` artifact not found in (supposedly successful) build output.\n--- build output ---\n{stdout}"
126+
)]
127+
NoArtifactProduced { stdout: String },
124128
#[error("cargo metadata error")]
125129
CargoMetadata(#[from] cargo_metadata::Error),
126130
#[cfg(feature = "watch")]
@@ -1086,12 +1090,7 @@ fn invoke_rustc(builder: &SpirvBuilder) -> Result<PathBuf, SpirvBuilderError> {
10861090
// that ended up on stdout instead of stderr.
10871091
let stdout = String::from_utf8(build.stdout).unwrap();
10881092
if build.status.success() {
1089-
get_sole_artifact(&stdout).ok_or_else(|| {
1090-
eprintln!("--- build output ---\n{stdout}");
1091-
panic!(
1092-
"`{ARTIFACT_SUFFIX}` artifact not found in (supposedly successful) build output (see above). Verify that `crate-type` is set correctly"
1093-
);
1094-
})
1093+
get_sole_artifact(&stdout).ok_or(SpirvBuilderError::NoArtifactProduced { stdout })
10951094
} else {
10961095
Err(SpirvBuilderError::BuildFailed)
10971096
}

0 commit comments

Comments
 (0)