-
Notifications
You must be signed in to change notification settings - Fork 39
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
Add Python wheel building + Publishing workflow #70
Add Python wheel building + Publishing workflow #70
Conversation
A docker image is made in necessary129/manylinux2014-LLVM with prebuilt LLVM + cmake + ninja cibuildwheel is being used to generate the wheels. Which uses `auditwheel` to bundle linked libraries. So the ELF patching in `preparation.py` is not needed. The includes can be be found by Python by itself. Only `utils.h` needs to be specifically included.
A new musl docker image was made. Which would make it possible to build musl wheels also.
Will publish to pypi on release
0173bab
to
1d34c00
Compare
Also removed the prebuild wheels as wheel as CI autogenerated now
1d34c00
to
3f59245
Compare
Hi @necessary129, |
Will also publish to testpypi first on release, and a manual workflow dispatch will have the option to deploy to actual pypi
38d9741
to
b374381
Compare
d780901
to
c01d516
Compare
c01d516
to
4739ca3
Compare
Added tests. They only test the program vectors in oracle at the moment because the function names in oracle and those produced by the Python binding is different. |
de5e1af
to
a7d5393
Compare
Compare the python module output to the oracle
a7d5393
to
7671950
Compare
2f12304
to
ffa53fc
Compare
21397c8
to
f109e22
Compare
Will test each FA and SYM flevel embeddings also
Also fix a memory leak caused by not freeing the `__cxx::demangle` return pointer
Python wheels are built in GLIBc ~ 2.17 so some functions are not demangled properly. So we rebuild them using the ir2vec binary and test the Python output against it. The ir2vec binary output is tested against the actual oracle in another workflow. So, this should be fine.
clang doesn't compile on musllinux directly. Need to figure that out. in the meantime, don't build it. musl is not common anyway.
f109e22
to
104f2a4
Compare
e54f2c5
to
5f66ba8
Compare
5f66ba8
to
38c3e51
Compare
A docker image is made in necessary129/manylinux2014-LLVM
with prebuilt LLVM + cmake + ninja
cibuildwheel is being used to generate the wheels. Which
uses
auditwheel
to bundle linked libraries. So the ELFpatching in
preparation.py
is not needed.The includes can be be found by Python by itself. Only
utils.h
needs to be specifically included.
wheels are automatically made for all linux x86_64 Python versions
from 3.6 to 3.11
On publishing a release, the Python package is also published to
testpypi (as a proof of concept) -- This should be changed to actual pypi
on the main branch.
Each wheel is also down to ~5MB from ~60MB
Will close #52
The testpypi package: https://test.pypi.org/project/IR2Vec/