-
Notifications
You must be signed in to change notification settings - Fork 5
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 Taskfile to build package; Refactor docs tasks. #46
Conversation
Workflow failures unrelated to the present PR. They'll be addressed in another PR. |
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.
It seems we do not checksum all build/dist
artifacts. e.g.,
rm -f build/dist/*.tar.gz
task # does not trigger `wheel` rebuild
Just want to make sure whether that is intended as I understand the build/dist/*.whl
file is the final packaged file. Approved assuming that is intended.
Title: ?
|
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.
In fact, hashing of the *.whl
file does not seem correctly handled. I modified the magic number PK
of build/dist/clp_ffi_py-0.0.10-cp310-cp310-linux_x86_64.whl
and running the task
command did not rebuild the task.
- "rm -rf '{{.OUTPUT_DIR}}'" | ||
- |- | ||
. "{{.WHEEL_VENV_DIR}}/bin/activate" | ||
python3 -m build --outdir "{{.OUTPUT_DIR}}" |
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.
python3 -m build --outdir "{{.OUTPUT_DIR}}" | |
python3 -m build --outdir "{{.OUTPUT_DIR}}" | |
# Checksum the generated files (this command must be last) | |
- |- | |
cd "{{.OUTPUT_DIR}}" | |
tar cf - {{.CHECKSUM_TAR_BASE_ARGS}} . | md5sum > "{{.CHECKSUM_FILE}}" |
Taskfile.yml
Outdated
generates: | ||
- "{{.OUTPUT_DIR}}/*.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.
generates: | |
- "{{.OUTPUT_DIR}}/*.whl" | |
status: | |
- "test -f '{{.CHECKSUM_FILE}}'" | |
- >- | |
diff | |
<(cd '{{.OUTPUT_DIR}}' && tar cf - {{.CHECKSUM_TAR_BASE_ARGS}} . | md5sum) | |
"{{.CHECKSUM_FILE}}" |
I did intentionally leave out the
Huh, strange. I would've expected |
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.
Looks good.
Description
This PR:
NOTE: This PR requires task v3.35.1 for the latest bug fixes.
Validation performed
Validated building each artifact from a clean state:
Validated repeated builds of each artifact-generating task did not result in the artifact being regenerated:
Validated that after running
task docs:site
, changing any of the following files triggered a rebuild of just the docs:docs/conf/conf.py
docs/src/index.md
docs/tasks.yml
Validated that after running
task wheel
, changing any of the following triggered a rebuild of the wheel:clp_ffi_py/__init__.py
src/clp
(the version of the clp submodule)src/clp_ffi_py/error_messages.hpp
Taskfile.yml
Validated that after running
task docs:site
, changing any of the following files from the previous step triggered a rebuild of the wheel and the docs.Validated
task clean && task docs:serve
built and served the site.