Skip to content

Commit cbc03c5

Browse files
authored
Update ToolboxDistribution.yml
1 parent 398ccdd commit cbc03c5

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

AzureDevOps/ToolboxDistribution.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,17 @@ jobs:
1212
pool:
1313
vmImage: $(imageName)
1414
steps:
15+
- task: Cache@2
16+
inputs:
17+
key: "$(imageName)"
18+
restoreKeys: |
19+
"$(imageName)"
20+
path: $(MATLABROOT)
21+
cacheHitVar: CACHE_RESTORED
22+
displayName: Cache MATLAB
23+
1524
- task: InstallMATLAB@1
25+
condition: ne(variables.CACHE_RESTORED, 'true')
1626

1727
- task: RunMATLABCommand@1
1828
inputs:
@@ -38,14 +48,6 @@ jobs:
3848
# env:
3949
# MLM_LICENSE_TOKEN: $(MLM_LICENSE_TOKEN)
4050
- script: echo $(MATLABROOT)
41-
42-
- task: Cache@2
43-
inputs:
44-
key: "$(imageName)"
45-
restoreKeys: |
46-
"$(imageName)"
47-
path: $(MATLABROOT)
48-
displayName: Cache MATLAB
4951

5052
# Runs build to create MEX file and then run tests
5153
- task: RunMATLABBuild@1

0 commit comments

Comments
 (0)