Skip to content

Commit

Permalink
Switch CI to use debuginfo-line-tables-only
Browse files Browse the repository at this point in the history
The previous use of "1" would still result in significant file sizes. When
building integration tests locally a setting of "1" leads to a total target/
directory size of 3.1GB, whereas "line-tables-only" results in a total clean
build target/ directory size of 2.1GB.

The "line-tables-only" feature provides:

> Generates the minimal amount of debug info for backtraces with filename/line
> number info, but not anything else, i.e. no variable or function parameter info.

And was introduced in 1.70:
    <https://blog.rust-lang.org/2023/06/01/Rust-1.70.0.html#named-levels-of-debug-information>

Setting this to "0" does reduce the size further, but for panics and stacktraces
in CI, we need some level of information to be present in order for the
backtraces to be useful.

Sponsored-by: Databricks Inc
  • Loading branch information
rtyler committed Jul 21, 2023
1 parent c1f76f2 commit 20da846
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ jobs:
runs-on: ${{ matrix.os }}
env:
# Disable full debug symbol generation to speed up CI build and keep memory down
# "1" means line tables only, which is useful for panic tracebacks.
RUSTFLAGS: -C debuginfo=1
RUSTFLAGS: -C debuginfo=line-tables-only
# Disable incremental builds by cargo for CI which should save disk space
# and hopefully avoid final link "No space left on device"
CARGO_INCREMENTAL: 0
Expand All @@ -94,8 +93,8 @@ jobs:
env:
CARGO_INCREMENTAL: 0
# Disable full debug symbol generation to speed up CI build and keep memory down
# "1" means line tables only, which is useful for panic tracebacks.
RUSTFLAGS: "-C debuginfo=1"
# <https://doc.rust-lang.org/cargo/reference/profiles.html>
RUSTFLAGS: "-C debuginfo=line-tables-only"
# https://github.com/rust-lang/cargo/issues/10280
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
RUST_BACKTRACE: "1"
Expand Down Expand Up @@ -149,7 +148,7 @@ jobs:
parquet2_test:
runs-on: ubuntu-latest
env:
RUSTFLAGS: "-C debuginfo=0"
RUSTFLAGS: "-C debuginfo=line-tables-only"
CARGO_INCREMENTAL: 0

steps:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/python_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
name: Python Build (Python 3.7 PyArrow 8.0.0)
runs-on: ubuntu-latest
env:
RUSTFLAGS: "-C debuginfo=0"
RUSTFLAGS: "-C debuginfo=line-tables-only"
CARGO_INCREMENTAL: 0

# use the same environment we have for python release
Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:
# Install minimum PyArrow version
pip install -e .[pandas,devel] pyarrow==8.0.0
env:
RUSTFLAGS: "-C debuginfo=0"
RUSTFLAGS: "-C debuginfo=line-tables-only"

- name: Run tests
run: |
Expand Down Expand Up @@ -141,7 +141,7 @@ jobs:
name: Python Benchmark
runs-on: ubuntu-latest
env:
RUSTFLAGS: "-C debuginfo=0"
RUSTFLAGS: "-C debuginfo=line-tables-only"
CARGO_INCREMENTAL: 0

steps:
Expand Down Expand Up @@ -191,7 +191,7 @@ jobs:
name: PySpark Integration Tests
runs-on: ubuntu-latest
env:
RUSTFLAGS: "-C debuginfo=0"
RUSTFLAGS: "-C debuginfo=line-tables-only"
CARGO_INCREMENTAL: 0

steps:
Expand Down Expand Up @@ -231,7 +231,7 @@ jobs:
name: Running with Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
env:
RUSTFLAGS: "-C debuginfo=0"
RUSTFLAGS: "-C debuginfo=line-tables-only"
CARGO_INCREMENTAL: 0

strategy:
Expand Down

0 comments on commit 20da846

Please sign in to comment.