Add some cache testing debug output to Github Actions

This commit is contained in:
Micah Lee 2022-10-07 11:20:19 -07:00
parent 0bcb8425ee
commit 4d2508decf
No known key found for this signature in database
GPG Key ID: 403C2657CD994F73

View File

@ -344,33 +344,39 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Restore cache - snapcraft
uses: actions/cache@v3
with:
path: ~/snapcraft-cache
key: snapcraft-cache-1
# - name: Restore cache - snapcraft
# uses: actions/cache@v3
# with:
# path: ~/snapcraft-cache
# key: snapcraft-cache-1
- name: Install dependencies
run: |
sudo lxd init --auto
sudo snap install snapcraft --classic
- name: Move cache from home
run: |
if [[ -d "~/snapcraft-cache" ]]; then
sudo rm -r /var/lib/snapd/cache
sudo mv ~/snapcraft-cache /var/lib/snapd/cache
sudo chown -R root:root /var/lib/snapd/cache
echo "moved cache from home to root"
fi
- name: cache test
run: du -sh --apparent-size /var/lib/snapd
# - name: Move cache from home
# run: |
# if [[ -d "~/snapcraft-cache" ]]; then
# sudo rm -r /var/lib/snapd/cache
# sudo mv ~/snapcraft-cache /var/lib/snapd/cache
# sudo chown -R root:root /var/lib/snapd/cache
# echo "moved cache from home to root"
# fi
- name: Build snap
run: sudo snapcraft --use-lxd
- name: Move cache to home
run: |
sudo mv /var/lib/snapd/cache ~/snapcraft-cache
sudo chown -R $USER:$USER ~/snapcraft-cache
- name: cache test
run: du -sh --apparent-size /var/lib/snapd
# - name: Move cache to home
# run: |
# sudo mv /var/lib/snapd/cache ~/snapcraft-cache
# sudo chown -R $USER:$USER ~/snapcraft-cache
- uses: actions/upload-artifact@v3
with: