Skip to content

Commit 9f236fd

Browse files
authored
CICD.yml: Simplify stripping by install -s
1 parent 8a40908 commit 9f236fd

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

.github/workflows/CICD.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -696,14 +696,6 @@ jobs:
696696
;;
697697
esac
698698
outputs CARGO_TEST_OPTIONS
699-
# * executable for `strip`?
700-
STRIP="strip"
701-
case ${{ matrix.job.target }} in
702-
aarch64-*-linux-*) STRIP="aarch64-linux-gnu-strip" ;;
703-
arm-*-linux-gnueabihf) STRIP="arm-linux-gnueabihf-strip" ;;
704-
*-pc-windows-msvc) STRIP="" ;;
705-
esac;
706-
outputs STRIP
707699
- uses: taiki-e/install-action@v2
708700
if: steps.vars.outputs.CARGO_CMD == 'cross'
709701
with:
@@ -829,10 +821,8 @@ jobs:
829821
shell: bash
830822
run: |
831823
## Package artifact(s)
832-
# binary
833-
cp 'target/${{ matrix.job.target }}/release/${{ env.PROJECT_NAME }}${{ steps.vars.outputs.EXE_suffix }}' '${{ steps.vars.outputs.STAGING }}/${{ steps.vars.outputs.PKG_BASENAME }}/'
834-
# `strip` binary (if needed)
835-
if [ -n "${{ steps.vars.outputs.STRIP }}" ]; then "${{ steps.vars.outputs.STRIP }}" '${{ steps.vars.outputs.STAGING }}/${{ steps.vars.outputs.PKG_BASENAME }}/${{ env.PROJECT_NAME }}${{ steps.vars.outputs.EXE_suffix }}' ; fi
824+
# stripped binary
825+
install -m 755 -s 'target/${{ matrix.job.target }}/release/${{ env.PROJECT_NAME }}${{ steps.vars.outputs.EXE_suffix }}' '${{ steps.vars.outputs.STAGING }}/${{ steps.vars.outputs.PKG_BASENAME }}/'
836826
# README and LICENSE
837827
# * spell-checker:ignore EADME ICENSE
838828
(shopt -s nullglob; for f in [R]"EADME"{,.*}; do cp $f '${{ steps.vars.outputs.STAGING }}/${{ steps.vars.outputs.PKG_BASENAME }}/' ; done)

0 commit comments

Comments
 (0)