vyperlang / vyper

Pythonic Smart Contract Language for the EVM
https://vyperlang.org
Other
4.91k stars 803 forks source link

fix[ci]: fix commithash calculation for pypi release #4309

Closed charles-cooper closed 1 month ago

charles-cooper commented 1 month ago

What I did

fix https://github.com/vyperlang/vyper/issues/4308

How I did it

How to verify it

Commit message

there is a mismatch between the commit hash in the binary of the github
release vs the pypi release. for example,
```bash
~ $ vyper --version  # pipx install vyper==0.4.0
0.4.0+commit.e9db8d9
~ $ .vvm/vyper-0.4.0 --version
0.4.0+commit.e9db8d9f

this is due to how git computes the shorthash. when checkout is run for release-pypi.yml, it doesn't fetch the full commit history, and so there are fewer commits, so git rev-parse --short HEAD returns a smaller fingerprint for the commit hash.

this commit amends the pypi release checkout step so that it matches the github release workflow.

it also adds a debug step to the relevant workflows so that we can debug the commit hash during the github action.



### Description for the changelog

### Cute Animal Picture

![Put a link to a cute animal picture inside the parenthesis-->]()
charles-cooper commented 1 month ago

compare build.yml https://github.com/charles-cooper/vyper/actions/runs/11346861432/job/31556966779#step:3:5 Screenshot from 2024-10-15 09-17-58

and release-pypi.yml https://github.com/charles-cooper/vyper/actions/runs/11346861677/job/31556897715#step:4:5 Screenshot from 2024-10-15 09-18-13

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 46.12%. Comparing base (a70a024) to head (bd5b4f1). Report is 6 commits behind head on master.

:exclamation: There is a different number of reports uploaded between BASE (a70a024) and HEAD (bd5b4f1). Click for more details.

HEAD has 138 uploads less than BASE | Flag | BASE (a70a024) | HEAD (bd5b4f1) | |------|------|------| ||139|1|
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #4309 +/- ## =========================================== - Coverage 91.40% 46.12% -45.29% =========================================== Files 112 112 Lines 15917 15923 +6 Branches 2693 2693 =========================================== - Hits 14549 7344 -7205 - Misses 934 8025 +7091 - Partials 434 554 +120 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.