File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5252 versionSpec : ' $(python.version)'
5353 architecture : ' $(python.architecture)'
5454
55+ - task : Cache@2
56+ inputs :
57+ key : ' microbits | "4.0"'
58+ path : $(Build.SourcesDirectory)/klayout-microbits
59+ cacheHitVar : MICROBITS_CACHED
60+ displayName : ' Cache KLayout microbits'
61+
5562 # Add additional tasks to run using each Python version in the matrix above
5663
5764 # PowerShell
6269 # arguments: # Optional
6370 script : | # Required when targetType == Inline
6471 pwd
65- Invoke-WebRequest -Uri "https://www.klayout.org/downloads/klayout-microbits-4.0.zip" -OutFile klayout-microbits-4.0.zip
66- dir
67- Expand-Archive klayout-microbits-4.0.zip -DestinationPath klayout-microbits
72+ if ("$(MICROBITS_CACHED)" -ne "true") {
73+ Write-Host "Cache miss: downloading and extracting KLayout microbits..."
74+ Invoke-WebRequest -Uri "https://www.klayout.org/downloads/klayout-microbits-4.0.zip" -OutFile klayout-microbits-4.0.zip
75+ Expand-Archive klayout-microbits-4.0.zip -DestinationPath klayout-microbits
76+ } else {
77+ Write-Host "Cache hit: restored KLayout microbits from cache."
78+ }
6879 dir klayout-microbits
6980 # errorActionPreference: 'stop' # Optional. Options: stop, continue, silentlyContinue
7081 # failOnStderr: false # Optional
You can’t perform that action at this time.
0 commit comments