Skip to content

cache only submodules in tools/#7513

Closed
dhalbert wants to merge 1 commit into
adafruit:mainfrom
dhalbert:cache-tools-submodules
Closed

cache only submodules in tools/#7513
dhalbert wants to merge 1 commit into
adafruit:mainfrom
dhalbert:cache-tools-submodules

Conversation

@dhalbert
Copy link
Copy Markdown
Collaborator

Based on 78aca07.

Cache only submodules in tools/, not the whole directory.

List is from:

$ ag "path = tools" --nonumbers .gitmodules |sort
	path = tools/adabot
	path = tools/bitmap_font
	path = tools/huffman
	path = tools/python-semver
	path = tools/Tecate-bitmap-fonts
	path = tools/uf2
	path = tools/usb_descriptor

@dhalbert dhalbert requested review from microdev1 and tannewt January 30, 2023 20:18
description: 'The submodules to cache'
required: false
default: '["extmod/ulab", "lib/", "tools/"]'
default: '["extmod/ulab", "lib/", "tools/adabot", "tools/bitmap_font", "tools/huffman", "tools/python-semver", "tools/Tecate-bitmap-fonts", "tools/uf2", "tools/usb_descriptor"]'
Copy link
Copy Markdown
Collaborator

@microdev1 microdev1 Jan 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Directories are allowed here. Only the submodule paths are fed to actions/cache.

Following line does the conversion:

echo $(cut -d ' ' -f 2 submodule_status) | echo "submodules=[\"$(sed "s/ /\", \"/g")\"]" >> $GITHUB_OUTPUT

From the logs:

Run actions/cache@v3
  with:
    path: .git/modules/
  extmod/ulab
  lib/adafruit_floppy
  lib/axtls
  lib/berkeley-db-1.xx
  lib/certificates/nina-fw
  lib/libffi
  lib/mbedtls
  lib/mp3
  lib/nrfutil
  lib/protomatter
  lib/quirc
  lib/tinyusb
  tools/Tecate-bitmap-fonts
  tools/adabot
  tools/bitmap_font
  tools/huffman
  tools/python-semver
  tools/uf2
  tools/usb_descriptor
    key: submodules-common-f01551f27a11d33e88cfb801bd3cbba6613aec14d2b92201488289f81061fc96
    enableCrossOsArchive: true

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you understand why @tannewt found 78aca07 necessary, then? He saw a build fail that seemed to be due to caching an old version of something (not a submodule) in tools/

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was an older version of the caching code. Perhaps this new version works ok.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aha, ok, I'll close this for now, then

@dhalbert dhalbert closed this Jan 30, 2023
@dhalbert dhalbert deleted the cache-tools-submodules branch March 7, 2023 17:23
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