Skip to content

Commit

Permalink
disable/fix failing targets (#1432)
Browse files Browse the repository at this point in the history
Touches on
#1422
#1423
#1424

resolves #1425 (kinda)
  • Loading branch information
Emilgardis committed Feb 6, 2024
2 parents ea50548 + 198f71a commit 15ba0b1
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 45 deletions.
5 changes: 3 additions & 2 deletions ci/test-zig-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ ci_dir=$(realpath "${ci_dir}")
TARGETS=(
"aarch64-unknown-linux-gnu"
"aarch64-unknown-linux-musl"
"i586-unknown-linux-gnu"
"i586-unknown-linux-musl"
# disabled, see https://github.com/cross-rs/cross/issues/1425
#"i586-unknown-linux-gnu"
#"i586-unknown-linux-musl"
)

# on CI, it sets `CROSS_TARGET_ZIG_IMAGE` rather than `CROSS_BUILD_ZIG_IMAGE`
Expand Down
5 changes: 5 additions & 0 deletions ci/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ main() {
# don't use xargo: should have native support just from rustc
rustup toolchain add nightly
CROSS+=("+nightly")
elif [[ "${TARGET}" == "riscv64gc-unknown-linux-gnu" ]]; then
# FIXME: riscv64gc-unknown-linux-gnu is broken on rustc 1.75, see https://github.com/cross-rs/cross/issues/1423
rustup toolchain add 1.70
CROSS+=("+1.70")
fi

if (( ${STD:-0} )); then
Expand Down Expand Up @@ -89,6 +93,7 @@ main() {
popd

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

Expand Down
30 changes: 0 additions & 30 deletions src/docker/provided_images.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,6 @@ pub static PROVIDED_IMAGES: &[ProvidedImage] = &[
platforms: &[ImagePlatform::X86_64_UNKNOWN_LINUX_GNU],
sub: None
},
ProvidedImage {
name: "mips64-unknown-linux-muslabi64",
platforms: &[ImagePlatform::X86_64_UNKNOWN_LINUX_GNU],
sub: None
},
ProvidedImage {
name: "mips64el-unknown-linux-muslabi64",
platforms: &[ImagePlatform::X86_64_UNKNOWN_LINUX_GNU],
sub: None
},
ProvidedImage {
name: "powerpc-unknown-linux-gnu",
platforms: &[ImagePlatform::X86_64_UNKNOWN_LINUX_GNU],
Expand Down Expand Up @@ -163,16 +153,6 @@ pub static PROVIDED_IMAGES: &[ProvidedImage] = &[
platforms: &[ImagePlatform::X86_64_UNKNOWN_LINUX_GNU],
sub: None
},
ProvidedImage {
name: "mips-unknown-linux-musl",
platforms: &[ImagePlatform::X86_64_UNKNOWN_LINUX_GNU],
sub: None
},
ProvidedImage {
name: "mipsel-unknown-linux-musl",
platforms: &[ImagePlatform::X86_64_UNKNOWN_LINUX_GNU],
sub: None
},
ProvidedImage {
name: "aarch64-linux-android",
platforms: &[ImagePlatform::X86_64_UNKNOWN_LINUX_GNU],
Expand Down Expand Up @@ -243,16 +223,6 @@ pub static PROVIDED_IMAGES: &[ProvidedImage] = &[
platforms: &[ImagePlatform::X86_64_UNKNOWN_LINUX_GNU],
sub: None
},
ProvidedImage {
name: "sparcv9-sun-solaris",
platforms: &[ImagePlatform::X86_64_UNKNOWN_LINUX_GNU],
sub: None
},
ProvidedImage {
name: "x86_64-sun-solaris",
platforms: &[ImagePlatform::X86_64_UNKNOWN_LINUX_GNU],
sub: None
},
ProvidedImage {
name: "x86_64-unknown-illumos",
platforms: &[ImagePlatform::X86_64_UNKNOWN_LINUX_GNU],
Expand Down
19 changes: 13 additions & 6 deletions targets.toml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ runners = "qemu-user qemu-system"
build-std = true

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

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

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

[[target]]
disabled = true # https://github.com/cross-rs/cross/issues/1422
target = "mipsel-unknown-linux-musl"
os = "ubuntu-latest"
cpp = true
Expand Down Expand Up @@ -380,13 +384,14 @@ cpp = true
std = true
run = true

[[target]]
# Disabled for now, see https://github.com/rust-lang/rust/issues/98216 & https://github.com/cross-rs/cross/issues/634
# [[target]]
# target = "asmjs-unknown-emscripten"
# os = "ubuntu-latest"
# cpp = true
# std = true
# run = true
disabled = true
target = "asmjs-unknown-emscripten"
os = "ubuntu-latest"
cpp = true
std = true
run = true

[[target]]
target = "wasm32-unknown-emscripten"
Expand Down Expand Up @@ -433,13 +438,15 @@ dylib = true
std = true

[[target]]
disabled = true # https://github.com/cross-rs/cross/issues/1424
target = "sparcv9-sun-solaris"
os = "ubuntu-latest"
cpp = true
dylib = true
std = true

[[target]]
disabled = true # https://github.com/cross-rs/cross/issues/1424
target = "x86_64-sun-solaris"
os = "ubuntu-latest"
cpp = true
Expand Down
1 change: 1 addition & 0 deletions xtask/src/build_docker_image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ pub fn build_docker_image(
targets = get_matrix()
.iter()
.filter(|m| m.os.starts_with("ubuntu"))
.filter(|m| !m.disabled)
.map(|m| m.to_image_target())
.collect();
} else {
Expand Down
6 changes: 5 additions & 1 deletion xtask/src/ci/target_matrix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ pub enum TargetMatrixSub {
impl TargetMatrix {
pub(crate) fn run(&self) -> Result<(), color_eyre::Report> {
let mut matrix: Vec<CiTarget> = get_matrix().clone();
matrix.retain(|t| !t.disabled);
let mut is_default_try = false;
let pr: Option<String>;
let (prs, mut app) = match self {
Expand Down Expand Up @@ -411,6 +412,7 @@ mod tests {
#[track_caller]
fn run<'a>(args: impl IntoIterator<Item = &'a str>) -> Vec<CiTarget> {
let mut matrix = get_matrix().clone();
matrix.retain_mut(|t| !t.disabled);
TargetMatrixArgs::try_parse_from(args)
.unwrap()
.filter(&mut matrix);
Expand Down Expand Up @@ -468,7 +470,9 @@ mod tests {
#[test]
fn all() {
let matrix = run([]);
assert_eq!(get_matrix(), &matrix);
let mut all = get_matrix().clone();
all.retain(|t| !t.disabled);
assert_eq!(&all, &matrix);
}

#[test]
Expand Down
8 changes: 2 additions & 6 deletions xtask/src/codegen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@ use std::fmt::Write;
use crate::util::{get_cargo_workspace, get_matrix};

#[derive(Args, Debug)]
pub struct Codegen {
/// Provide verbose diagnostic output.
#[clap(short, long)]
verbose: bool,
}
pub struct Codegen {}

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

for image_target in get_matrix()
.iter()
.filter(|i| i.builds_image() && i.to_image_target().is_toolchain_image())
.filter(|i| i.builds_image() && i.to_image_target().is_toolchain_image() && !i.disabled)
{
write!(
&mut images,
Expand Down
6 changes: 6 additions & 0 deletions xtask/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ pub struct CiTarget {
/// if `true` test no std support as if std does exists. If `false` build https://github.com/rust-lang/compiler-builtins
#[serde(skip_serializing_if = "Option::is_none")]
pub std: Option<bool>,
#[serde(skip_serializing_if = "is_false", default)]
pub disabled: bool,
}

pub fn is_false(b: &bool) -> bool {
!*b
}

impl CiTarget {
Expand Down

0 comments on commit 15ba0b1

Please sign in to comment.