diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 929f0d28f..e6b596999 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -139,6 +139,7 @@ jobs: - i586-unknown-linux-gnu - i686-unknown-linux-gnu - powerpc64-unknown-linux-gnu + - s390x-unknown-linux-gnu - x86_64-pc-windows-gnu - x86_64-unknown-linux-gnu - x86_64-unknown-linux-musl diff --git a/ci/docker/s390x-unknown-linux-gnu/Dockerfile b/ci/docker/s390x-unknown-linux-gnu/Dockerfile new file mode 100644 index 000000000..7c19dcbb4 --- /dev/null +++ b/ci/docker/s390x-unknown-linux-gnu/Dockerfile @@ -0,0 +1,17 @@ +FROM ubuntu:20.04 + +RUN apt-get update && apt-get install -y --no-install-recommends \ + gcc \ + ca-certificates \ + libc6-dev \ + gcc-s390x-linux-gnu \ + libc6-dev-s390x-cross \ + qemu-user \ + # There seems to be a bug in processing mixed-architecture + # ld.so.cache files that causes crashes in some cases. Work + # around this by simply deleting the cache for now. + && rm /etc/ld.so.cache + +ENV CARGO_TARGET_S390X_UNKNOWN_LINUX_GNU_LINKER=s390x-linux-gnu-gcc \ + CARGO_TARGET_S390X_UNKNOWN_LINUX_GNU_RUNNER="qemu-s390x -L /usr/s390x-linux-gnu" \ + CC=s390x-linux-gnu-gcc diff --git a/tests/concurrent-panics.rs b/tests/concurrent-panics.rs index 0db0fdd57..470245cc9 100644 --- a/tests/concurrent-panics.rs +++ b/tests/concurrent-panics.rs @@ -14,7 +14,12 @@ fn main() { // so just skip these for CI. No other reason this can't run on those // platforms though. // Miri does not have support for re-execing a file - if cfg!(unix) && (cfg!(target_arch = "arm") || cfg!(target_arch = "aarch64")) || cfg!(miri) { + if cfg!(unix) + && (cfg!(target_arch = "arm") + || cfg!(target_arch = "aarch64") + || cfg!(target_arch = "s390x")) + || cfg!(miri) + { println!("test result: ok"); return; }