Skip to content

Commit

Permalink
ci: strip release binaries (FuelLabs#4268)
Browse files Browse the repository at this point in the history
  • Loading branch information
fgimenez authored Mar 16, 2023
1 parent 52ac42b commit 9599549
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ jobs:
;;
esac
cargo-test-workspace:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -643,6 +643,29 @@ jobs:
run: |
cross build --profile=release --target ${{ matrix.job.target }} --bins
- name: Strip release binaries x86_64-linux-gnu
if: matrix.job.target == 'x86_64-unknown-linux-gnu'
run: |
for BINARY in forc forc-fmt forc-lsp forc-deploy forc-run forc-doc forc-tx forc-submit; do
strip "target/${{ matrix.job.target }}/release/$BINARY"
done
- name: Strip release binaries aarch64-linux-gnu
if: matrix.job.target == 'aarch64-unknown-linux-gnu'
run: |
for BINARY in forc forc-fmt forc-lsp forc-deploy forc-run forc-doc forc-tx forc-submit; do
docker run --rm -v \
"$PWD/target:/target:Z" \
ghcr.io/cross-rs/${{ matrix.job.target }}:main \
aarch64-linux-gnu-strip \
/target/${{ matrix.job.target }}/release/$BINARY
done
- name: Strip release binaries mac
if: matrix.job.os == 'macos-latest'
run: |
for BINARY in forc forc-fmt forc-lsp forc-deploy forc-run forc-doc forc-tx forc-submit; do
strip -x "target/${{ matrix.job.target }}/release/$BINARY"
done
- name: Prep Assets
id: prep_assets
env:
Expand All @@ -653,7 +676,7 @@ jobs:
ZIP_FILE_NAME=forc-binaries-${{ env.PLATFORM_NAME }}_${{ env.ARCH }}.tar.gz
echo "ZIP_FILE_NAME=$ZIP_FILE_NAME" >> $GITHUB_ENV
mkdir -pv ./forc-binaries
for BINARY in forc forc-fmt forc-lsp forc-deploy forc-run forc-doc forc-tx; do
for BINARY in forc forc-fmt forc-lsp forc-deploy forc-run forc-doc forc-tx forc-submit; do
cp "target/${{ matrix.job.target }}/release/$BINARY" ./forc-binaries
done
tar -czvf $ZIP_FILE_NAME ./forc-binaries
Expand Down

0 comments on commit 9599549

Please sign in to comment.