Commit Graph

27 Commits

Author SHA1 Message Date
Trevor Gross
23c9f74b58 Disable util and libm-macros for optimized tests
These crates take time building in CI, especially with the release
profile having LTO enabled, but there isn't really any reason to test
them with different features or in release mode. Disable this to save
some CI runtime.
2025-01-13 05:54:43 -05:00
Trevor Gross
3de783c40f Enable build-mpfr and build-musl by default
Most users who are developing this crate are likely running on a Unix
system, since there isn't much to test against otherwise. For
convenience, enable the features required to run these tests by default.
2025-01-13 03:53:46 +00:00
Trevor Gross
504616d5a0 Rename the test-multiprecision feature to build-mpfr
Currently the features that control what we test against are
`build-musl` and `test-multiprecision`. I didn't name them very
consistently and there isn't really any reason for that.

Rename `test-multiprecision` to `build-mpfr` to better reflect what it
actually does and to be more consistent with `build-musl`.
2025-01-13 03:25:19 +00:00
Trevor Gross
5c94cce6b2 Add a release-checked profile with debug and overflow assertions
A failing debug assertion or overflow without correctly wrapping or
saturating is a bug, but the `debug` profile that has these enabled does
not run enough test cases to hit edge cases that may trigger these. Add
a new `release-checked` profile that enables debug assertions and
overflow checks. This seems to only extend per-function test time by a
few seconds (or around a minute on longer extensive tests), so enable
this as the default on CI.

In order to ensure `no_panic` still gets checked, add a build-only step
to CI.
2025-01-11 20:35:30 -05:00
Trevor Gross
5e13eeca01 Reorder tests in run.sh
I do not believe Cargo separately caches crates with different sets of
features enabled. So, ensuring that tests run with `unstable-intrinsics`
are always grouped should slightly reduce runtime.

As an added benefit, all the debug mode tests run first so initial
feedback is available faster.
2025-01-11 18:48:08 -05:00
Trevor Gross
a9407010b4 Enable MPFR tests on i586
MPFR does build and run correctly without SSE, but requires
`force-cross` be enabled.
2025-01-06 15:41:39 -05:00
Trevor Gross
2323d3a2e3 Always enable unstable-float in CI
Since these add new API but do not affect runtime, we can enable it for
all tests that run with nightly.
2024-12-29 07:47:21 +00:00
Trevor Gross
76f37552e7 Remove tests against system musl
We now have tests against our custom-built musl as well as tests against
MPFR. The tests against system musl covers less than those against
custom-built musl, and are less portable; there isn't much benefit to
keeping them around so just remove them.
2024-12-22 12:39:27 +00:00
Trevor Gross
659cdcad33 Enable clippy for libm in CI 2024-11-01 06:42:39 -05:00
Trevor Gross
be72d14ed5 Check benchmarks in CI 2024-10-31 22:40:30 -05:00
Trevor Gross
6d1033e7fc Add an "arch" Cargo feature that is on by default
Introduce a Cargo feature to enable or disable architecture-specific
features (SIMD, assembly), which is on by default. This allows for more
fine grained control compared to relying on the `force-soft-floats`
feature.

Similar to "unstable-intrinsics", introduce a build.rs config option for
`unstable-intrinsics AND NOT force-soft-floats`, which makes this easier
to work with in code.

Effectively, this allows moving our non-additive Cargo feature
(force-soft-floats) to a positive one by default, allowing for an
override when needed.
2024-10-28 22:12:13 -05:00
Trevor Gross
54c8ae0980 Run tests against MPFR on CI where possible
This effectively gives us tests against infinite-precision results on
MacOS and x86+sse Linux.
2024-10-28 21:29:31 -05:00
Trevor Gross
3502d8eff6 Combine the WASM CI job with the others
There isn't any reason to be distinct here, and it would be better to
test with all feature configurations in run.sh anyway.
2024-10-28 20:53:35 -05:00
Trevor Gross
e6f7053c2e Replace feature = "unstable-intrinsics" with intrinsics_enabled
We currently have a non-additive feature, "force-soft-floats", and we
will need to gain another "no-f16-f128". This makes `cfg` usage in code
somewhat confusing and redundant.

Use `build.rs` to figure out if "unstable-intrinsics" is enabled while
"force-soft-floats" is not enabled and if so, emit a cfg
`intrinsics_enabled`. This is cleaner to use and should make adding more
features easier to reason about.

Also use this as an opportunity to eliminate the build.rs from the
compiler-builtins test crate, replaced with the `[lints]` table in
Cargo.toml.
2024-10-28 18:37:09 -05:00
Trevor Gross
66f8906862 Move the existing "unstable" feature to "unstable-intrinsics"
Currently there is a single feature called "unstable" that is used to
control whether intrinsics may be called. In anticipation of adding
other unstable features that we will want to control separately, create
a new feature called "unstable-intrinsics" that is enabled by
"unstable". Then move everything gated by "unstable" to
"unstable-intrinsics".
2024-10-28 18:37:09 -05:00
Trevor Gross
f5d30ecc3b Enable more targets on CI
This brings the targets tested here in line with those tested in
`compiler-builtins`.
2024-10-28 12:59:38 -05:00
Trevor Gross
a68516ed6a Rename the musl-bitwise-tests feature to test-musl-serialized
We will have more test features in the near future, and it would be nice
for them all to have a common `test-` prefix. Reverse the existing
feature so this is the case.
2024-10-25 20:57:19 -04:00
Trevor Gross
d82eb88722 Fix shellcheck warnings in scripts 2024-10-06 13:44:25 -05:00
Trevor Gross
c236051681 Rename the musl-reference-tests feature to musl-bitwise-tests
The plan is to add more test related features that could be considered
"reference tests". Rename the feature here to avoid future confusion.
2024-10-05 21:42:28 -05:00
Trevor Gross
f59dd82cca Move musl-reference-tests to a new libm-test crate
There isn't any reason for this feature to be exposed or part of the
build script. Move it to a separate crate.

We will also want more tests that require some support functions; this
will create a place for them.
2024-10-05 15:54:39 -05:00
Amanieu d'Antras
4f5d1524fd Fix no-panic 2022-01-03 21:32:08 +01:00
Lokathor
de3480c3c2 Update run.sh 2019-09-05 08:36:08 -06:00
Lokathor
2e3ba17f9d there are no longer any default features 2019-09-05 08:32:05 -06:00
gnzlbg
53c6687ef5 Move benchmarks into its own crate 2019-07-02 08:22:03 +02:00
Benjamin Schultzer
c6b403f5a9 Run musl test in debug mode 2019-05-16 17:09:33 -07:00
Alex Crichton
c4468281d4 More azure config fixes 2019-05-02 12:05:02 -07:00
Alex Crichton
8d79795d70 Overhaul tests
* Move everything to azure pipelines
* Inline docker configuration in this repo (no `cross`)
* Delete `no-panic` example, use `#[no_panic]` instead.
2019-05-02 11:37:21 -07:00