Skip to content

Commit 15ba0b1

Browse files
authored
disable/fix failing targets (#1432)
Touches on #1422 #1423 #1424 resolves #1425 (kinda)
2 parents ea50548 + 198f71a commit 15ba0b1

File tree

8 files changed

+35
-45
lines changed

8 files changed

+35
-45
lines changed

ci/test-zig-image.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ ci_dir=$(realpath "${ci_dir}")
1616
TARGETS=(
1717
"aarch64-unknown-linux-gnu"
1818
"aarch64-unknown-linux-musl"
19-
"i586-unknown-linux-gnu"
20-
"i586-unknown-linux-musl"
19+
# disabled, see https://github.com/cross-rs/cross/issues/1425
20+
#"i586-unknown-linux-gnu"
21+
#"i586-unknown-linux-musl"
2122
)
2223

2324
# on CI, it sets `CROSS_TARGET_ZIG_IMAGE` rather than `CROSS_BUILD_ZIG_IMAGE`

ci/test.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ main() {
4848
# don't use xargo: should have native support just from rustc
4949
rustup toolchain add nightly
5050
CROSS+=("+nightly")
51+
elif [[ "${TARGET}" == "riscv64gc-unknown-linux-gnu" ]]; then
52+
# FIXME: riscv64gc-unknown-linux-gnu is broken on rustc 1.75, see https://github.com/cross-rs/cross/issues/1423
53+
rustup toolchain add 1.70
54+
CROSS+=("+1.70")
5155
fi
5256

5357
if (( ${STD:-0} )); then
@@ -89,6 +93,7 @@ main() {
8993
popd
9094

9195
rm -rf "${td}"
96+
# thumb targets are tested in later steps
9297
elif [[ "${TARGET}" != thumb* ]]; then
9398
td=$(mkcargotemp -d)
9499

src/docker/provided_images.rs

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -78,16 +78,6 @@ pub static PROVIDED_IMAGES: &[ProvidedImage] = &[
7878
platforms: &[ImagePlatform::X86_64_UNKNOWN_LINUX_GNU],
7979
sub: None
8080
},
81-
ProvidedImage {
82-
name: "mips64-unknown-linux-muslabi64",
83-
platforms: &[ImagePlatform::X86_64_UNKNOWN_LINUX_GNU],
84-
sub: None
85-
},
86-
ProvidedImage {
87-
name: "mips64el-unknown-linux-muslabi64",
88-
platforms: &[ImagePlatform::X86_64_UNKNOWN_LINUX_GNU],
89-
sub: None
90-
},
9181
ProvidedImage {
9282
name: "powerpc-unknown-linux-gnu",
9383
platforms: &[ImagePlatform::X86_64_UNKNOWN_LINUX_GNU],
@@ -163,16 +153,6 @@ pub static PROVIDED_IMAGES: &[ProvidedImage] = &[
163153
platforms: &[ImagePlatform::X86_64_UNKNOWN_LINUX_GNU],
164154
sub: None
165155
},
166-
ProvidedImage {
167-
name: "mips-unknown-linux-musl",
168-
platforms: &[ImagePlatform::X86_64_UNKNOWN_LINUX_GNU],
169-
sub: None
170-
},
171-
ProvidedImage {
172-
name: "mipsel-unknown-linux-musl",
173-
platforms: &[ImagePlatform::X86_64_UNKNOWN_LINUX_GNU],
174-
sub: None
175-
},
176156
ProvidedImage {
177157
name: "aarch64-linux-android",
178158
platforms: &[ImagePlatform::X86_64_UNKNOWN_LINUX_GNU],
@@ -243,16 +223,6 @@ pub static PROVIDED_IMAGES: &[ProvidedImage] = &[
243223
platforms: &[ImagePlatform::X86_64_UNKNOWN_LINUX_GNU],
244224
sub: None
245225
},
246-
ProvidedImage {
247-
name: "sparcv9-sun-solaris",
248-
platforms: &[ImagePlatform::X86_64_UNKNOWN_LINUX_GNU],
249-
sub: None
250-
},
251-
ProvidedImage {
252-
name: "x86_64-sun-solaris",
253-
platforms: &[ImagePlatform::X86_64_UNKNOWN_LINUX_GNU],
254-
sub: None
255-
},
256226
ProvidedImage {
257227
name: "x86_64-unknown-illumos",
258228
platforms: &[ImagePlatform::X86_64_UNKNOWN_LINUX_GNU],

targets.toml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ runners = "qemu-user qemu-system"
154154
build-std = true
155155

156156
[[target]]
157+
disabled = true # https://github.com/cross-rs/cross/issues/1422
157158
target = "mips64-unknown-linux-muslabi64"
158159
os = "ubuntu-latest"
159160
cpp = true
@@ -163,6 +164,7 @@ run = true
163164
build-std = true
164165

165166
[[target]]
167+
disabled = true # https://github.com/cross-rs/cross/issues/1422
166168
target = "mips64el-unknown-linux-muslabi64"
167169
os = "ubuntu-latest"
168170
# FIXME: Lacking partial C++ support due to missing compiler builtins.
@@ -302,6 +304,7 @@ run = true
302304
runners = "qemu-user"
303305

304306
[[target]]
307+
disabled = true # https://github.com/cross-rs/cross/issues/1422
305308
target = "mips-unknown-linux-musl"
306309
os = "ubuntu-latest"
307310
cpp = true
@@ -311,6 +314,7 @@ run = true
311314
build-std = true
312315

313316
[[target]]
317+
disabled = true # https://github.com/cross-rs/cross/issues/1422
314318
target = "mipsel-unknown-linux-musl"
315319
os = "ubuntu-latest"
316320
cpp = true
@@ -380,13 +384,14 @@ cpp = true
380384
std = true
381385
run = true
382386

387+
[[target]]
383388
# Disabled for now, see https://github.com/rust-lang/rust/issues/98216 & https://github.com/cross-rs/cross/issues/634
384-
# [[target]]
385-
# target = "asmjs-unknown-emscripten"
386-
# os = "ubuntu-latest"
387-
# cpp = true
388-
# std = true
389-
# run = true
389+
disabled = true
390+
target = "asmjs-unknown-emscripten"
391+
os = "ubuntu-latest"
392+
cpp = true
393+
std = true
394+
run = true
390395

391396
[[target]]
392397
target = "wasm32-unknown-emscripten"
@@ -433,13 +438,15 @@ dylib = true
433438
std = true
434439

435440
[[target]]
441+
disabled = true # https://github.com/cross-rs/cross/issues/1424
436442
target = "sparcv9-sun-solaris"
437443
os = "ubuntu-latest"
438444
cpp = true
439445
dylib = true
440446
std = true
441447

442448
[[target]]
449+
disabled = true # https://github.com/cross-rs/cross/issues/1424
443450
target = "x86_64-sun-solaris"
444451
os = "ubuntu-latest"
445452
cpp = true

xtask/src/build_docker_image.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ pub fn build_docker_image(
137137
targets = get_matrix()
138138
.iter()
139139
.filter(|m| m.os.starts_with("ubuntu"))
140+
.filter(|m| !m.disabled)
140141
.map(|m| m.to_image_target())
141142
.collect();
142143
} else {

xtask/src/ci/target_matrix.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ pub enum TargetMatrixSub {
3434
impl TargetMatrix {
3535
pub(crate) fn run(&self) -> Result<(), color_eyre::Report> {
3636
let mut matrix: Vec<CiTarget> = get_matrix().clone();
37+
matrix.retain(|t| !t.disabled);
3738
let mut is_default_try = false;
3839
let pr: Option<String>;
3940
let (prs, mut app) = match self {
@@ -411,6 +412,7 @@ mod tests {
411412
#[track_caller]
412413
fn run<'a>(args: impl IntoIterator<Item = &'a str>) -> Vec<CiTarget> {
413414
let mut matrix = get_matrix().clone();
415+
matrix.retain_mut(|t| !t.disabled);
414416
TargetMatrixArgs::try_parse_from(args)
415417
.unwrap()
416418
.filter(&mut matrix);
@@ -468,7 +470,9 @@ mod tests {
468470
#[test]
469471
fn all() {
470472
let matrix = run([]);
471-
assert_eq!(get_matrix(), &matrix);
473+
let mut all = get_matrix().clone();
474+
all.retain(|t| !t.disabled);
475+
assert_eq!(&all, &matrix);
472476
}
473477

474478
#[test]

xtask/src/codegen.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,7 @@ use std::fmt::Write;
55
use crate::util::{get_cargo_workspace, get_matrix};
66

77
#[derive(Args, Debug)]
8-
pub struct Codegen {
9-
/// Provide verbose diagnostic output.
10-
#[clap(short, long)]
11-
verbose: bool,
12-
}
8+
pub struct Codegen {}
139

1410
pub fn codegen(Codegen { .. }: Codegen) -> cross::Result<()> {
1511
let path = get_cargo_workspace().join("src/docker/provided_images.rs");
@@ -28,7 +24,7 @@ pub static PROVIDED_IMAGES: &[ProvidedImage] = &["#,
2824

2925
for image_target in get_matrix()
3026
.iter()
31-
.filter(|i| i.builds_image() && i.to_image_target().is_toolchain_image())
27+
.filter(|i| i.builds_image() && i.to_image_target().is_toolchain_image() && !i.disabled)
3228
{
3329
write!(
3430
&mut images,

xtask/src/util.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,12 @@ pub struct CiTarget {
6464
/// if `true` test no std support as if std does exists. If `false` build https://github.com/rust-lang/compiler-builtins
6565
#[serde(skip_serializing_if = "Option::is_none")]
6666
pub std: Option<bool>,
67+
#[serde(skip_serializing_if = "is_false", default)]
68+
pub disabled: bool,
69+
}
70+
71+
pub fn is_false(b: &bool) -> bool {
72+
!*b
6773
}
6874

6975
impl CiTarget {

0 commit comments

Comments
 (0)