Skip to content

Commit

Permalink
Debug Management
Browse files Browse the repository at this point in the history
  • Loading branch information
cwfitzgerald committed Jan 21, 2025
1 parent 0e8deb4 commit 6faf947
Show file tree
Hide file tree
Showing 5 changed files with 97 additions and 19 deletions.
56 changes: 37 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ env:
# - web: build for the Web
# - em: build for the Emscripten

# For build time and size optimization we disable debug
# For build time and size optimization we disable debug symbols
# entirely on clippy jobs and reduce it to line-numbers
# only for ones where we run tests.
#
Expand Down Expand Up @@ -207,13 +207,15 @@ jobs:
rustup toolchain install ${{ env.REPO_MSRV }} --no-self-update --profile=minimal --component clippy,rust-src
echo "RUSTC_BOOTSTRAP=1" >> "$GITHUB_ENV"
- name: disable debug
- name: disable debug symbols
shell: bash
run: |
mkdir -p .cargo
echo """
[profile.dev]
debug = false" >> .cargo/config.toml
cat <<EOF >> .cargo/config.toml
[profile.dev]
debug = false
EOF
- name: caching
uses: Swatinem/rust-cache@v2
Expand Down Expand Up @@ -355,13 +357,15 @@ jobs:
rustup override set ${{ env.CORE_MSRV }}
cargo -V
- name: disable debug
- name: disable debug symbols
shell: bash
run: |
mkdir -p .cargo
echo """
[profile.dev]
debug = false" >> .cargo/config.toml
cat <<EOF >> .cargo/config.toml
[profile.dev]
debug = false
EOF
- name: caching
uses: Swatinem/rust-cache@v2
Expand Down Expand Up @@ -403,7 +407,7 @@ jobs:
with:
tool: cargo-hack

- name: disable debug
- name: disable debug symbols
shell: bash
run: |
mkdir -p .cargo
Expand Down Expand Up @@ -491,6 +495,16 @@ jobs:
with:
tool: cargo-nextest,cargo-llvm-cov

- name: debug symbols to line-tables-only
shell: bash
run: |
mkdir -p .cargo
cat <<EOF >> .cargo/config.toml
[profile.dev]
debug = "line-tables-only"
EOF
# Cache step must go before warp and mesa install on windows as they write into the
# target directory, and rust-cache will overwrite the entirety of the target directory.
- name: caching
Expand Down Expand Up @@ -588,7 +602,7 @@ jobs:
echo "LD_LIBRARY_PATH=$PWD/mesa/lib/x86_64-linux-gnu/:$LD_LIBRARY_PATH" >> "$GITHUB_ENV"
echo "LIBGL_DRIVERS_PATH=$PWD/mesa/lib/x86_64-linux-gnu/dri" >> "$GITHUB_ENV"
- name: disable debug
- name: disable debug symbols
shell: bash
run: |
mkdir -p .cargo
Expand Down Expand Up @@ -658,13 +672,15 @@ jobs:
rustup override set ${{ env.REPO_MSRV }}
cargo -V
- name: disable debug
- name: debug symbols to line-tables-only
shell: bash
run: |
mkdir -p .cargo
echo """
[profile.dev]
debug = 1" >> .cargo/config.toml
cat <<EOF >> .cargo/config.toml
[profile.dev]
debug = "line-tables-only"
EOF
- name: caching
uses: Swatinem/rust-cache@v2
Expand Down Expand Up @@ -727,13 +743,15 @@ jobs:
rustup override set ${{ env.REPO_MSRV }}
cargo -V
- name: disable debug
- name: disable debug symbols
shell: bash
run: |
mkdir -p .cargo
echo """
[profile.dev]
debug = 1" >> .cargo/config.toml
cat <<EOF >> .cargo/config.toml
[profile.dev]
debug = false
EOF
- name: caching
uses: Swatinem/rust-cache@v2
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ jobs:
rustup toolchain install ${{ env.REPO_MSRV }} --no-self-update --profile=minimal
rustup override set ${{ env.REPO_MSRV }}
- name: disable debug symbols
shell: bash
run: |
mkdir -p .cargo
cat <<EOF >> .cargo/config.toml
[profile.dev]
debug = false
EOF
- name: caching
uses: Swatinem/rust-cache@v2
with:
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,16 @@ jobs:
rustup override set ${{ env.REPO_MSRV }}
cargo -V
- name: disable debug symbols
shell: bash
run: |
mkdir -p .cargo
cat <<EOF >> .cargo/config.toml
[profile.dev]
debug = false
EOF
- name: caching
uses: Swatinem/rust-cache@v2
with:
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ jobs:
- name: Install wasm-bindgen
run: cargo +stable install wasm-bindgen-cli --version=$WASM_BINDGEN_VERSION

- name: debug symbols to line-tables-only
shell: bash
run: |
mkdir -p .cargo
cat <<EOF >> .cargo/config.toml
[profile.dev]
debug = "line-tables-only"
EOF
- name: caching
uses: Swatinem/rust-cache@v2
with:
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/shaders.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: debug symbols to line-tables-only
shell: bash
run: |
mkdir -p .cargo
cat <<EOF >> .cargo/config.toml
[profile.dev]
debug = "line-tables-only"
EOF
- uses: Swatinem/rust-cache@v2
with:
workspaces: |
Expand Down Expand Up @@ -76,6 +86,16 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: debug symbols to line-tables-only
shell: bash
run: |
mkdir -p .cargo
cat <<EOF >> .cargo/config.toml
[profile.dev]
debug = "line-tables-only"
EOF
- uses: Swatinem/rust-cache@v2
with:
workspaces: |
Expand Down Expand Up @@ -108,6 +128,16 @@ jobs:
- name: Install graphviz
run: sudo apt-get install graphviz

- name: debug symbols to line-tables-only
shell: bash
run: |
mkdir -p .cargo
cat <<EOF >> .cargo/config.toml
[profile.dev]
debug = "line-tables-only"
EOF
- uses: Swatinem/rust-cache@v2
with:
workspaces: |
Expand Down

0 comments on commit 6faf947

Please sign in to comment.