From d75362cda8e6f7e80799f4ab889a949a4003a0c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20Gardstr=C3=B6m?= Date: Thu, 1 Feb 2024 20:38:44 +0100 Subject: [PATCH 1/9] disable failing zig tests --- ci/test-zig-image.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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` From 588b583cd8380192eb1f8ae5fa20c5253b0cfaf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20Gardstr=C3=B6m?= Date: Thu, 1 Feb 2024 20:46:15 +0100 Subject: [PATCH 2/9] allow disabling targets --- xtask/src/build_docker_image.rs | 1 + xtask/src/ci/target_matrix.rs | 6 +++++- xtask/src/codegen.rs | 8 ++------ xtask/src/util.rs | 6 ++++++ 4 files changed, 14 insertions(+), 7 deletions(-) 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 { From ee771524344db1ab3e4bfccc1281ea5ba598282d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20Gardstr=C3=B6m?= Date: Thu, 1 Feb 2024 20:53:16 +0100 Subject: [PATCH 3/9] disable solaris --- src/docker/provided_images.rs | 10 ---------- targets.toml | 2 ++ 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/docker/provided_images.rs b/src/docker/provided_images.rs index f97d732cf..c40766fa5 100644 --- a/src/docker/provided_images.rs +++ b/src/docker/provided_images.rs @@ -243,16 +243,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..c6e07e468 100644 --- a/targets.toml +++ b/targets.toml @@ -433,6 +433,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 +441,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 From 81b9dcd9cf1461040c9406bc54e390857cf6b7c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20Gardstr=C3=B6m?= Date: Thu, 1 Feb 2024 21:10:11 +0100 Subject: [PATCH 4/9] test riscv with rustc 1.74 --- ci/test.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ci/test.sh b/ci/test.sh index eaa4f5d9b..553bef6f8 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.74 + CROSS+=("+1.74") 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) From a89e7c88b3c8e8b59a0e1ef9b11185c26ffbeb19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20Gardstr=C3=B6m?= Date: Thu, 1 Feb 2024 21:40:37 +0100 Subject: [PATCH 5/9] disable `mips*musl` targets --- src/docker/provided_images.rs | 20 -------------------- targets.toml | 4 ++++ 2 files changed, 4 insertions(+), 20 deletions(-) diff --git a/src/docker/provided_images.rs b/src/docker/provided_images.rs index c40766fa5..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], diff --git a/targets.toml b/targets.toml index c6e07e468..678ad4af6 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 From ac5c2e2dc87cb7c261913b2b17236604498dbe5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20Gardstr=C3=B6m?= Date: Fri, 2 Feb 2024 00:16:10 +0100 Subject: [PATCH 6/9] wrong conditional for riscv64gc-unknown-linux-gnu check --- ci/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/test.sh b/ci/test.sh index 553bef6f8..feecf33df 100755 --- a/ci/test.sh +++ b/ci/test.sh @@ -48,7 +48,7 @@ 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 + 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.74 CROSS+=("+1.74") From ee2befd7e844786e0d574ce3260829b2fb0703c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20Gardstr=C3=B6m?= Date: Fri, 2 Feb 2024 00:22:29 +0100 Subject: [PATCH 7/9] disable asmjs properly --- targets.toml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/targets.toml b/targets.toml index 678ad4af6..042f8ba75 100644 --- a/targets.toml +++ b/targets.toml @@ -384,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" From 346d1af4b2fd65f02af3053a0669fb1204a72441 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20Gardstr=C3=B6m?= Date: Fri, 2 Feb 2024 00:40:21 +0100 Subject: [PATCH 8/9] 1.70 --- ci/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/test.sh b/ci/test.sh index feecf33df..ea73eaf28 100755 --- a/ci/test.sh +++ b/ci/test.sh @@ -51,7 +51,7 @@ main() { 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.74 - CROSS+=("+1.74") + CROSS+=("+1.70") fi if (( ${STD:-0} )); then From 198f71af176a1b4f0f68785fdbf15f157fae8c53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20Gardstr=C3=B6m?= Date: Fri, 2 Feb 2024 00:52:59 +0100 Subject: [PATCH 9/9] oops --- ci/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/test.sh b/ci/test.sh index ea73eaf28..6a164ae54 100755 --- a/ci/test.sh +++ b/ci/test.sh @@ -50,7 +50,7 @@ main() { 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.74 + rustup toolchain add 1.70 CROSS+=("+1.70") fi