From: Andres Noetzli Date: Thu, 17 Mar 2022 00:12:09 +0000 (-0700) Subject: [CI] Strip stored binaries (#8327) X-Git-Tag: cvc5-1.0.0~233 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=78a8c3359f21dff0eb214324534b6e85cfaa08a7;p=cvc5.git [CI] Strip stored binaries (#8327) This commit ensures that published binaries are stripped to make them smaller. The stripping of the binaries is done before running the regressions to make sure that the stripped binaries work as intended. Stripping binaries decreases the executable size from about 28 MB to 24 MB. --- diff --git a/.github/actions/configure-and-build/action.yml b/.github/actions/configure-and-build/action.yml index 1f3ab5fc9..314428d1b 100644 --- a/.github/actions/configure-and-build/action.yml +++ b/.github/actions/configure-and-build/action.yml @@ -11,6 +11,8 @@ inputs: build-static: default: true type: boolean + strip-bin: + default: "" outputs: shared-build-dir: description: build directory of the shared build @@ -57,6 +59,10 @@ runs: make -j${{ env.num_proc }} + if [[ "${{ inputs.strip-bin }}" != "" ]]; then + ${{ inputs.strip-bin }} bin/cvc5* + fi + echo "::set-output name=build-dir::$pwd" echo "::endgroup::" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7700bd50e..3cc4fce34 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,6 +10,7 @@ jobs: os: ubuntu-latest config: production --auto-download --all-bindings --editline --docs cache-key: production + strip-bin: strip python-bindings: true build-documentation: true check-examples: true @@ -21,6 +22,7 @@ jobs: os: macos-11 config: production --auto-download --python-bindings --editline cache-key: production + strip-bin: strip python-bindings: true check-examples: true store-to-release-name: cvc5-macOS @@ -31,6 +33,7 @@ jobs: os: ubuntu-latest config: production --auto-download --win64 cache-key: productionwin64 + strip-bin: x86_64-w64-mingw32-strip windows-build: true store-to-release-name: cvc5-Win64.exe binary-ext: .exe @@ -91,6 +94,7 @@ jobs: configure-config: ${{ matrix.config }} build-shared: ${{ matrix.build-shared }} build-static: ${{ matrix.build-static }} + strip-bin: ${{ matrix.strip-bin }} - name: ccache Statistics run: ccache -s