Skip to content

Commit

Permalink
Enable tracebacks with line numbers by default (#2412)
Browse files Browse the repository at this point in the history
- Reenable tracebacks on dev profile
- Add actions to the CI to trace memory usage for the jobs 
  that sometimes get OOM killed.
  • Loading branch information
sveitser authored Mar 4, 2025
1 parent 9661930 commit d17974e
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 6 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/hotshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,20 @@ jobs:
shared-key: "hotshot-tests"
cache-on-failure: "true"
save-if: ${{ github.ref == 'refs/heads/main' && matrix.test_suites == 'test-ci-rest' }}
prefix-key: v0-hotshot

- uses: taiki-e/install-action@just

- uses: taiki-e/install-action@nextest

- name: Show memory
run: free -h

- name: Collect Workflow Telemetry
uses: catchpoint/workflow-telemetry-action@v2
with:
comment_on_pr: false

- name: Unit and integration tests for all crates in workspace
run: |
just hotshot::${{ matrix.test_suites }}
Expand All @@ -74,6 +83,7 @@ jobs:
shared-key: "hotshot-examples"
cache-on-failure: "true"
save-if: ${{ github.ref == 'refs/heads/main' }}
prefix-key: v0-hotshot

- uses: taiki-e/install-action@just

Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ jobs:
cache-all-crates: true
cache-provider: buildjet

- name: Show memory
run: free -h

- name: Collect Workflow Telemetry
uses: catchpoint/workflow-telemetry-action@v2
with:
comment_on_pr: false

- name: Build and archive tests
run: cargo nextest archive --locked --workspace --archive-file nextest-archive-postgres.tar.zst

Expand Down Expand Up @@ -69,6 +77,14 @@ jobs:
cache-all-crates: true
cache-provider: buildjet

- name: Show memory
run: free -h

- name: Collect Workflow Telemetry
uses: catchpoint/workflow-telemetry-action@v2
with:
comment_on_pr: false

- name: Build and archive tests
run: cargo nextest archive --locked --features "embedded-db testing" --workspace --archive-file nextest-archive-sqlite.tar.zst

Expand Down
18 changes: 12 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -229,12 +229,18 @@ time = "0.3"
trait-set = "0.3.0"

[profile.dev]
# No optimizations
opt-level = 0
# Skip compiling the debug information.
debug = false
# Skip linking symbols.
strip = true
# Probably the least demanding setting in terms of compilation time and memory
# that still provide tracebacks with line numbers.
strip = "none"
debug = "line-tables-only"

[profile.dev-debug]
# This profile should allow connecting debuggers. Compiles more slowly and
# requires significantly more memory to compile.
inherits = "dev"
strip = "none"
debug = "full"

[profile.test]
opt-level = 1
[profile.test.package.tests]
Expand Down

0 comments on commit d17974e

Please sign in to comment.