make release bin smaller (#127)

This commit is contained in:
Sijie.Sun
2024-06-02 09:15:40 +08:00
committed by GitHub
parent abf9d23d52
commit f1e9864d08
7 changed files with 73 additions and 277 deletions

View File

@@ -85,11 +85,21 @@ jobs:
- name: Build Core & Cli
run: |
if [[ $OS =~ ^ubuntu.*$ && $TARGET =~ ^mips.*$ ]]; then
cargo +nightly build -r --verbose --target $TARGET -Z build-std --no-default-features --features mips
cargo +nightly build -r --verbose --target $TARGET -Z build-std=std,panic_abort --no-default-features --features mips
else
cargo build --release --verbose --target $TARGET
fi
- name: Run UPX
if: ${{ matrix.OS != 'macos-latest' }}
uses: crazy-max/ghaction-upx@v3
with:
version: latest
files: |
./target/$TARGET/release/easytier-core*
./target/$TARGET/release/easytier-cli*
args: -9
- name: Compress
run: |
mkdir -p ./artifacts/objects/

View File

@@ -62,6 +62,6 @@ jobs:
- name: Run tests
run: |
sudo -E env "PATH=$PATH" cargo test --verbose
sudo -E env "PATH=$PATH" cargo test --no-default-features --features=full --verbose
sudo chown -R $USER:$USER ./target
sudo chown -R $USER:$USER ~/.cargo