From 34ef145b9cf26121fefb16e86a31b877bfe50457 Mon Sep 17 00:00:00 2001 From: "Calvin A. Allen" Date: Wed, 10 Dec 2025 14:11:46 -0500 Subject: [PATCH] perf(ci): strip debug symbols from builds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add -ldflags="-s -w" to go build commands in both build and release workflows. This removes the symbol table and DWARF debug information, reducing binary sizes by ~30%: - dtvem: ~10.9MB → ~7.5MB - dtvem-shim: ~10.3MB → ~7.2MB Fixes #72 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- .github/workflows/build.yml | 4 ++-- .github/workflows/release.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 010e1c1..f609093 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -140,7 +140,7 @@ jobs: - name: Build main CLI run: | - go build -v -o dist/dtvem${{ matrix.goos == 'windows' && '.exe' || '' }} ./src + go build -v -ldflags="-s -w" -o dist/dtvem${{ matrix.goos == 'windows' && '.exe' || '' }} ./src shell: bash env: GOOS: ${{ matrix.goos }} @@ -148,7 +148,7 @@ jobs: - name: Build shim executable run: | - go build -v -o dist/dtvem-shim${{ matrix.goos == 'windows' && '.exe' || '' }} ./src/cmd/shim + go build -v -ldflags="-s -w" -o dist/dtvem-shim${{ matrix.goos == 'windows' && '.exe' || '' }} ./src/cmd/shim shell: bash env: GOOS: ${{ matrix.goos }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 71dc019..fb7ea19 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -179,7 +179,7 @@ jobs: - name: Build main CLI run: | - go build -v -o dist/dtvem${{ matrix.goos == 'windows' && '.exe' || '' }} ./src + go build -v -ldflags="-s -w" -o dist/dtvem${{ matrix.goos == 'windows' && '.exe' || '' }} ./src shell: bash env: GOOS: ${{ matrix.goos }} @@ -187,7 +187,7 @@ jobs: - name: Build shim executable run: | - go build -v -o dist/dtvem-shim${{ matrix.goos == 'windows' && '.exe' || '' }} ./src/cmd/shim + go build -v -ldflags="-s -w" -o dist/dtvem-shim${{ matrix.goos == 'windows' && '.exe' || '' }} ./src/cmd/shim shell: bash env: GOOS: ${{ matrix.goos }}