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

Upload homebrew artifact for the c++ binding to releases. #137

Closed
coltfred opened this issue Jun 5, 2020 · 2 comments
Closed

Upload homebrew artifact for the c++ binding to releases. #137

coltfred opened this issue Jun 5, 2020 · 2 comments
Assignees
Labels
Milestone

Comments

@coltfred
Copy link
Member

coltfred commented Jun 5, 2020

In order to support the swift sdk we need to release a statically linked binary which works for both the emulator and a real device.

This means that on MacOS we need to use cargo lipo to build an ios binary and upload it with the other ironoxide_java artifacts.

In addition to uploading the statically linked library for ios.

As part of this we should also rename the ironoxide_shared to just ironoxide

@ernieturner ernieturner changed the title Upload OSX & iOS artifacts for the c++ binding to releases. Upload iOS artifacts for the c++ binding to releases. Jun 8, 2020
@ernieturner ernieturner added this to the 2020-06-19 milestone Jun 8, 2020
@cjyar cjyar added the ops label Jun 8, 2020
@coltfred
Copy link
Member Author

coltfred commented Jun 8, 2020

I started this work over on the osx_build branch. I renamed the library to ironoxide.

We need to change crate-type to staticlib on the machine that's doing the ironoxide ios build (which must be on OSX).

After setting up the crate-type, we should install cargo-lipo. Then we should run cargo lipo --release in the cpp dir. Once we do that, we should upload it to the release as ironoxide_ios.a.

We want to do the ios suffix in the release so if we produce a different lib later which is statically linked we can handle it.

@coltfred coltfred changed the title Upload iOS artifacts for the c++ binding to releases. Upload homebrew artifact for the c++ binding to releases. Jun 10, 2020
@coltfred
Copy link
Member Author

coltfred commented Jun 10, 2020

Instead of just uploading the .a file for ios, we'll instead want to make a single tar which will be the thing that our homebrew recipe will download.

The form of the tar should be this:

├── headers
├── ironoxide.pc.in
└── libironoxide.a

headers is a dir with all the headers (the files from cpp/generated/sdk)
ironoxide.pc.in is a file with the following in it:

prefix=%PREFIX%
exec_prefix=${prefix}
includedir=${prefix}/include
libdir=${exec_prefix}/lib

Name: ironoxide
Description: The ironoxide library
Version: 0.13.1
Cflags: -I${includedir}/ironoxide
Libs: -L${libdir} -lironoxide

We should tar this up and call it ironoxide-homebrew.tar.gz.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants