Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Embed git commit hash into Python source #319

Merged
merged 15 commits into from
Jun 27, 2024
8 changes: 8 additions & 0 deletions .github/actions/nm-build-vllm/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ runs:
run: |
COMMIT=${{ github.sha }}
VENV="${{ inputs.venv }}-${COMMIT:0:7}"

dbarbuzzi marked this conversation as resolved.
Show resolved Hide resolved
# add githash `to version.py` and include in 'all' for `vllm/__init__.py`
dbarbuzzi marked this conversation as resolved.
Show resolved Hide resolved
echo "__githash__ = '$COMMIT'" >> vllm/version.py
# update import line
sed -i 's/import __version__/import __githash__, __version__/' vllm/__init__.py
# update "__all__" list
sed -i 's/"__version__",/"__githash__",\n "__version__",/' vllm/__init__.py

source $(pyenv root)/versions/${{ inputs.python }}/envs/${VENV}/bin/activate
# TODO: adjust when we need a proper release. use nightly now.
pip3 install -r requirements-cuda.txt -r requirements-build.txt
Expand Down
Loading