Skip to content

Remove orphan processes and source tree after Windows builds

Issue/feature addressed

The Windows runners regularly get filled up with old builds. Sometimes when a build fails / crashes, some tests are left running preventing removal of the old build directory. Builds from many forks accumulate multiple source trees (each ~400 MB), again causing the disks to fill up.

Proposed solution

Update the after-script part of the job to purge any running tests, and their child processes, as well as remove the entire source tree.

Implementation

A PowerShell function is used to find and recursively kill child processes of any running Tester-g processes. The contents of the source tree are deleted (but not the actual nektar directory, since this is the working-directory of the job). The Windows jobs are set to explicitly not have artifacts (this was previously inherited from the template, but caused an error message to be printed at the end of the job output).

Tests

Suggested reviewers

@jhc02

Notes

  • It is assumed only one job will run at a time on a given Windows runner, since the killing script cannot differentiate (as it stands) the job which instantiated the Tester-g processes.

Checklist

  • [ ] Functions and classes, or changes to them, are documented.
  • [ ] User guide/documentation is updated.
  • Changelog is updated.
  • [ ] Suitable tests added for new functionality.
  • Contributed code is correctly formatted. (See the contributing guidelines).
  • [ ] License added to any new files.
  • No extraneous files have been added (e.g. compiler output or test data files).
Edited by Chris Cantwell

Merge request reports