Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/codspeed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,13 @@ jobs:

- name: Build the benchmark targets
if: ${{ steps.environment.outputs.match != 'false' }}
run: cargo codspeed build --locked --measurement-mode simulation -p rustpython -p rustpython-sre_engine
# cargo-codspeed adds -Cdebuginfo=2 to the bench profile's thin LTO, and
# the `rustpython` binary and both of its benches are linked last, all
# at once. With the default job count that final stage regularly takes
# the hosted runner down ("lost communication" / "received a shutdown
# signal"). Two jobs keep it to two such links; the dependencies come
# from the cache, so the build is barely slower.
run: cargo codspeed build --locked --jobs 2 --measurement-mode simulation -p rustpython -p rustpython-sre_engine

- name: Save cache
if: ${{ github.ref == 'refs/heads/main' }} # only save on main
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/cron-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,14 @@ jobs:
- name: Run cargo-llvm-cov with Python test suite.
id: python-suite
# One worker at a time, with a fresh process for each test module.
run: cargo llvm-cov --no-report run -- -m test -j 1 -u all --slowest --fail-env-changed
# No --fail-env-changed: a child started with a cleared environment
# loses LLVM_PROFILE_FILE and writes default_*.profraw into the test's
# working directory, which regrtest reports as a changed environment.
# -W prints the output of a failing test so the log says why. It does
# not re-run anything: regrtest also re-runs env-changed tests, which
# --fail-rerun would turn back into failures, and without that flag a
# test that fails and then passes on the re-run would not fail the job.
run: cargo llvm-cov --no-report run -- -m test -j 1 -u all --slowest -W
continue-on-error: true

- name: Prepare code coverage data
Expand Down
6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,12 @@ opt-level = 3
[profile.dev.package.rustpython-vm]
opt-level = 3

# xz-core is liblzma transpiled from C, where unsigned arithmetic wraps. Its
# match finder and .lzma header check rely on that, so overflow checks turn
# ordinary compression and decompression into panics in dev builds.
[profile.dev.package.xz-core]
overflow-checks = false

[profile.test]
opt-level = 3
# https://github.com/rust-lang/rust/issues/92869
Expand Down
Loading