diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b6e762486f..ed27436c78 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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. # @@ -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 <> .cargo/config.toml + [profile.dev] + debug = false + EOF - name: caching uses: Swatinem/rust-cache@v2 @@ -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 <> .cargo/config.toml + [profile.dev] + debug = false + EOF - name: caching uses: Swatinem/rust-cache@v2 @@ -403,7 +407,7 @@ jobs: with: tool: cargo-hack - - name: disable debug + - name: disable debug symbols shell: bash run: | mkdir -p .cargo @@ -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 <> .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 @@ -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 @@ -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 <> .cargo/config.toml + [profile.dev] + debug = "line-tables-only" + EOF - name: caching uses: Swatinem/rust-cache@v2 @@ -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 <> .cargo/config.toml + [profile.dev] + debug = false + EOF - name: caching uses: Swatinem/rust-cache@v2 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 34b6196523..7f03970af0 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -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 <> .cargo/config.toml + [profile.dev] + debug = false + EOF + - name: caching uses: Swatinem/rust-cache@v2 with: diff --git a/.github/workflows/generate.yml b/.github/workflows/generate.yml index a47fd91789..b2ee5d46bd 100644 --- a/.github/workflows/generate.yml +++ b/.github/workflows/generate.yml @@ -40,6 +40,16 @@ jobs: rustup override set ${{ env.REPO_MSRV }} cargo -V + - name: disable debug symbols + shell: bash + run: | + mkdir -p .cargo + + cat <> .cargo/config.toml + [profile.dev] + debug = false + EOF + - name: caching uses: Swatinem/rust-cache@v2 with: diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c9c4d5ea6f..c87cbb141e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -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 <> .cargo/config.toml + [profile.dev] + debug = "line-tables-only" + EOF + - name: caching uses: Swatinem/rust-cache@v2 with: diff --git a/.github/workflows/shaders.yml b/.github/workflows/shaders.yml index 3e49c1138d..ee155ea59f 100644 --- a/.github/workflows/shaders.yml +++ b/.github/workflows/shaders.yml @@ -31,6 +31,16 @@ jobs: steps: - uses: actions/checkout@v4 + - name: debug symbols to line-tables-only + shell: bash + run: | + mkdir -p .cargo + + cat <> .cargo/config.toml + [profile.dev] + debug = "line-tables-only" + EOF + - uses: Swatinem/rust-cache@v2 with: workspaces: | @@ -76,6 +86,16 @@ jobs: steps: - uses: actions/checkout@v4 + - name: debug symbols to line-tables-only + shell: bash + run: | + mkdir -p .cargo + + cat <> .cargo/config.toml + [profile.dev] + debug = "line-tables-only" + EOF + - uses: Swatinem/rust-cache@v2 with: workspaces: | @@ -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 <> .cargo/config.toml + [profile.dev] + debug = "line-tables-only" + EOF + - uses: Swatinem/rust-cache@v2 with: workspaces: |