IntersectMBO / cardano-cli

This repository contains sources for the command-line interface (CLI) tool for interacting with the Cardano blockchain.
Apache License 2.0
33 stars 13 forks source link

Build aarch64-linux binary in Hydra + use static binary for x86-64 Linux release #819

Closed angerman closed 4 days ago

angerman commented 2 weeks ago

Changelog

- description: |
    Build aarch64-linux binary in Hydra + use static binary for x86-64 Linux release
# uncomment types applicable to the change:
  type:
  # - feature        # introduces a new feature
  # - breaking       # the API has changed in a breaking way
  # - compatible     # the API has changed but is non-breaking
  # - optimisation   # measurable performance improvements
  # - refactoring    # QoL changes
  # - bugfix         # fixes a defect
  # - test           # fixes/modifies tests
  # - maintenance    # not directly related to the code
  - release        # related to a new release preparation
  # - documentation  # change in code docs, haddocks...

Context

Fixes https://github.com/IntersectMBO/cardano-cli/issues/815

How to trust this PR

Try downloading the binaries built by Hydra and witness that the binaries are statically linked with file:

> export LOCKED_URL=github:IntersectMBO/cardano-cli/3a3c19da08c53e9030a0d0ab99c4379ee8a87bf2
> nix build --builders "" --max-jobs 0 $LOCKED_URL#hydraJobs.x86_64-linux.x86_64-unknown-linux-musl.packages.cardano-cli:exe:cardano-cli
> file result/bin/cardano-cli 
result/bin/cardano-cli: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, not stripped
> rm -Rf result
> nix build --builders "" --max-jobs 0 $LOCKED_URL#hydraJobs.x86_64-linux.aarch64-unknown-linux-musl.packages.cardano-cli:exe:cardano-cli
> file result/bin/cardano-cli 
result/bin/cardano-cli: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, not stripped

For the release pipeline, you can check the same by downloading assets from this run: https://github.com/IntersectMBO/cardano-cli/actions/runs/9806337722 and execute file on the downloaded files:

image

(note that this run was triggered from https://github.com/IntersectMBO/cardano-cli/commits/smelc/cross/ to circumvent that some Hydra required checks did not pass on this PR's HEAD).

Checklist