about summary refs log tree commit diff
path: root/library/compiler-builtins/ci
AgeCommit message (Collapse)AuthorLines
2025-07-30ci: Add a way to run `libm` tests that would otherwise be skippedTrevor Gross-0/+13
Introduce a new directive `ci: test-libm` to ensure tests run.
2025-07-30ci: Commonize the way `PrInfo` is loaded from envTrevor Gross-10/+22
2025-07-30ci: Don't print output twice in `ci-util`Trevor Gross-2/+0
Use `tee` rather than printing to both stdout and stderr.
2025-07-30ci: Switch to strongly typed directivesTrevor Gross-25/+54
Replace the current system with something that is more structured and will also catch unknown directives.
2025-07-29ci: Simplify tests for verbatim pathsTrevor Gross-1/+4
Rather than setting an environment variable in the workflow job based on whether or not the environment is non-MinGW Windows, we can just check this in the ci script. This was originally added in b0f19660f0 ("Add tests for UNC paths on windows builds") and its followup commits.
2025-07-29cleanup: Trim trailing whitespaceTrevor Gross-2/+2
2025-07-24ci: Upgrade ubuntu:25.04 for the PowerPC64LE testTrevor Gross-3/+1
Update the last remaining image. For this to work, the `QEMU_CPU=POWER8` configuration needed to be dropped to avoid a new SIGILL. Doing some debugging locally, the crash comes from an `extswsli` (per `powerpc:common64` in gdb-multiarch) in the `ld64.so` available with PowerPC, which qemu rejects when set to power8. Testing a build with `+crt-static` hits the same issue at a `maddld` in `__libc_start_main_impl`. Rust isn't needed to reproduce this: $ cat a.c #include <stdio.h> int main() { printf("Hello, world!\n"); } $ powerpc64le-linux-gnu-gcc a.c $ QEMU_CPU=power8 QEMU_LD_PREFIX=/usr/powerpc64le-linux-gnu/ ./a.out qemu: uncaught target signal 4 (Illegal instruction) - core dumped Illegal instruction So the cross toolchain provided by Debian must have a power9 baseline rather than rustc's power8. Alternatively, qemu may be incorrectly rejecting these instructions (I can't find a source on whether or not they should be available for power8). Testing instead with the `-musl` toolchain and ppc linker from musl.cc works correctly. In any case, things work with the default qemu config so it seems fine to drop. The env was originally added in 5d164a4edafb ("fix the powerpc64le target") but whatever the problem was there appears to no longer be relevant.
2025-07-24ci: Use a mirror for muslTrevor Gross-1/+1
We pretty often get at least one job failed because of failure to pull the musl git repo. Switch this to the unofficial mirror [1] which should be more reliable. Link: https://github.com/kraj/musl [1]
2025-07-24ci: Update to the latest ubuntu:25.04 Docker imagesTrevor Gross-20/+21
This includes a qemu update from 8.2.2 to 9.2.1 which should hopefully fix some bugs we have encountered. PowerPC64LE is skipped for now because the new version seems to cause a number of new SIGILLs.
2025-07-10Upgrade `iai-callgrind` to 0.15Trevor Gross-1/+1
Pick up the latest version of iai-callgrind, which includes some output improvements. Changelog: https://github.com/iai-callgrind/iai-callgrind/releases
2025-07-04symcheck: Make `target` a positional argumentTrevor Gross-15/+12
This makes it more obvious what we intend to check rather than looking for `--target`.
2025-06-10ci: Fix a typo that was causing a command failureTrevor Gross-1/+1
2025-06-04Replace the musl submodule with a download scriptTrevor Gross-0/+15
The submodule was causing issues in rust-lang/rust, so eliminiate it here. `build-musl` is also removed from `libm-test`'s default features so the crate doesn't need to be built by default.
2025-06-02ci: Refactor benchmark regression checksTrevor Gross-74/+29
iai-callgrind now correctly exits with error if regressions were found [1], so we no longer need to check for regressions manually. Remove this check and instead exit based on the exit status of the benchmark run. [1] https://github.com/iai-callgrind/iai-callgrind/issues/337
2025-05-29ci: Allow for multiple icount benchmarks in the same runTrevor Gross-6/+27
We don't actually need this for now, but eventually it would be nice to run icount benchmarks on multiple targets. Start tagging artifact names with the architecture, and allow passing `--tag` to `ci-util.py` in order to retrieve the correct one.
2025-05-29Run `builtins-test-intrinsics` when possibleTrevor Gross-10/+20
Currently we only build this, but it is possible to run the binary. Change the CI script to do so here.
2025-05-29Replace the `nm` symbol check with a Rust implementationTrevor Gross-108/+17
This should be less error-prone and adaptable than the `nm` version, and have better cross-platform support without needing LLVM `nm` installed.
2025-05-05ci: Mention `ci: skip-extensive` in the error messageTrevor Gross-1/+3
2025-04-21ci: Fix extensive testsTrevor Gross-0/+24
Move this to a script and ensure only `libm-test` gets built to avoid default feature issues with `compiler-builtins`.
2025-04-20ci: Clean up workflow file and docker scriptTrevor Gross-6/+7
2025-04-20ci: Use lowercase for bash locals, fix shellcheckTrevor Gross-5/+7
2025-04-20ci: Skip testing libm in PRs if it did not changeTrevor Gross-14/+40
Many contributions to compiler-builtins don't have any need to touch libm, and could get by with the few minutes of CI for compiler-builtins rather than the ~30 minutes for libm. We already have some scripts that handle changed file detection, so expand its use to skip libm CI if it doesn't need to run.
2025-04-20ci: Add `/cargo/bin` to the path in DockerTrevor Gross-2/+4
This makes it possible to use nextest within the container.
2025-04-20ci: Enable testing of `libm` cratesTrevor Gross-21/+146
Update `run.sh` to start testing `libm`. Currently this is somewhat inefficient because `builtins-test` gets run more than once on some targets; this can be cleaned up later.
2025-04-20Enable icount benchmarks in CITrevor Gross-0/+474
2025-04-19Add remaining `libm` crates to the workspaceTrevor Gross-8/+8
These are still not yet covered in CI since we always name explicit packages there, but all crates are now part of the workspace.
2025-04-19Move builtins-test-intrinsics out of the workspaceTrevor Gross-8/+11
This crate doesn't need to be a default member since it requires the opposite settings from everything else. Exclude it from the workspace and run it only when explicitly requested. This also makes `cargo t --no-default-features` work without additional qualifiers. `--no-default-features` still needs to be passed to ensure `#![compiler_builtins]` does not get set. compiler-builtins needs doctests disabled in order for everything to work correctly, since this causes an error running rustdoc that is unrelated to features (our `compiler_builtins` is getting into the crate graph before that from the sysroot, but `#![compiler_builtins]` is not set). We can also remove `test = false` and `doctest = false` in `builtins-test` since these no longer cause issues. This is unlikely to be used but it is better to not quietly skip if anything ever gets added by accident.
2025-04-19ci: Update `ci/run-docker.sh` to match libmTrevor Gross-55/+69
Prepare for having the repositories combined by ensuring EMULATED, RUST_BACKTRACE, and CI are set or forwarded as applicable. Also re-indent the file to four spaces and do some reorganization.
2025-04-18ci: Make CI configuration more similar to `libm`Trevor Gross-26/+81
Apply a handful of changes to reduce the diff between the two: * Cancel running jobs on new pushes * Enable log color and backtraces * Add timeouts * Specify CI runner versions * Add an armv7 job * Replace the name NO_STD with BUILD_ONLY * Update the extension to the canonical .yaml * Set AR_ and CC_ environments in docker * Install requirements to build MPFR
2025-04-18Rename `testcrate` to `builtins-test`Trevor Gross-4/+4
The repo will soon have `libm` as a top-level crate, so make it clear that this is only the test crate for `compiler-builtins`.
2025-03-22copy_misaligned_words: avoid out-of-bounds accesses (#799)Ralf Jung-0/+16
* copy_misaligned_words: avoid out-of-bounds accesses * add test to make Miri able to detect OOB in memmove * run Miri on CI
2025-03-19Switch repository layout to use a virtual manifestTrevor Gross-3/+3
The current setup has the `Cargo.toml` for `compiler-builtins` at the repository root, which means all support crates and other files are located within the package root. This works for now but is not the cleanest setup since files that should or shouldn't be included in the package need to be configured in `Cargo.toml`. If we eventually merge `libm` development into this repository, it would be nice to make this separation more straightforward. Begin cleaning things up by moving the crate source to a new `compiler-builtins` directory and adding a virtual manifest. For now the `libm` submodule is also moved, but in the future it can likely move back to the top level (ideally `compiler-builtins/src` would contain a symlink to `libm/src/math`, but unfortunately it seems like Cargo does not like something about the submodule + symlink combination).
2025-03-18Add a script for downloading compiler-rtTrevor Gross-0/+10
Rather than needing to copy the version and URL from the CI workflow, put this into a script that can be directly run locally.
2025-03-18Move `examples/intrinsics.rs` to its own crateTrevor Gross-9/+9
Currently there is an interesting situation with the way features get enabled; `testcrate` enables `mangled-names`, but the `intrinsics.rs` example requires this feature be disabled (otherwise the test fails with missing symbols, as expected). This is also the reason that `testcrate` is not a default workspace member, meaning `cargo test` doesn't actually run `testcrate`'s tests; making it a default member would mean that `compiler-builtins/mangled-names` gets enabled when `examples/intrinsics.rs` gets built, due to the way features get unified. Simplify the situation by making moving the example to its own crate as `builtins-test-intrinsics`. This also means `testcrate` can become a default member so it is included in `cargo check` or `cargo test` when run at the workspace root. `testcrate` and `builtins-test-intrinsics` still can't be built at the same time since there isn't a straightforward way to have Cargo build `compiler-builtins` twice with different features. This is a side effect of us using non-additive features, but there isn't really a better option since enabling both mangled and unmangled names would render `builtins-test-intrinsics` useless.
2024-11-01ci: add support for loongarch64-unknown-linux-gnuWANG Rui-0/+13
2024-10-02Add riscv64gc to CITrevor Gross-0/+13
There is a proposal to promote `riscv64gc-unknown-linux-gnu` to tier 1 [1]. We do not currently test RISC-V in CI; add it here. [1]: https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Imminent.20RFC.20PR.3A.20riscv64gc-unknown-linux-gnu.20to.20Tier-1
2024-09-28Fix some warnings from shellcheckTrevor Gross-16/+29
2024-06-22Fix unset variables in the build scriptTrevor Gross-3/+3
These were preventing building via Docker locally.
2024-06-22Update the Ubuntu docker image to the latest versionTrevor Gross-19/+19
2024-05-24Enable cache for Docker imagesTrevor Gross-1/+13
2024-05-24Add benchmarks for floating point mathTrevor Gross-1/+5
This adds comparisons among the compiler-builtins function, system functions if available, and optionally handwritten assembly. These also help us identify inconsistencies between this crate and system functions, which may otherwise go unnoticed if intrinsics get lowered to inline operations rather than library calls.
2024-05-21Only run `--features c` for verbatim testHenry Wang-9/+1
2024-05-21verbatim tests only need to buildtheKidOfArcrania-1/+1
2024-05-21Properly escape /C and fix namingtheKidOfArcrania-3/+3
2024-05-21Instead have cmd.exe dump out paththeKidOfArcrania-11/+10
2024-05-21Fix backslashtheKidOfArcrania-1/+1
2024-05-21Use cmd.exetheKidOfArcrania-9/+11
2024-05-21Fix CItheKidOfArcrania-1/+1
2024-05-21Add tests for UNC paths on windows buildstheKidOfArcrania-0/+12
2024-05-15Enable no-fail-fast for more usable test outputTrevor Gross-1/+1