panda-re / panda

Platform for Architecture-Neutral Dynamic Analysis
https://panda.re
Other
2.45k stars 475 forks source link

Attempt 2 on publishing wheel #1467

Closed AndrewQuijano closed 5 months ago

AndrewQuijano commented 5 months ago

I did a bit more investigating on publishing wheel files and found this link: https://github.com/pypa/gh-action-pypi-publish/discussions/15

Based on the information here, I updated the YAML to repeat what they did for releasing py panda https://github.com/ansible/pylibssh/blob/17e8683/.github/workflows/build-test-n-publish.yml#L353-L357 https://github.com/ansible/pylibssh/releases

lacraig2 commented 5 months ago

I tried getting this workflow working several times and on each of the runs the whl file was missing.

https://github.com/panda-re/panda/actions/runs/8035190848/job/21947562763#step:5:11

This version looks like we've changed to release assets and now uploading the the whole folder as release assets.

AndrewQuijano commented 5 months ago

Hm, so technically the file is specifically called 'pandare-0.1.2.0-py3-none-any.whl' after I finish running setup. I do try to be flexible with the naming in case any changes occur to setup.py.

I'm a bit surprised as when I run this locally, I do get the wheel file

lacraig2 commented 5 months ago

I also get the whl file locally.

I'm not quite sure what the issue is.

AndrewQuijano commented 5 months ago

Actually, I just noticed there is a whole pypackage. Could we not use GitHub actions to automate updating the pip package?

https://pypi.org/project/pandare/#description

AndrewQuijano commented 5 months ago

https://github.com/marketplace/actions/pypi-publish

lacraig2 commented 5 months ago

@AndrewQuijano now that the whl is small I think that would be fine.

AndrewQuijano commented 5 months ago

After a quick chat with Brendan, apparently * is not allowed, so I used this comment for a work around. I will also work on pypi upload too on this PR.

https://github.com/actions/upload-release-asset/issues/47#issuecomment-668543873

AndrewQuijano commented 5 months ago

I made a first attempt at writing the job to publish to pypi, I will likely need help from MITLL to get the secret and all to get this working too.

Also, I should note, currently for python, protobuf 3.20.0 is the latest version that works with the installed version of protobuf. Not sure if you suggest I update the pypanda requirements for this?

https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/

AndrewQuijano commented 5 months ago

For transparency, I am also working on updating how python package dependencies are managed. I will run the test debian package set up later tonight to confirm this works.

We should avoid having 3 separate places where we install a python package.

lacraig2 commented 5 months ago

We should avoid having 3 separate places where we install a python package.

❤️

AndrewQuijano commented 5 months ago

packages_made pip_worked

lacraig2 commented 5 months ago

I think this isn't passing tests for unrelated reasons.

@AndrewQuijano I will merge this if you think it's ready.