Skip to content

Commit

Permalink
ci: add node-launchpad binary to release process
Browse files Browse the repository at this point in the history
The new TUI for the node manager is a new, separate binary that is being added in to the release
process.

For some reason it seems to have became necessary to explicitly call `rustup target` during the
artifacts build process. Without doing it, I was getting build errors on macOS.
  • Loading branch information
jacderida committed May 1, 2024
1 parent 7c410fc commit d0498a2
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build-release-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
default: main

env:
JUST_BIN_URL: https://github.com/casey/just/releases/download/1.13.0/just-1.13.0-x86_64-unknown-linux-musl.tar.gz
JUST_BIN_URL: https://github.com/casey/just/releases/download/1.25.2/just-1.25.2-x86_64-unknown-linux-musl.tar.gz

jobs:
build:
Expand Down Expand Up @@ -95,8 +95,8 @@ jobs:
run: |
curl -L -O $JUST_BIN_URL
mkdir just
tar xvf just-1.13.0-x86_64-unknown-linux-musl.tar.gz -C just
rm just-1.13.0-x86_64-unknown-linux-musl.tar.gz
tar xvf just-1.25.2-x86_64-unknown-linux-musl.tar.gz -C just
rm just-1.25.2-x86_64-unknown-linux-musl.tar.gz
sudo mv just/just /usr/local/bin
rm -rf just
sudo apt-get install -y tree
Expand All @@ -106,9 +106,9 @@ jobs:
tree artifacts
just package-release-assets "safe"
just package-release-assets "safenode"
just package-release-assets "testnet"
just package-release-assets "faucet"
just package-release-assets "safenode_rpc_client"
just package-release-assets "node-launchpad"
- uses: actions/upload-artifact@main
with:
name: packaged_binaries
Expand Down
19 changes: 17 additions & 2 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,10 @@ build-release-artifacts arch:
sudo apt update -y
sudo apt-get install -y musl-tools
fi
rustup target add x86_64-unknown-linux-musl
fi

rustup target add {{arch}}

rm -rf artifacts
mkdir artifacts
cargo clean
Expand All @@ -118,13 +119,15 @@ build-release-artifacts arch:
cross build --release --target $arch --bin safenodemand
cross build --release --target $arch --bin faucet --features=distribution
cross build --release --target $arch --bin safenode_rpc_client
cross build --release --target $arch --bin node-launchpad
else
cargo build --release --features="network-contacts,distribution" --target $arch --bin safe
cargo build --release --features=network-contacts --target $arch --bin safenode
cargo build --release --target $arch --bin safenode-manager
cargo build --release --target $arch --bin safenodemand
cargo build --release --target $arch --bin faucet --features=distribution
cargo build --release --target $arch --bin safenode_rpc_client
cargo build --release --target $arch --bin node-launchpad
fi

find target/$arch/release -maxdepth 1 -type f -exec cp '{}' artifacts \;
Expand Down Expand Up @@ -168,7 +171,8 @@ package-release-assets bin version="":

bin="{{bin}}"

supported_bins=("safe" "safenode" "safenode-manager" "safenodemand" "faucet" "safenode_rpc_client")
supported_bins=(\
"safe" "safenode" "safenode-manager" "safenodemand" "faucet" "safenode_rpc_client" "node-launchpad")
crate_dir_name=""

# In the case of the node manager, the actual name of the crate is `sn-node-manager`, but the
Expand All @@ -193,6 +197,9 @@ package-release-assets bin version="":
safenode_rpc_client)
crate_dir_name="sn_node_rpc_client"
;;
node-launchpad)
crate_dir_name="sn_node_launchpad"
;;
*)
echo "The $bin binary is not supported"
exit 1
Expand Down Expand Up @@ -234,6 +241,7 @@ upload-github-release-assets:
"sn-node-manager"
"sn_faucet"
"sn_node_rpc_client"
"sn_node_launchpad"
)

commit_msg=$(git log -1 --pretty=%B)
Expand Down Expand Up @@ -270,6 +278,10 @@ upload-github-release-assets:
bin_name="safenode_rpc_client"
bucket="sn-node-rpc-client"
;;
sn_node_launchpad)
bin_name="node-launchpad"
bucket="sn-node-launchpad"
;;
*)
echo "The $crate crate is not supported"
exit 1
Expand Down Expand Up @@ -316,6 +328,9 @@ upload-release-assets-to-s3 bin_name:
safenode_rpc_client)
bucket="sn-node-rpc-client"
;;
node-launchpad)
bucket="sn-node-launchpad"
;;
*)
echo "The {{bin_name}} binary is not supported"
exit 1
Expand Down

0 comments on commit d0498a2

Please sign in to comment.