Skip to content

Commit c21c8fc

Browse files
committed
Lazily unmount github workspace at end of workflow.
Sometimes when a test times out the workspace is still busy when we try to unmount it, which leaves the runner unusable until it's cleaned up manually. We try to unmount this in the first step, but that usually doesn't work since it fails during setup before it starts our workflow. Move it to the end and make it a lazy unmount so it hopefully works eventually.
1 parent 4bcbac7 commit c21c8fc

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/workflows/selfhosted.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,6 @@ jobs:
101101
- { target: openwrt-mips, config: default, host: remote-openwrt-mips }
102102
- { target: openwrt-mipsel, config: default, host: remote-openwrt-mipsel }
103103
steps:
104-
- name: unmount stale workspace
105-
if: env.SSHFS == 'true'
106-
run: fusermount -u ${GITHUB_WORKSPACE} || true
107-
working-directory: ${{ runner.temp }}
108104
- name: shutdown VM if running
109105
if: env.VM == 'true'
110106
run: vmshutdown
@@ -195,9 +191,13 @@ jobs:
195191
196192
- name: bigendian interop - unmount regress
197193
if: always() && env.SSHFS == 'true' && env.BIGENDIAN == 'true'
198-
run: fusermount -u ${GITHUB_WORKSPACE}/regress || true
194+
run: fusermount -z -u ${GITHUB_WORKSPACE}/regress || true
199195
working-directory: ${{ runner.temp }}
200196

197+
- name: lazily unmount workspace
198+
if: always() && env.SSHFS == 'true'
199+
run: fusermount -z -u ${GITHUB_WORKSPACE} || true
200+
working-directory: ${{ runner.temp }}
201201
- name: shutdown VM
202202
if: always() && env.VM == 'true'
203203
run: vmshutdown

0 commit comments

Comments
 (0)