Skip to content

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
Contributor

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 force-pushed the mpremote-build-checkout branch from d980f42 to 82a59a8 Compare April 27, 2023 03:01
@dpgeorge dpgeorge merged commit 82a59a8 into micropython:master Apr 27, 2023
@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.

3 participants