Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/pr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,10 @@ jobs:
KERNEL_CONFIG_FLAVOR=${{ matrix.flavor }} \
BRANCH=$SAFE_BRANCH \
kernel-gcc

- name: Clean
if: always()
run: |
make -f Makefile.eve clean
docker system prune -af
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@europaul experience shown this is not enough. On EVE we came-up with the following commands for a good and effective clean up: https://github.com/lf-edge/eve/blob/master/.github/workflows/publish.yml#L233

- name: Clean
        if: ${{ always() }}
        run: |
          make clean || :
          docker system prune -f -a || :
          docker rm -f $(docker ps -aq) && docker volume rm -f $(docker volume ls -q) || :
          rm -rf ~/.linuxkit || :

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@rene I tested my approach - it removes all the created artifacts

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

ok, I see you run docker kill $(BUILD_KIT_BUILDER) in the makefile, we should be good...

docker volume prune -af
7 changes: 7 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,10 @@ jobs:
KERNEL_CONFIG_FLAVOR=${{ matrix.flavor }} \
BRANCH=${{ github.ref_name }} \
push-gcc

- name: Clean
if: always()
run: |
make -f Makefile.eve clean
docker system prune -af
docker volume prune -af
4 changes: 3 additions & 1 deletion Makefile.eve
Original file line number Diff line number Diff line change
Expand Up @@ -190,4 +190,6 @@ push-image-%:
$(IMAGE_TAG_NO_FLAVOR)-$*,)
.PHONY: clean
clean:
echo "Cleaning"
$(LK) cache clean
rm -f $(LK)
docker kill $(BUILD_KIT_BUILDER)