From d0498a22d187940315429b71429a0613ac14af76 Mon Sep 17 00:00:00 2001 From: Chris O'Neil Date: Wed, 1 May 2024 18:12:42 +0100 Subject: [PATCH] ci: add `node-launchpad` binary to release process 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. --- .github/workflows/build-release-artifacts.yml | 8 ++++---- Justfile | 19 +++++++++++++++++-- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-release-artifacts.yml b/.github/workflows/build-release-artifacts.yml index f2b5452300..1d67e74c90 100644 --- a/.github/workflows/build-release-artifacts.yml +++ b/.github/workflows/build-release-artifacts.yml @@ -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: @@ -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 @@ -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 diff --git a/Justfile b/Justfile index 2b32a3a2ae..a3273df8ca 100644 --- a/Justfile +++ b/Justfile @@ -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 @@ -118,6 +119,7 @@ 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 @@ -125,6 +127,7 @@ build-release-artifacts arch: 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 \; @@ -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 @@ -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 @@ -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) @@ -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 @@ -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