Skip to content

Commit

Permalink
Add ci-cleanup dev tool
Browse files Browse the repository at this point in the history
  • Loading branch information
wbond committed Aug 22, 2023
1 parent 054886a commit 2621d8c
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions dev/ci-cleanup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# coding: utf-8
from __future__ import unicode_literals, division, absolute_import, print_function

import os
import shutil

from . import build_root, other_packages


def run():
"""
Cleans up CI dependencies - used for persistent GitHub Actions
Runners since they don't clean themselves up.
"""

print("Removing ci dependencies")
deps_dir = os.path.join(build_root, 'modularcrypto-deps')
if os.path.exists(deps_dir):
shutil.rmtree(deps_dir, ignore_errors=True)

print("Removing modularcrypto packages")
for other_package in other_packages:
pkg_dir = os.path.join(build_root, other_package)
if os.path.exists(pkg_dir):
shutil.rmtree(pkg_dir, ignore_errors=True)
print()

return True

0 comments on commit 2621d8c

Please sign in to comment.