Merge pull request #13 from Eraden/compress-binary

Compress binary
This commit is contained in:
Adrian Woźniak 2021-07-30 13:02:32 +02:00 committed by GitHub
commit 1484daee9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 1 deletions

View File

@ -1,2 +1,7 @@
[build]
target = "x86_64-unknown-linux-musl"
[profile.release]
lto = true
panic = "abort"
codegen-units = 1

View File

@ -23,8 +23,10 @@ jobs:
run: rustup target install x86_64-unknown-linux-musl
- name: Run tests
run: cargo test --verbose
- name: Install binary compressor
run: sudo apt-get update && sudo apt-get install upx-ucl
- name: Build
run: cargo build --release --verbose --target=x86_64-unknown-linux-musl
run: cargo build --release --verbose --target=x86_64-unknown-linux-musl && strip ./target/x86_64-unknown-linux-musl/release/amdfand && upx --best --lzma target/x86_64-unknown-linux-musl/release/amdfand
- name: Upload a Build Artifact
uses: actions/upload-artifact@v2.2.4
with:

5
build.sh Executable file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env zsh
cargo build --release
strip target/x86_64-unknown-linux-musl/release/amdfand
upx --best --lzma target/x86_64-unknown-linux-musl/release/amdfand