Skip to content
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

.github/workflows/mpremote.yml: Fetch full history. #11349

Merged
merged 1 commit into from
Apr 27, 2023

Conversation

jimmo
Copy link
Member

@jimmo jimmo commented Apr 27, 2023

Instead of doing the shallow checkout followed by an unshallow-with-tags, just set fetch-depth=0 to get the full history to start with.

This prevents the issue we saw with the v1.20.0 release where the github checkout action does

git fetch --no-tags --prune --progress --no-recurse-submodules --depth=1000 origin +294baf52b346e400e2255c6c1e82af5b978b18f7:refs/tags/v1.20.0

(in effect creating a "fake" v1.20.0 tag in the local repo)

and then our workflow gets the tags and history by doing

git fetch --prune --tags --unshallow

which then attempts to clobber the v1.20.0 tag with the real one.

@dhalbert
Copy link

For CircuitPython, we looked into partial clones (--filter=blob:none and --filter=tree:0), which look like a full fetch but are actualy lazy, and fetch missing things on demand. These have been around for a while, though for submodules --filter has been added to git only more recently:
adafruit#7225
adafruit#7763
adafruit#7788

@github-actions
Copy link

Code size report:

   bare-arm:    +0 +0.000% 
minimal x86:    +0 +0.000% 
   unix x64:    +0 +0.000% standard
      stm32:    +0 +0.000% PYBV10
        rp2:    +0 +0.000% PICO

@jimmo
Copy link
Member Author

jimmo commented Apr 27, 2023

See also discussion and linked PRs at actions/checkout#701

Instead of doing the shallow checkout followed by an unshallow-with-tags,
just set fetch-depth=0 to get the full history to start with.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
@dpgeorge dpgeorge merged commit 82a59a8 into micropython:master Apr 27, 2023
38 checks passed
@dpgeorge
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants