Reduce disk usage on bootstrap cache miss (#29799)
diff --git a/.github/actions/checkout-submodules-and-bootstrap/action.yaml b/.github/actions/checkout-submodules-and-bootstrap/action.yaml
index 160e4fa..f7db541 100644
--- a/.github/actions/checkout-submodules-and-bootstrap/action.yaml
+++ b/.github/actions/checkout-submodules-and-bootstrap/action.yaml
@@ -28,6 +28,14 @@
uses: ./.github/actions/bootstrap
with:
platform: ${{ inputs.platform }}
+ - name: Remove CIPD cache directory
+ # If there is a bootstrap-cache miss, and bootstrap installs CIPD itself,
+ # there is roughly 1.4GB that remains in this cache that is useless from
+ # this point onwards.
+ shell: bash
+ run: |
+ du -sh $HOME/.cipd-cache-dir/ || true
+ rm -rf $HOME/.cipd-cache-dir/ || echo "Removing cipd cache dir failed"
- name: Dump disk info after checkout submodule & Bootstrap
shell: bash
run: scripts/dump_diskspace_info.sh
diff --git a/.restyled.yaml b/.restyled.yaml
index 66e9f60..06180a0 100644
--- a/.restyled.yaml
+++ b/.restyled.yaml
@@ -82,7 +82,7 @@
- "src/controller/java/zap-generated/**/*" # not formatted: generated files
- "scripts/setup/bootstrap.sh" # tries to quote loop variable
- "integrations/docker/build-all.sh" # tries to quote loop variable
- - "pigweed.json" # TODO(#29547). This file is temporary copy from pigweed repo that has minor edits. No restyle help in diff.
+ - "scripts/setup/pigweed.json" # TODO(#29547). This file is temporary copy from pigweed repo that has minor edits. No restyle help in diff.
changed_paths:
maximum: 100000
diff --git a/scripts/setup/environment.json b/scripts/setup/environment.json
index 833ffe4..23b4bb2 100644
--- a/scripts/setup/environment.json
+++ b/scripts/setup/environment.json
@@ -1,7 +1,7 @@
{
"cipd_package_files": [
"third_party/pigweed/repo/pw_env_setup/py/pw_env_setup/cipd_setup/arm.json",
- "pigweed.json",
+ "scripts/setup/pigweed.json",
"scripts/setup/python.json",
"scripts/setup/zap.json"
],
diff --git a/pigweed.json b/scripts/setup/pigweed.json
similarity index 100%
rename from pigweed.json
rename to scripts/setup/pigweed.json