Skip to content

Commit 28531b6

Browse files
authored
Add CI for s390x-unknown-linux-gnu (#392)
1 parent c00f813 commit 28531b6

File tree

3 files changed

+24
-1
lines changed

3 files changed

+24
-1
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ jobs:
139139
- i586-unknown-linux-gnu
140140
- i686-unknown-linux-gnu
141141
- powerpc64-unknown-linux-gnu
142+
- s390x-unknown-linux-gnu
142143
- x86_64-pc-windows-gnu
143144
- x86_64-unknown-linux-gnu
144145
- x86_64-unknown-linux-musl
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM ubuntu:20.04
2+
3+
RUN apt-get update && apt-get install -y --no-install-recommends \
4+
gcc \
5+
ca-certificates \
6+
libc6-dev \
7+
gcc-s390x-linux-gnu \
8+
libc6-dev-s390x-cross \
9+
qemu-user \
10+
# There seems to be a bug in processing mixed-architecture
11+
# ld.so.cache files that causes crashes in some cases. Work
12+
# around this by simply deleting the cache for now.
13+
&& rm /etc/ld.so.cache
14+
15+
ENV CARGO_TARGET_S390X_UNKNOWN_LINUX_GNU_LINKER=s390x-linux-gnu-gcc \
16+
CARGO_TARGET_S390X_UNKNOWN_LINUX_GNU_RUNNER="qemu-s390x -L /usr/s390x-linux-gnu" \
17+
CC=s390x-linux-gnu-gcc

tests/concurrent-panics.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@ fn main() {
1414
// so just skip these for CI. No other reason this can't run on those
1515
// platforms though.
1616
// Miri does not have support for re-execing a file
17-
if cfg!(unix) && (cfg!(target_arch = "arm") || cfg!(target_arch = "aarch64")) || cfg!(miri) {
17+
if cfg!(unix)
18+
&& (cfg!(target_arch = "arm")
19+
|| cfg!(target_arch = "aarch64")
20+
|| cfg!(target_arch = "s390x"))
21+
|| cfg!(miri)
22+
{
1823
println!("test result: ok");
1924
return;
2025
}

0 commit comments

Comments
 (0)