Skip to content

Commit 2dbbebd

Browse files
committed
Run tests against MPFR on CI where possible
This effectively gives us tests against infinite-precision results on MacOS and x86+sse Linux.
1 parent 319285b commit 2dbbebd

File tree

4 files changed

+19
-3
lines changed

4 files changed

+19
-3
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM ubuntu:24.04
33
RUN apt-get update && \
44
apt-get install -y --no-install-recommends \
55
gcc libc6-dev ca-certificates \
6-
gcc-aarch64-linux-gnu libc6-dev-arm64-cross \
6+
gcc-aarch64-linux-gnu m4 make libc6-dev-arm64-cross \
77
qemu-user-static
88

99
ENV TOOLCHAIN_PREFIX=aarch64-linux-gnu-

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ FROM ubuntu:24.04
22

33
RUN apt-get update && \
44
apt-get install -y --no-install-recommends \
5-
gcc-multilib libc6-dev ca-certificates
5+
gcc-multilib m4 make libc6-dev ca-certificates

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ FROM ubuntu:24.04
22

33
RUN apt-get update && \
44
apt-get install -y --no-install-recommends \
5-
gcc libc6-dev ca-certificates
5+
gcc m4 make libc6-dev ca-certificates

ci/run.sh

+16
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,22 @@ case "$target" in
3535
*) extra_flags="$extra_flags --features libm-test/build-musl" ;;
3636
esac
3737

38+
# Configure which targets test against MPFR
39+
case "$target" in
40+
# MSVC cannot link MPFR
41+
*windows-msvc*) ;;
42+
# FIXME: MinGW should be able to build MPFR, but setup in CI is nontrivial.
43+
*windows-gnu*) ;;
44+
# Targets that aren't cross compiled work fine
45+
# FIXME(ci): we should be able to enable aarch64 Linux here once GHA
46+
# support rolls out.
47+
x86_64*) extra_flags="$extra_flags --features libm-test/test-multiprecision" ;;
48+
# i686 works fine, i586 does not
49+
i686*) extra_flags="$extra_flags --features libm-test/test-multiprecision" ;;
50+
# Apple aarch64 is native
51+
aarch64*apple*) extra_flags="$extra_flags --features libm-test/test-multiprecision" ;;
52+
esac
53+
3854
# FIXME: `STATUS_DLL_NOT_FOUND` testing macros on CI.
3955
# <https://github.com/rust-lang/rust/issues/128944>
4056
case "$target" in

0 commit comments

Comments
 (0)