Skip to content

Commit dbc603a

Browse files
sayantnAmanieu
authored andcommitted
Add test-everything annotations to more archs to ensure test coverage, and some small changes to make CI pass
- Disable `vsx` tests for `ppc` and `ppc64` - Disable `tme` tests for `aarch64` and `aarch64_be` - Disable `frecipe` tests for `loongarch64` - Add `altivec` run for PPC32 (with `-C target-feature=+vsx` `qemu` gives a nasty error)
1 parent fb0fbbb commit dbc603a

File tree

8 files changed

+53
-21
lines changed

8 files changed

+53
-21
lines changed

.github/workflows/main.yml

Lines changed: 36 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,42 @@ jobs:
122122

123123
# Add additional variables to the matrix variations generated above using `include`:
124124
include:
125+
# `TEST_EVERYTHING` setups - there should be at least 1 for each architecture
126+
- target:
127+
tuple: aarch64-unknown-linux-gnu
128+
os: ubuntu-latest
129+
test_everything: true
130+
- target:
131+
tuple: armv7-unknown-linux-gnueabihf
132+
os: ubuntu-latest
133+
test_everything: true
134+
- target:
135+
tuple: loongarch64-unknown-linux-gnu
136+
os: ubuntu-latest
137+
test_everything: true
138+
- target:
139+
tuple: powerpc-unknown-linux-gnu
140+
os: ubuntu-latest
141+
disable_assert_instr: true
142+
test_everything: true
143+
- target:
144+
tuple: powerpc64-unknown-linux-gnu
145+
os: ubuntu-latest
146+
disable_assert_instr: true
147+
test_everything: true
148+
- target:
149+
tuple: powerpc64le-unknown-linux-gnu
150+
os: ubuntu-latest
151+
disable_assert_instr: true
152+
test_everything: true
153+
- target:
154+
tuple: riscv64gc-unknown-linux-gnu
155+
os: ubuntu-latest
156+
test_everything: true
157+
- target:
158+
tuple: s390x-unknown-linux-gnu
159+
os: ubuntu-latest
160+
test_everything: true
125161
- target:
126162
tuple: x86_64-unknown-linux-gnu-emulated
127163
os: ubuntu-latest
@@ -144,18 +180,6 @@ jobs:
144180
# tuple: mipsel-unknown-linux-musl
145181
# os: ubuntu-latest
146182
# norun: true
147-
- target:
148-
tuple: powerpc-unknown-linux-gnu
149-
os: ubuntu-latest
150-
disable_assert_instr: true
151-
- target:
152-
tuple: powerpc64-unknown-linux-gnu
153-
os: ubuntu-latest
154-
disable_assert_instr: true
155-
- target:
156-
tuple: powerpc64le-unknown-linux-gnu
157-
os: ubuntu-latest
158-
disable_assert_instr: true
159183
- target:
160184
tuple: aarch64-apple-darwin
161185
os: macos-15

ci/docker/aarch64-unknown-linux-gnu/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1515

1616
ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc \
1717
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUNNER="qemu-aarch64 -cpu max -L /usr/aarch64-linux-gnu" \
18-
OBJDUMP=aarch64-linux-gnu-objdump
18+
OBJDUMP=aarch64-linux-gnu-objdump \
19+
STDARCH_TEST_SKIP_FEATURE=tme

ci/docker/aarch64_be-unknown-linux-gnu/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,4 @@ ENV AARCH64_BE_LIBC="${AARCH64_BE_TOOLCHAIN}/aarch64_be-none-linux-gnu/libc"
2727
ENV CARGO_TARGET_AARCH64_BE_UNKNOWN_LINUX_GNU_LINKER="${AARCH64_BE_TOOLCHAIN}/bin/aarch64_be-none-linux-gnu-gcc"
2828
ENV CARGO_TARGET_AARCH64_BE_UNKNOWN_LINUX_GNU_RUNNER="qemu-aarch64_be -cpu max -L ${AARCH64_BE_LIBC}"
2929
ENV OBJDUMP="${AARCH64_BE_TOOLCHAIN}/bin/bin/aarch64-none-linux-gnu-objdump"
30+
ENV STDARCH_TEST_SKIP_FEATURE=tme

