chore: enable strip in cargo

This commit is contained in:
Yujia Qiao 2022-02-25 12:35:04 +08:00
parent 860e3ce2ed
commit 4682581038
No known key found for this signature in database
GPG Key ID: DC129173B148701B
2 changed files with 44 additions and 54 deletions

View File

@ -3,7 +3,7 @@ name: Release
on:
push:
tags:
- '*'
- "*"
workflow_dispatch:
@ -73,17 +73,6 @@ jobs:
run: cross test --release --target ${{ matrix.target }} --verbose
- name: Build release
run: cross build --release --target ${{ matrix.target }}
- name: Install LLVM Strip
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get install llvm
- name: LLVM Strip
if: matrix.os == 'ubuntu-latest'
continue-on-error: true
run: llvm-strip target/${{ matrix.target }}/release/${{ matrix.exe }}
- name: MacOS Strip
if: matrix.os == 'macos-latest'
continue-on-error: true
run: strip target/${{ matrix.target }}/release/${{ matrix.exe }}
- name: Run UPX
# Upx may not support some platforms. Ignore the errors
continue-on-error: true

View File

@ -36,6 +36,7 @@ panic = "abort"
panic = "abort"
lto = true
codegen-units = 1
strip = true
[profile.bench]
debug = 1