From 7dadcc70aa03271fbd8c15c9ed369981ca13e72d Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sun, 17 Dec 2023 08:59:14 -0600 Subject: [PATCH 1/2] ensure tags are present this should fix the message during CI ``` .../setuptools_scm/git.py:163: UserWarning: "/home/runner/work/circuitpython-build-tools/circuitpython-build-tools" is shallow and may cause errors warnings.warn(f'"{wd.path}" is shallow and may cause errors') ``` This may have been introduced when upgrading action/checkout recently, or it might be pre-existing. --- .github/workflows/build.yml | 3 +++ .github/workflows/release.yml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3c657de..a301583 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,6 +24,9 @@ jobs: python3 --version - name: Checkout Current Repo uses: actions/checkout@v4 + with: + filter: 'blob:none' + depth: 0 - name: Install requirements run: | sudo apt-get update diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5e81de8..728ba8e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,6 +14,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + filter: 'blob:none' + depth: 0 - name: Set up Python uses: actions/setup-python@v5 with: From 4f50d277dabb983edc3a5df91d3decb6adfec1af Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 19 Dec 2023 11:23:53 -0600 Subject: [PATCH 2/2] enable standard zip ("deflate") compression This saves ~50% on the main bundle and will save ~85% on the fonts bundle --- circuitpython_build_tools/scripts/build_bundles.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/circuitpython_build_tools/scripts/build_bundles.py b/circuitpython_build_tools/scripts/build_bundles.py index 6fa472a..e85610e 100755 --- a/circuitpython_build_tools/scripts/build_bundles.py +++ b/circuitpython_build_tools/scripts/build_bundles.py @@ -205,7 +205,7 @@ def build_bundle(libs, bundle_version, output_filename, package_folder_prefix, print() print("Zipping") - with zipfile.ZipFile(output_filename, 'w') as bundle: + with zipfile.ZipFile(output_filename, 'w', compression=zipfile.ZIP_DEFLATED) as bundle: build_metadata = {"build-tools-version": build_tools_version} bundle.comment = json.dumps(build_metadata).encode("utf-8") if multiple_libs: