diff --git a/config.yml b/config.yml index 3accbed..9a26036 100644 --- a/config.yml +++ b/config.yml @@ -464,6 +464,17 @@ patches: false purpose: "node" +- repository: "slinky" + project_name: "slinky" + architecture: "x86_64" + binaries: + - "slinky" + builder: "go" + builder_version: "1.23.2" + cpu: "generic" + patches: false + purpose: "tool" + # Docker images - repository: "bouncebit" diff --git a/scripts/slinky/build.sh b/scripts/slinky/build.sh new file mode 100644 index 0000000..48b60f1 --- /dev/null +++ b/scripts/slinky/build.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +set -euo pipefail + +cd "${DEPOT_PROJECT_NAME}" +mkdir bin + +# Build slinky with static linking using musl +export CGO_ENABLED=1 +export CGO_LDFLAGS="-static" +export GOFLAGS="" + +# Build slinky binary +go build -ldflags="-linkmode external -extldflags '-static'" -o slinky ./cmd/slinky + +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 "${GITHUB_WORKSPACE}/slinky/${binary}" "${path}" +done