From 3353db71d232ed3e6108950e21a6dba6360e6d57 Mon Sep 17 00:00:00 2001 From: Martin Robinson Date: Tue, 2 Jan 2024 17:11:16 +0100 Subject: [PATCH] Fail gracefully when DMG smoketest fails (#30975) It seems that timing issues (related to MacOS or the GitHub MacOS) runners can sometimes cause `hdiutil detach` to fail. Instead of having this cause the entire build to fail, fail gracefully. This is essentially a non-issue as the CI environment is always cleaned up when using GitHub Actions. Fixes #30757. --- .github/workflows/mac.yml | 2 +- etc/ci/macos_package_smoketest.sh | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index c416a53888c..9aa0dd8fb2c 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -111,7 +111,7 @@ jobs: command: python3 ./mach test-unit --${{ inputs.profile }} - name: Build mach package run: python3 ./mach package --${{ inputs.profile }} - - name: Run smoketest for mach package + - name: Run DMG smoketest uses: nick-fields/retry@v2 with: # See https://github.com/servo/servo/issues/30757 timeout_minutes: 5 diff --git a/etc/ci/macos_package_smoketest.sh b/etc/ci/macos_package_smoketest.sh index 3a7965894f3..8369030a4e3 100755 --- a/etc/ci/macos_package_smoketest.sh +++ b/etc/ci/macos_package_smoketest.sh @@ -24,4 +24,7 @@ grep 'success' /tmp/out # Clean up. popd -hdiutil detach /Volumes/Servo + +hdiutil detach /Volumes/Servo || \ + echo "WARNING: Could not detach /Volumes/Servo. " \ + "Please detach with hdiutil manually."