Skip to content

Enhancements to the release build script #165

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

Merged
merged 8 commits into from
Oct 18, 2024

Conversation

cmcgee1024
Copy link
Member

Add macOS support for making releases there.

Rewrite the release builder script in Swift for better reproducibility and ergonomics. It runs using this command:

swift run build-swiftly-release

Perform necessary system checks up front so that anyone running the script can make any necessary adjustments so that the release can be built.

Print the location of the final release product file at the end for easy of finding the path to copy to the final release destination.

@cmcgee1024 cmcgee1024 force-pushed the release-script-enhancement branch 3 times, most recently from f6d6900 to fd783ca Compare September 11, 2024 14:54
Add macOS support for making releases there.

Rewrite the release builder script in Swift for better reproducibility
and ergonomics. It runs using this command:

    swift run build-swiftly-release

Perform necessary system checks up front so that anyone running the
script can make any necessary adjustments so that the release can be
built.

Print the location of the final release product file at the end for
easy of finding the path to copy to the final release destination.
@cmcgee1024 cmcgee1024 force-pushed the release-script-enhancement branch from fd783ca to 5237b8e Compare September 11, 2024 15:01
@cmcgee1024
Copy link
Member Author

@swift-ci test macOS

@cmcgee1024
Copy link
Member Author

cmcgee1024 commented Sep 12, 2024

Addresses a portion of #146

@cmcgee1024
Copy link
Member Author

TODO: include all of the relevant licenses into the release artifact, including libarchive.

@cmcgee1024
Copy link
Member Author

@swift-ci test macOS

#if arch(arm64)
return
#else
throw Error(message: "Releases must be made from an Apple Silicon macOS system to make universal binaries.")
Copy link
Member Author

Choose a reason for hiding this comment

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

This does not appear to be a restriction, so just remove this.

let cwd = FileManager.default.currentDirectoryPath

// Copy the swiftly license to the bundle
try FileManager.default.copyItem(atPath: cwd + "/LICENSE.txt", toPath: licenseDir + "/LICENSE.txt")
Copy link
Member Author

Choose a reason for hiding this comment

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

The license file from swiftly should be the sole license file at the root of the archive.

@cmcgee1024 cmcgee1024 requested a review from shahmishal October 11, 2024 12:30
…s check

Scale back the license gathering to only including the swiftly license

Add a check for the presence of the which command used to find the other tools
@shahmishal
Copy link
Member

We should update the logic to allow inputs for identifier and sign cert for macOS .pkg

Comment on lines +17 to +18
* Build on an Amazon Linux 2 image for x86_64
* Build on an Amazon Linux 2 image for arm64
Copy link
Member

Choose a reason for hiding this comment

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

Is there a reason we are only building for Amazon Linux 2 image compared to all platforms? Also, should we use static sdk to build for multiple platforms?

Copy link
Member Author

Choose a reason for hiding this comment

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

Amazon Linux 2 has the oldest glibc of the supported Linux distributions, so compiling with it will help guarantee binary compatibility with the rest. We have an issue open to use static Linux sdk / musl #119 for a future release. In the meantime time, the release needs to be made from AL2.

@shahmishal shahmishal self-requested a review October 17, 2024 23:50
@cmcgee1024 cmcgee1024 merged commit 826ac66 into swiftlang:main Oct 18, 2024
5 checks passed
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