Skip to content

Commit a8c9c13

Browse files
authored
Update ToolboxDistribution.yml
1 parent d812274 commit a8c9c13

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

AzureDevOps/ToolboxDistribution.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,28 +12,29 @@ 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-
15+
- task: Cache@2
16+
inputs:
17+
key: "$(imageName)"
18+
restoreKeys: |
19+
"$(imageName)"
20+
path: $(MATLABROOT)
21+
cacheHitVar: MATLAB_CACHE_RESTORED
22+
displayName: Cache MATLAB
23+
24+
# need to check inside extension
25+
# condition: ne(variables.MATLAB_CACHE_RESTORED, 'true')
2426
- task: InstallMATLAB@1
25-
# condition: ne(variables.CACHE_RESTORED, 'true')
2627

2728
- task: RunMATLABCommand@1
2829
inputs:
2930
command: "fid = fopen('matlabroot.txt','w'); fprintf(fid, '%s', matlabroot); fclose(fid);"
31+
# if cache restored not checked, the user will need to provide updated PATH at every step
3032
# env:
3133
# PATH: "$(MATLABROOT)/bin:$(PATH)"
3234

3335
- script: |
3436
MATLABROOT=$(tail -n 1 matlabroot.txt)
3537
echo "##vso[task.setvariable variable=MATLABROOT]$MATLABROOT"
36-
echo $(MATLABROOT)
3738
- script: echo $(MATLABROOT)
3839

3940
# Runs build to create MEX file and then run tests

0 commit comments

Comments
 (0)