Skip to content

ci: Try to reduce unittest memory usage #3929

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
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: 5 additions & 3 deletions .github/actions/test_unit/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ runs:
# If you need to reset the cache version, increment the number after `v`
- uses: Swatinem/rust-cache@v1
with:
sharedKey: unit-v1
sharedKey: unit-v2

- name: Test
uses: actions-rs/cargo@v1
Expand All @@ -32,8 +32,10 @@ runs:
RUST_TEST_THREADS: 2
RUST_LOG: ERROR
RUST_BACKTRACE: full
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests --cfg tokio_unstable'
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests'
# symbol-mangling-version=v0 is a trick to reduce memory usage
# ref: https://github.com/rust-lang/rust/issues/82406#issuecomment-787541615
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests --cfg tokio_unstable -Z symbol-mangling-version=v0'
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Z symbol-mangling-version=v0'

- name: Install grcov
uses: actions-rs/cargo@v1
Expand Down