ci/docker/loongarch64-unknown-linux-gnu/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ RUN apt-get update && \
88

99
ENV CARGO_TARGET_LOONGARCH64_UNKNOWN_LINUX_GNU_LINKER=loongarch64-linux-gnu-gcc-14 \
1010
CARGO_TARGET_LOONGARCH64_UNKNOWN_LINUX_GNU_RUNNER="qemu-loongarch64-static -cpu max -L /usr/loongarch64-linux-gnu" \
11-
OBJDUMP=loongarch64-linux-gnu-objdump
11+
OBJDUMP=loongarch64-linux-gnu-objdump \
12+
STDARCH_TEST_SKIP_FEATURE=frecipe

ci/docker/powerpc-unknown-linux-gnu/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
88
ENV CARGO_TARGET_POWERPC_UNKNOWN_LINUX_GNU_LINKER=powerpc-linux-gnu-gcc \
99
CARGO_TARGET_POWERPC_UNKNOWN_LINUX_GNU_RUNNER="qemu-ppc -cpu mpc8610 -L /usr/powerpc-linux-gnu" \
1010
CC=powerpc-linux-gnu-gcc \
11-
OBJDUMP=powerpc-linux-gnu-objdump
11+
OBJDUMP=powerpc-linux-gnu-objdump \
12+
STDARCH_TEST_SKIP_FEATURE=vsx

ci/docker/powerpc64-unknown-linux-gnu/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@ ENV CARGO_TARGET_POWERPC64_UNKNOWN_LINUX_GNU_LINKER=powerpc64-linux-gnu-gcc \
99
CARGO_TARGET_POWERPC64_UNKNOWN_LINUX_GNU_RUNNER="qemu-ppc64 -cpu power11 -L /usr/powerpc64-linux-gnu" \
1010
CC=powerpc64-linux-gnu-gcc \
1111
OBJDUMP=powerpc64-linux-gnu-objdump \
12+
STDARCH_TEST_SKIP_FEATURE=vsx \
1213
# These 2 tests have erratic behaviour with qemu, see https://gitlab.com/qemu-project/qemu/-/issues/1623#note_2449012173
1314
STDARCH_TEST_SKIP_FUNCTION=vec_lde_u16,vec_lde_u32

ci/run.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,15 @@ case ${TARGET} in
121121
cargo_test "${PROFILE}"
122122
;;
123123
powerpc64*)
124-
# We don't build the ppc 32-bit targets with these - these targets
125-
# are mostly unsupported for now.
126-
OLD_RUSTFLAGS="${RUSTFLAGS}"
127-
export RUSTFLAGS="${OLD_RUSTFLAGS} -C target-feature=+altivec"
124+
export RUSTFLAGS="${RUSTFLAGS} -C target-feature=+altivec"
128125
cargo_test "${PROFILE}"
129126

130-
export RUSTFLAGS="${OLD_RUSTFLAGS} -C target-feature=+vsx"
127+
export RUSTFLAGS="${RUSTFLAGS} -C target-feature=+vsx"
128+
cargo_test "${PROFILE}"
129+
;;
130+
powerpc*)
131+
# qemu has a bug in PPC32 which leads to a crash when compiled with `vsx`
132+
export RUSTFLAGS="${RUSTFLAGS} -C target-feature=+altivec"
131133
cargo_test "${PROFILE}"
132134
;;
133135

crates/stdarch-verify/tests/x86-intel.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,8 @@ fn equate(
749749
&Type::PrimUnsigned(32),
750750
"unsigned __int32" | "unsigned int" | "unsigned long" | "const unsigned int",
751751
) => {}
752-
(&Type::PrimUnsigned(64), "unsigned __int64" | "size_t") => {}
752+
(&Type::PrimUnsigned(64), "unsigned __int64") => {}
753+
(&Type::PrimUnsigned(SS), "size_t") => {}
753754

754755
(&Type::M128, "__m128") => {}
755756
(&Type::M128BH, "__m128bh") => {}

0 commit comments

Comments
 (0)