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

Attempt staticlib #433

Merged
merged 34 commits into from
Jan 29, 2024
Merged

Attempt staticlib #433

merged 34 commits into from
Jan 29, 2024

Conversation

neekolas
Copy link
Contributor

@neekolas neekolas commented Jan 19, 2024

Summary

This PR updates our swift bindings from dynamic lib (.dylib) to static lib (.a) files.

We're also adding a GitHub action that publishes swift bindings with the following directory structure to a Release artifact:

test-swift-bindings-ecb15b7/LibXMTPSwiftFFI.zip contents

├── LICENSE
├── LibXMTPRust.xcframework
│   ├── Info.plist
│   ├── ios-arm64
│   │   ├── Headers
│   │   │   ├── module.modulemap
│   │   │   └── xmtpv3FFI.h
│   │   └── libxmtpv3.a
│   ├── ios-arm64-simulator
│   │   ├── Headers
│   │   │   ├── module.modulemap
│   │   │   └── xmtpv3FFI.h
│   │   └── libxmtpv3.a
│   └── macos-arm64
│       ├── Headers
│       │   ├── module.modulemap
│       │   └── xmtpv3FFI.h
│       └── libxmtpv3.a
└── Sources
    └── LibXMTP
        └── xmtpv3.swift

A demo of the released artifact can be seen here: https://github.com/xmtp/libxmtp/releases/tag/test-swift-bindings-ecb15b7

The release artifact zip folder will be referenced from our libxmtp-swift repository so that it can simulatenously publish to Swift Package Manager, and Cocoapods.

Before this PR is merged, we would like to validate the setup against xmtp-ios and xmtp-react-native repos. This testing can be done via the following three PRs:

Base automatically changed from nm/use-latest-uniffi to main January 22, 2024 18:10
cameronvoell and others added 2 commits January 29, 2024 08:15
* Correct order in swiftlocal makefile

* Added github action for adding zipped xcframework to github release on tag action

* Run on branch commits instead of tags

* Updated tag name to not begin with refs

* Run swift local only needs to copy over source now

* fix tag name, add license to release zip artifact

* Add step for calculating checksum for release description

* Fix SHA command and check LICENSE is copied as expected

* Updated to only fire from manual workflow dispatch for now
@cameronvoell cameronvoell merged commit 9e01485 into main Jan 29, 2024
7 checks passed
@cameronvoell cameronvoell deleted the nm/staticlib branch January 29, 2024 22:12
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.

3 participants