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

GitHub CI with Prebuilt Binary Wheel #188

Merged
merged 6 commits into from
Jan 13, 2024
Merged

GitHub CI with Prebuilt Binary Wheel #188

merged 6 commits into from
Jan 13, 2024

Conversation

khwong-c
Copy link
Contributor

@khwong-c khwong-c commented Jan 11, 2024

Feature

Closing #187

  • Building Linux X86-64 Binary Wheel
  • Publish to PyPi if a tag is pushed in the format of v*

Result Preview

You may preview the CI execution Result here.
https://github.com/khwong-c/hdlConvertor/actions/runs/7487908840

The Artifact PythonPackage contains all prebuilt binary wheel.
Open one of them and you can find the ANTLR4 Binary in the hdlConvertor.libs directory.
They will be installed and loaded by pip install hdlConvertor if it is available.

Detail explained

We are not changing the build script, instead bundling the shared object (*.so) required by hdlConvertor
This can be done easily with auditwheel package.
External binary dependencies are injected into the wheel after repair.

Different platforms need different tools for repairing the wheel.
I have done the Linux one and you might follow the same pattern and complete the others

platform package
Linux auditwheel
Mac delocate
Windows delvewheel

What if ...

  1. I want to move on Meson build?
  • This script does not care if you are using CMake / Meson, as long as you are using setup.py as your entry point for the build.
  1. I want to perform debug build and testing?
  • Please fill in the details in the build_and_test job.
  1. I want to build with other Python interpreters? (e.g. Pypy)
  1. I want to test this on other branches (e.g. mensonbuild )
  • This PR only adds a single file, without any changes to other files. It should be an easy git merge master once the PR is merged to master.

@Nic30 Nic30 merged commit 13fce3c into Nic30:master Jan 13, 2024
0 of 2 checks passed
@Nic30
Copy link
Owner

Nic30 commented Jan 13, 2024

Nice, it seem to work, i do not test release for now, can you please prepare CI config also for windows?

@khwong-c
Copy link
Contributor Author

I don't have a working build on Windows.
Would you mind providing the instructions for a functional build on Windows?
Similar case for Mac.

@khwong-c
Copy link
Contributor Author

@Nic30 BTW. The Ubuntu version is intended to be 20.04.
It's for backward compactibility for the end-developer. (not everyone is running on 23.10)
It will break the auditwheel command

Furthermore, the latest ubuntu on GitHub is 22.
Your workflow will never be served.
image

@Nic30
Copy link
Owner

Nic30 commented Jan 14, 2024

OK, reverting in 4bcce70

@Nic30
Copy link
Owner

Nic30 commented Jan 14, 2024

There is https://github.com/Nic30/hdlConvertor/blob/master/.appveyor.yml
https://ci.appveyor.com/project/nic30/hdlconvertor/builds/48947326
The appveyor has often problems with not enough RAM.
In addition some MSVC versions causing enormous memory leaks.

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