Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
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
20 changes: 18 additions & 2 deletions tools/devops/automation/scripts/bash/clean-simulator-runtime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ done

# delete all simulators not used in the last 90 days
echo "Checking if there are any old runtimes to delete:"
xcrun simctl runtime delete --notUsedSinceDays 90 --dry-run | sed 's/^/ /'
xcrun simctl runtime delete --notUsedSinceDays 90 --dry-run | sed 's/^/ /' || true
echo "Deleting..."
xcrun simctl runtime delete --notUsedSinceDays 90| sed 's/^/ /'
xcrun simctl runtime delete --notUsedSinceDays 90 | sed 's/^/ /' || true
echo "Delete completed."

xcrun simctl runtime list -j > simruntime.json
Expand Down Expand Up @@ -50,6 +50,22 @@ do
done
done < simruntime-duplicated-runtimes.txt || true

# delete unusable runtimes
for runtime in $(xcrun simctl runtime list | grep Unusable | sed -e 's/Unusable.*//' -e 's/^.*\([A-Z0-9][A-Z0-9][A-Z0-9][A-Z0-9][A-Z0-9][A-Z0-9][A-Z0-9][A-Z0-9]-[A-Z0-9]*-[A-Z0-9]*-[A-Z0-9]*-[A-Z0-9]*\).*$/\1/'); do
echo "Deleting the runtime $runtime, it's unusable"
xcrun simctl runtime delete "$runtime"
done
# wait for them to actually be deleted
C=0
while xcrun simctl runtime list | grep Deleting; do
sleep 1
# stop looping after 60 seconds
(( C++ ))
if [[ $C -gt 60 ]]; then
break
fi
done

xcrun simctl runtime list -v || true
xcrun simctl runtime match list -v || true

Expand Down
4 changes: 2 additions & 2 deletions tools/devops/automation/templates/tests/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ steps:

# Use the provisionator to install the test dependencies. Those have been generated in the 'Generate Provisionator csx file' step.
- task: xamops.azdevex.provisionator-task.provisionator@2
displayName: 'Provision dependencies'
displayName: 'Provisionator dependencies'
inputs:
provisioning_script: $(System.DefaultWorkingDirectory)/$(BUILD_REPOSITORY_TITLE)/tools/devops/build-provisioning.csx
provisioning_extra_args: '-vvvv'
Expand All @@ -242,7 +242,7 @@ steps:
ARGS+=(--ignore-shellcheck)
ARGS+=(--ignore-yamllint)
$(Build.SourcesDirectory)/$(BUILD_REPOSITORY_TITLE)/system-dependencies.sh "${ARGS[@]}"
displayName: 'Provision dependencies'
displayName: 'Provision system dependencies'
timeoutInMinutes: 250
env:
XCODE_CHANNEL: ${{ parameters.XcodeChannel }}
Expand Down
Loading