diff --git a/ci/test-zig-image.sh b/ci/test-zig-image.sh index 6b3092d2b..2fdddc104 100755 --- a/ci/test-zig-image.sh +++ b/ci/test-zig-image.sh @@ -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` diff --git a/ci/test.sh b/ci/test.sh index eaa4f5d9b..6a164ae54 100755 --- a/ci/test.sh +++ b/ci/test.sh @@ -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 @@ -89,6 +93,7 @@ main() { popd rm -rf "${td}" + # thumb targets are tested in later steps elif [[ "${TARGET}" != thumb* ]]; then td=$(mkcargotemp -d) diff --git a/src/docker/provided_images.rs b/src/docker/provided_images.rs index f97d732cf..b7eacc25f 100644 --- a/src/docker/provided_images.rs +++ b/src/docker/provided_images.rs @@ -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], @@ -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], @@ -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], diff --git a/targets.toml b/targets.toml index 5aa40ca8a..042f8ba75 100644 --- a/targets.toml +++ b/targets.toml @@ -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 @@ -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. @@ -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 @@ -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 @@ -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" @@ -433,6 +438,7 @@ dylib = true std = true [[target]] +disabled = true # https://github.com/cross-rs/cross/issues/1424 target = "sparcv9-sun-solaris" os = "ubuntu-latest" cpp = true @@ -440,6 +446,7 @@ 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 diff --git a/xtask/src/build_docker_image.rs b/xtask/src/build_docker_image.rs index cf22e3cee..c747aba50 100644 --- a/xtask/src/build_docker_image.rs +++ b/xtask/src/build_docker_image.rs @@ -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 { diff --git a/xtask/src/ci/target_matrix.rs b/xtask/src/ci/target_matrix.rs index cc6779c55..4b8a518c3 100644 --- a/xtask/src/ci/target_matrix.rs +++ b/xtask/src/ci/target_matrix.rs @@ -34,6 +34,7 @@ pub enum TargetMatrixSub { impl TargetMatrix { pub(crate) fn run(&self) -> Result<(), color_eyre::Report> { let mut matrix: Vec = get_matrix().clone(); + matrix.retain(|t| !t.disabled); let mut is_default_try = false; let pr: Option; let (prs, mut app) = match self { @@ -411,6 +412,7 @@ mod tests { #[track_caller] fn run<'a>(args: impl IntoIterator) -> Vec { let mut matrix = get_matrix().clone(); + matrix.retain_mut(|t| !t.disabled); TargetMatrixArgs::try_parse_from(args) .unwrap() .filter(&mut matrix); @@ -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] diff --git a/xtask/src/codegen.rs b/xtask/src/codegen.rs index e835c4ec7..790d8aecb 100644 --- a/xtask/src/codegen.rs +++ b/xtask/src/codegen.rs @@ -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"); @@ -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, diff --git a/xtask/src/util.rs b/xtask/src/util.rs index 11343e4e2..04f1b8cec 100644 --- a/xtask/src/util.rs +++ b/xtask/src/util.rs @@ -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, + #[serde(skip_serializing_if = "is_false", default)] + pub disabled: bool, +} + +pub fn is_false(b: &bool) -> bool { + !*b } impl CiTarget {