mirror of
https://github.com/rustic-rs/rustic.git
synced 2025-10-26 11:18:51 +00:00
ci: strip via config, not manually
This commit is contained in:
parent
da684f23c5
commit
824eb80944
18
.github/workflows/release.yaml
vendored
18
.github/workflows/release.yaml
vendored
@ -76,31 +76,15 @@ jobs:
|
||||
toolchain: ${{ matrix.rust }}
|
||||
args: --release --target ${{ matrix.job.target }}
|
||||
|
||||
- name: install strip command
|
||||
shell: bash
|
||||
run: |
|
||||
if [[ ${{ matrix.job.target }} == aarch64-unknown-linux-gnu ]]; then
|
||||
sudo apt update
|
||||
sudo apt-get install -y binutils-aarch64-linux-gnu
|
||||
fi
|
||||
- name: Packaging final binary
|
||||
if: ${{ !contains(github.ref_name, '/') }}
|
||||
shell: bash
|
||||
run: |
|
||||
cd target/${{ matrix.job.target }}/release
|
||||
|
||||
####### reduce binary size by removing debug symbols #######
|
||||
BINARY_NAME=rustic${{ matrix.job.binary-postfix }}
|
||||
if [[ ${{ matrix.job.target }} == aarch64-unknown-linux-gnu ]]; then
|
||||
GCC_PREFIX="aarch64-linux-gnu-"
|
||||
else
|
||||
GCC_PREFIX=""
|
||||
fi
|
||||
"$GCC_PREFIX"strip $BINARY_NAME
|
||||
|
||||
########## create tar.gz ##########
|
||||
RELEASE_NAME=rustic-${GITHUB_REF_NAME}-${{ matrix.job.target}}
|
||||
tar czvf $RELEASE_NAME.tar.gz $BINARY_NAME
|
||||
tar czvf $RELEASE_NAME.tar.gz rustic${{ matrix.job.binary-postfix }}
|
||||
|
||||
########## create sha256 ##########
|
||||
if [[ ${{ runner.os }} == 'Windows' ]]; then
|
||||
|
||||
@ -18,6 +18,9 @@ name = "rustic"
|
||||
path = "src/main.rs"
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[profile.release]
|
||||
strip = true
|
||||
|
||||
[dependencies]
|
||||
# macros
|
||||
async-trait = "0.1"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user