-
Notifications
You must be signed in to change notification settings - Fork 14
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
Provide tool to build and distribute deno-compiled binary on PyPi #181
base: main
Are you sure you want to change the base?
Conversation
The tool, including the accompanying GH Action workflow would wrap the deno-compiled binary of the BIDS validator in wheels for different platforms and publish them on PyPi.
2470c52
to
6dcbe08
Compare
6dcbe08
to
64990cf
Compare
if git describe | grep -e -; then | ||
echo not releasing; | ||
else | ||
twine upload --verbose --repository testpypi dist/*.whl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
potentially auth could be replaced by using "trusted repositories" setup on pypi.
push: | ||
branches: | ||
- main | ||
- deno-binary |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eventually remove
- deno-binary |
on: | ||
push: | ||
branches: | ||
- main | ||
- deno-binary |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall here aim for the same setup of on
as in https://github.com/bids-standard/bids-validator/blob/main/.github/workflows/deno_tests.yml
on: | |
push: | |
branches: | |
- main | |
- deno-binary | |
on: | |
push: | |
branches: [main, dev] | |
tags: ['*'] | |
pull_request: | |
branches: [main, dev] |
and then add corresponding if
below for twine
call:
name: wheel-${{ matrix.os }} | ||
path: tools/pypi-whl/dist/*.whl | ||
- name: Publish wheels if corresponds to a tag | ||
# TODO: might be suboptimal since we might skip a tag if not the latest commit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# TODO: might be suboptimal since we might skip a tag if not the latest commit | |
if: github.ref_type == 'tag' |
# if a clean tag, no - in it | ||
if git describe | grep -e -; then | ||
echo not releasing; | ||
else | ||
twine upload --verbose --repository testpypi dist/*.whl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with above if
we likely do not need this
# if a clean tag, no - in it | |
if git describe | grep -e -; then | |
echo not releasing; | |
else | |
twine upload --verbose --repository testpypi dist/*.whl | |
twine upload --verbose --repository testpypi dist/*.whl |
The You need to get back to the |
right, somehow that got lost I guess -- may be pdm is not executed within the folder where that pdb_build.py is? Please add testing that whl files have |
Oh, I see. It reports using |
I tried to use the pdm frontend to invoke the build locally. It didn't work for me. Just use |
a46b1f1
to
4a58063
Compare
This PR closes #148. Please see commit messages for details.
Note:
--allow-run
option is used to compiled the BIDS validator from local source. Without this option, the compilation result would require the user to grant permission to run subprocesses. This option was not used/needed when compiling from the published jsr package from some reason.TODOs: