-
Notifications
You must be signed in to change notification settings - Fork 202
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
[Swift bindings] Add bindings experimental NuGet to the dotnet-experimental feed #2878
base: feature/swift-bindings
Are you sure you want to change the base?
[Swift bindings] Add bindings experimental NuGet to the dotnet-experimental feed #2878
Conversation
</ItemGroup> | ||
|
||
<!-- Reference Swift.Bindings.MacOSX.Experimental from dotnet-experimental feed --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For tests, I think you want to reference local copy of the package that was just built.
… into swift-bindings/experimental-bindings
@EgorBot -codesafety |
… into swift-bindings/experimental-bindings
echo "Generating ABI for framework '$framework', platform '$platform', architecture '$arch'" | ||
|
||
local sdk_path=$(xcrun -sdk $(echo "$platform" | tr '[:upper:]' '[:lower:]') --show-sdk-path) | ||
local swift_interface_path="/Applications/Xcode.app/Contents/Developer/Platforms/${platform}.platform/Developer/SDKs/${platform}.sdk/System/Library/Frameworks/${framework}.framework/Versions/Current/Modules/${framework}.swiftmodule/${arch}.swiftinterface" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: use xcode-select -p
to figure out path to Xcode rather than hardcoding /Applications
function InvokeProjectionTooling { | ||
local framework=$1 | ||
|
||
$scriptroot/.dotnet/dotnet $scriptroot/artifacts/bin/Swift.Bindings/Release/net9.0/Swift.Bindings.dll -a "$framework" -o "./" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$scriptroot/.dotnet/dotnet $scriptroot/artifacts/bin/Swift.Bindings/Release/net9.0/Swift.Bindings.dll -a "$framework" -o "./" | |
$scriptroot/dotnet.sh $scriptroot/artifacts/bin/Swift.Bindings/Release/net9.0/Swift.Bindings.dll -a "$framework" -o "./" |
</Project> | ||
EOL | ||
|
||
$scriptroot/.dotnet/dotnet pack "$project_file" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$scriptroot/.dotnet/dotnet pack "$project_file" | |
$scriptroot/dotnet.sh pack "$project_file" |
Description
This PR adds binding generation step to the distribution pipeline. To enable testing of the StoreKit framework, we want to provide an experimental NuGet that can be used in real-world applications such as HikingApp. This approach will also allow us to track binding coverage and identify areas for improvement.
Changes
This change introduces a script for generating bindings that runs after the build in the distribution pipeline. The script extracts the ABI for selected frameworks, runs the tooling, and generates NuGet package from source code. The package is then distributed using
darc
in thedotnet-experimental
feed.Verification
The pipeline was invoked manually. The NuGet package will become available once this change is merged into the
feature/swift-bindings
branch, which is configured for feed publishing.Follow-up
Once the package becomes available, we will start introducing framework tests as MacCatalyst apps and track coverage of supported Swift language features from included frameworks.