Skip to content

Commit

Permalink
Run tests against MPFR on CI where possible
Browse files Browse the repository at this point in the history
This effectively gives us tests against infinite-precision results on
MacOS and x86+sse Linux.
  • Loading branch information
tgross35 committed Oct 22, 2024
1 parent c15a115 commit 3a81e92
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ci/docker/aarch64-unknown-linux-gnu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM ubuntu:24.04
RUN apt-get update && \
apt-get install -y --no-install-recommends \
gcc libc6-dev ca-certificates \
gcc-aarch64-linux-gnu libc6-dev-arm64-cross \
gcc-aarch64-linux-gnu m4 make libc6-dev-arm64-cross \
qemu-user-static

ENV TOOLCHAIN_PREFIX=aarch64-linux-gnu-
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/i686-unknown-linux-gnu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ FROM ubuntu:24.04

RUN apt-get update && \
apt-get install -y --no-install-recommends \
gcc-multilib libc6-dev ca-certificates
gcc-multilib m4 make libc6-dev ca-certificates
2 changes: 1 addition & 1 deletion ci/docker/x86_64-unknown-linux-gnu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ FROM ubuntu:24.04

RUN apt-get update && \
apt-get install -y --no-install-recommends \
gcc libc6-dev ca-certificates
gcc m4 make libc6-dev ca-certificates
16 changes: 16 additions & 0 deletions ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,22 @@ case "$target" in
*thumb*) extra_flags="$extra_flags --exclude musl-math-sys" ;;
esac

# Configure which targets test against MPFR
case "$target" in
# MSVC cannot link MPFR
*windows-msvc*) ;;
# FIXME: MinGW should be able to build MPFR, but setup in CI is nontrivial.
*windows-gnu*) ;;
# Targets that aren't cross compiled work fine
# FIXME(ci): we should be able to enable aarch64 Linux here once GHA
# support rolls out.
x86_64*) extra_flags="$extra_flags --features libm-test/multiprecision-tests" ;;
# i686 works fine, i586 does not
i686*) extra_flags="$extra_flags --features libm-test/multiprecision-tests" ;;
# Apple aarch64 is native
aarch64*apple*) extra_flags="$extra_flags --features libm-test/multiprecision-tests" ;;
esac

# FIXME: `STATUS_DLL_NOT_FOUND` testing macros on CI.
# <https://github.com/rust-lang/rust/issues/128944>
case "$target" in
Expand Down

0 comments on commit 3a81e92

Please sign in to comment.