Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build with debug and strip on pre-release #548

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 39 additions & 20 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,20 @@ jobs:
cd $GITHUB_WORKSPACE

# Build for musl
cargo --verbose build --bin kaspad --bin rothschild --bin kaspa-wallet --release --target x86_64-unknown-linux-musl
if [ "${{ github.event.release.prerelease }}" = "true" ]; then
echo "This is a pre-release"
cargo --verbose build --bin kaspad --bin rothschild --bin kaspa-wallet --profile=heap --target x86_64-unknown-linux-musl
export BUILD_DIR="heap"
else
echo "This is a full release"
cargo --verbose build --bin kaspad --bin rothschild --bin kaspa-wallet --release --target x86_64-unknown-linux-musl
export BUILD_DIR="release"
fi

mkdir bin || true
cp target/x86_64-unknown-linux-musl/release/kaspad bin/
cp target/x86_64-unknown-linux-musl/release/rothschild bin/
cp target/x86_64-unknown-linux-musl/release/kaspa-wallet bin/
cp target/x86_64-unknown-linux-musl/$BUILD_DIR/kaspad bin/
cp target/x86_64-unknown-linux-musl/$BUILD_DIR/rothschild bin/
cp target/x86_64-unknown-linux-musl/$BUILD_DIR/kaspa-wallet bin/
archive="bin/rusty-kaspa-${{ github.event.release.tag_name }}-linux-musl-amd64.zip"
asset_name="rusty-kaspa-${{ github.event.release.tag_name }}-linux-musl-amd64.zip"
zip -r "${archive}" ./bin/*
Expand All @@ -75,15 +84,20 @@ jobs:
if: runner.os == 'Windows'
shell: bash
run: |
cargo build --bin kaspad --release
cargo build --bin simpa --release
cargo build --bin rothschild --release
cargo build --bin kaspa-wallet --release
if [ "${{ github.event.release.prerelease }}" = "true" ]; then
echo "This is a pre-release"
cargo build --bin kaspad --bin simpa --bin rothschild --bin kaspa-wallet --profile=heap
export BUILD_DIR="heap"
else
echo "This is a full release"
cargo build --bin kaspad --bin simpa --bin rothschild --bin kaspa-wallet --release
export BUILD_DIR="release"
fi
mkdir bin || true
cp target/release/kaspad.exe bin/
cp target/release/simpa.exe bin/
cp target/release/rothschild.exe bin/
cp target/release/kaspa-wallet.exe bin/
cp target/$BUILD_DIR/kaspad.exe bin/
cp target/$BUILD_DIR/simpa.exe bin/
cp target/$BUILD_DIR/rothschild.exe bin/
cp target/$BUILD_DIR/kaspa-wallet.exe bin/
archive="bin/rusty-kaspa-${{ github.event.release.tag_name }}-win64.zip"
asset_name="rusty-kaspa-${{ github.event.release.tag_name }}-win64.zip"
powershell "Compress-Archive bin/* \"${archive}\""
Expand All @@ -93,15 +107,20 @@ jobs:
- name: Build on MacOS
if: runner.os == 'macOS'
run: |
cargo build --bin kaspad --release
cargo build --bin simpa --release
cargo build --bin rothschild --release
cargo build --bin kaspa-wallet --release
if [ "${{ github.event.release.prerelease }}" = "true" ]; then
echo "This is a pre-release"
cargo build --bin kaspad --bin simpa --bin rothschild --bin kaspa-wallet --profile=heap
export BUILD_DIR="heap"
else
echo "This is a full release"
cargo build --bin kaspad --bin simpa --bin rothschild --bin kaspa-wallet --release
export BUILD_DIR="release"
fi
mkdir bin || true
cp target/release/kaspad bin/
cp target/release/simpa bin/
cp target/release/rothschild bin/
cp target/release/kaspa-wallet bin/
cp target/$BUILD_DIR/kaspad bin/
cp target/$BUILD_DIR/simpa bin/
cp target/$BUILD_DIR/rothschild bin/
cp target/$BUILD_DIR/kaspa-wallet bin/
archive="bin/rusty-kaspa-${{ github.event.release.tag_name }}-osx.zip"
asset_name="rusty-kaspa-${{ github.event.release.tag_name }}-osx.zip"
zip -r "${archive}" ./bin/*
Expand Down