Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 5 commits into from
Jul 15, 2024

Conversation

angerman
Copy link
Collaborator

@angerman angerman commented Jul 4, 2024

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 #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

  • Commit sequence broadly makes sense and commits have useful messages
  • Self-reviewed the diff

Copy link
Contributor

@carbolymer carbolymer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks a lot Moritz!

@carbolymer carbolymer linked an issue Jul 4, 2024 that may be closed by this pull request
@smelc smelc changed the title add aarch64-linux (static) cross Build aarch64-linux binary in Hydra + use static binary for x86-64 Linux release Jul 5, 2024
@smelc smelc added this pull request to the merge queue Jul 15, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Jul 15, 2024
@palas palas enabled auto-merge July 15, 2024 21:58
@palas palas disabled auto-merge July 15, 2024 22:31
@palas palas enabled auto-merge July 15, 2024 22:31
@palas palas disabled auto-merge July 15, 2024 22:31
@palas palas enabled auto-merge July 15, 2024 22:32
@palas palas added this pull request to the merge queue Jul 15, 2024
Merged via the queue into main with commit 9b34c13 Jul 15, 2024
23 checks passed
@palas palas deleted the angerman/cross branch July 15, 2024 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Release statically linked binaries, not dynamically linked ones
4 participants