From 82e6d20949d894f5cf93e04a2cdc7407ed35b7b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Markus=20J=C3=B5gila?= Date: Thu, 31 Oct 2024 12:53:22 +0200 Subject: [PATCH] RES-1681: Build namada binary --- config.yml | 11 +++++++++++ scripts/namada/build.sh | 16 ++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 scripts/namada/build.sh diff --git a/config.yml b/config.yml index 1d1cec0..73050f4 100644 --- a/config.yml +++ b/config.yml @@ -236,6 +236,17 @@ patches: false purpose: "node" +- repository: "namada" + project_name: "namada" + architecture: "x86_64" + binaries: + - "namada" + builder: "rust" + builder_version: "1.80" + cpu: "x86_64" + patches: false + purpose: "node" + # TOOLS - repository: "tmkms" project_name: "tmkms" diff --git a/scripts/namada/build.sh b/scripts/namada/build.sh new file mode 100644 index 0000000..6398fba --- /dev/null +++ b/scripts/namada/build.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +set -euo pipefail + +cd "${DEPOT_PROJECT_NAME}" +mkdir bin + +export CARGO_BUILD_TARGET="x86_64-unknown-linux-gnu" +export CARGO_INCREMENTAL="0" + +cargo build --release --bin namada + +build_binaries="$(deno run --allow-read --allow-env ../utils/binaries.ts)" + +echo "${build_binaries}" | jq -r 'to_entries[] | "\(.key) \(.value)"' | while read -r binary path; do + mv -v "target/${CARGO_BUILD_TARGET}/release/${binary}" "${path}" +done