From fd28fce610795e9e7e31f4ce1f47d0451004b443 Mon Sep 17 00:00:00 2001 From: starkbamse <139136798+starkbamse@users.noreply.github.com> Date: Sun, 8 Sep 2024 20:59:04 +0200 Subject: [PATCH 1/4] Build with symbols on pre-release --- .github/workflows/deploy.yaml | 42 +++++++++++++++++++++++++++-------- 1 file changed, 33 insertions(+), 9 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 8f46cb1fe..0284f60bd 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -60,7 +60,13 @@ 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 + else + echo "This is a full release" + cargo --verbose build --bin kaspad --bin rothschild --bin kaspa-wallet --release --target x86_64-unknown-linux-musl + fi mkdir bin || true cp target/x86_64-unknown-linux-musl/release/kaspad bin/ cp target/x86_64-unknown-linux-musl/release/rothschild bin/ @@ -75,10 +81,19 @@ 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 --profile=heap + cargo build --bin simpa --profile=heap + cargo build --bin rothschild --profile=heap + cargo build --bin kaspa-wallet --profile=heap + else + echo "This is a full release" + cargo build --bin kaspad --release + cargo build --bin simpa --release + cargo build --bin rothschild --release + cargo build --bin kaspa-wallet --release + fi mkdir bin || true cp target/release/kaspad.exe bin/ cp target/release/simpa.exe bin/ @@ -93,10 +108,19 @@ 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 --profile=heap + cargo build --bin simpa --profile=heap + cargo build --bin rothschild --profile=heap + cargo build --bin kaspa-wallet --profile=heap + else + echo "This is a full release" + cargo build --bin kaspad --release + cargo build --bin simpa --release + cargo build --bin rothschild --release + cargo build --bin kaspa-wallet --release + fi mkdir bin || true cp target/release/kaspad bin/ cp target/release/simpa bin/ From 5e4514e33e195404bf84148216972285c5d3c2b4 Mon Sep 17 00:00:00 2001 From: starkbamse <139136798+starkbamse@users.noreply.github.com> Date: Sun, 8 Sep 2024 21:15:39 +0200 Subject: [PATCH 2/4] One liner --- .github/workflows/deploy.yaml | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 0284f60bd..d0b2ceb8c 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -83,16 +83,10 @@ jobs: run: | if [ "${{ github.event.release.prerelease }}" = "true" ]; then echo "This is a pre-release" - cargo build --bin kaspad --profile=heap - cargo build --bin simpa --profile=heap - cargo build --bin rothschild --profile=heap - cargo build --bin kaspa-wallet --profile=heap + cargo build --bin kaspad --bin simpa --bin rothschild --bin kaspa-wallet --profile=heap else echo "This is a full release" - cargo build --bin kaspad --release - cargo build --bin simpa --release - cargo build --bin rothschild --release - cargo build --bin kaspa-wallet --release + cargo build --bin kaspad --bin simpa --bin rothschild --bin kaspa-wallet --release fi mkdir bin || true cp target/release/kaspad.exe bin/ @@ -110,17 +104,11 @@ jobs: run: | if [ "${{ github.event.release.prerelease }}" = "true" ]; then echo "This is a pre-release" - cargo build --bin kaspad --profile=heap - cargo build --bin simpa --profile=heap - cargo build --bin rothschild --profile=heap - cargo build --bin kaspa-wallet --profile=heap + cargo build --bin kaspad --bin simpa --bin rothschild --bin kaspa-wallet --profile=heap else echo "This is a full release" - cargo build --bin kaspad --release - cargo build --bin simpa --release - cargo build --bin rothschild --release - cargo build --bin kaspa-wallet --release - fi + cargo build --bin kaspad --bin simpa --bin rothschild --bin kaspa-wallet --release + fi mkdir bin || true cp target/release/kaspad bin/ cp target/release/simpa bin/ From 1206b4ac276ffdb2956947298583ed298be05b65 Mon Sep 17 00:00:00 2001 From: starkbamse <139136798+starkbamse@users.noreply.github.com> Date: Sun, 8 Sep 2024 21:52:46 +0200 Subject: [PATCH 3/4] Update deploy.tamp --- .github/workflows/deploy.yaml | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index d0b2ceb8c..2f270c33f 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -63,14 +63,17 @@ jobs: 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/release" else echo "This is a full release" cargo --verbose build --bin kaspad --bin rothschild --bin kaspa-wallet --release --target x86_64-unknown-linux-musl - fi + 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/* @@ -84,15 +87,17 @@ jobs: 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/release" 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}\"" @@ -105,15 +110,17 @@ jobs: 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/release" 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/* From c61d66cd58c2071328c023ade62bfab7148080a7 Mon Sep 17 00:00:00 2001 From: starkbamse <139136798+starkbamse@users.noreply.github.com> Date: Sun, 8 Sep 2024 23:56:58 +0200 Subject: [PATCH 4/4] Update deploy.yaml --- .github/workflows/deploy.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 2f270c33f..f48436a78 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -63,7 +63,7 @@ jobs: 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/release" + 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 @@ -87,7 +87,7 @@ jobs: 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/release" + export BUILD_DIR="heap" else echo "This is a full release" cargo build --bin kaspad --bin simpa --bin rothschild --bin kaspa-wallet --release @@ -110,7 +110,7 @@ jobs: 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/release" + export BUILD_DIR="heap" else echo "This is a full release" cargo build --bin kaspad --bin simpa --bin rothschild --bin kaspa-wallet --release