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

CI: release Darwin binaries #735

Merged
merged 5 commits into from
Apr 25, 2024
Merged

CI: release Darwin binaries #735

merged 5 commits into from
Apr 25, 2024

Conversation

smelc
Copy link
Contributor

@smelc smelc commented Apr 23, 2024

Changelog

- description: |
    CI: release Darwin binaries
# 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
  # - improvement    # QoL changes e.g. refactoring
  # - 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

Additional context for the PR goes here. If the PR fixes a particular issue please provide a link to the issue.

How to trust this PR

This pipeline run shows an execution of this new pipeline. It was triggered like this:

gh workflow run "Release Upload" -r $(git branch --show-current) -f target_tag=1b35eec4cfda3756ba0bca7d6249691bcf7b1829

It targets 1b35eec, which is one of the only commits that had the Hydra builds running (see #686 for more context).

On the considered pipeline run, you can see the new binaries being attached:

image

You can download the binaries and run file on them, you'll observe they have the expected architecture:

> unzip cardano-cli-x86_64-darwin.zip
> file cardano-cli-x86_64-darwin
cardano-cli-x86_64-darwin: Mach-O 64-bit x86_64 executable, flags:<NOUNDEFS|DYLDLINK|TWOLEVEL|WEAK_DEFINES|BINDS_TO_WEAK|PIE|HAS_TLV_DESCRIPTORS>
> unzip cardano-cli-aarch64-darwin.zip
> file cardano-cli-aarch64-darwin
cardano-cli-aarch64-darwin: Mach-O 64-bit arm64 executable, flags:<NOUNDEFS|DYLDLINK|TWOLEVEL|WEAK_DEFINES|BINDS_TO_WEAK|PIE|HAS_TLV_DESCRIPTORS>

Note that I couldn't test the tail of the pipeline (create_release job), because we don't have a tagged commit on which the Hydra Darwin jobs have run (yet). It's fine: we will test it when we tag the next release and I can fix the pipeline at the time, and rerun it manually (possible because it has workflow_dispatch and support for targetting a commit different from the one it's being executed on).

Checklist

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

Base automatically changed from smelc/release-create-changelog to main April 24, 2024 12:56
@smelc smelc force-pushed the smelc/release-on-darwin-too branch from 35d5401 to 4d8c77a Compare April 24, 2024 13:30
@smelc smelc force-pushed the smelc/release-on-darwin-too branch 7 times, most recently from 508f7cc to 431f9e5 Compare April 24, 2024 15:06
@smelc smelc force-pushed the smelc/release-on-darwin-too branch from 431f9e5 to bcb228e Compare April 24, 2024 15:13
echo "ci/hydra-build:required pending. Waiting 30s..."
sleep 30;;
esac
conclusion=$(gh api "repos/$GITHUB_REPOSITORY/commits/${{ env.TARGET_TAG }}/check-runs" --jq '.check_runs[] | select(.name | test("ci/hydra-build:.*\\.required")) | .conclusion')
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Previously we were matching a single job, whereas now we match 3 of them; so we need a more flexible handling, hence the new lines below.

# Because we care of the newlines, quoting $conclusion with "" is especially important below!
# (see https://stackoverflow.com/questions/22101778/how-to-preserve-line-breaks-when-storing-command-output-to-a-variable)

# shellcheck disable=SC2126
Copy link
Contributor Author

Choose a reason for hiding this comment

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

shellcheck wants us to use grep -c instead of grep .. | wc -l. The problem with grep -c is that it fails if the number of matches is 0. We don't want that, so we keep the usage of wc -l, but need to turn the warning off.

@smelc smelc marked this pull request as ready for review April 25, 2024 08:59
@smelc smelc requested review from a team as code owners April 25, 2024 08:59
@smelc smelc added this pull request to the merge queue Apr 25, 2024
Merged via the queue into main with commit 810d44c Apr 25, 2024
31 checks passed
@smelc smelc deleted the smelc/release-on-darwin-too branch April 25, 2024 12:48
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.

2 participants