Skip to content

Commit 6d4c695

Browse files
weiji14seisman
andauthored
Cache test data on Azure Pipelines (#438)
Needed because Windows on Azure Pipelines can't fetch data from https://oceania.generic-mapping-tools.org/. Includes @earth_relief_10m, @earth_relief_60m, @ridge.txt, @Table_5_11.txt , @tut_bathy.nc, @tut_quakes.ngdc, and @tut_ship.xyz. Co-authored-by: Dongdong Tian <[email protected]>
1 parent deaa5e1 commit 6d4c695

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.azure-pipelines.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,22 @@ jobs:
116116
conda list
117117
displayName: List installed packages
118118
119+
# Cache the ${HOME}/.gmt directory, for docs and testing
120+
- task: Cache@2
121+
inputs:
122+
key: cachedata | 20200519
123+
path: $(HOME)/.gmt
124+
cacheHitVar: CACHE_CACHEDATA_RESTORED
125+
displayName: Cache GMT remote data for testing
126+
127+
# Download remote files, if not already cached
128+
- bash: |
129+
set -x -e
130+
source activate testing
131+
gmt which -Gu @earth_relief_10m @earth_relief_60m @ridge.txt @Table_5_11.txt @tut_bathy.nc @tut_quakes.ngdc @tut_ship.xyz
132+
displayName: Download remote data
133+
condition: ne(variables['CACHE_CACHEDATA_RESTORED'], true)
134+
119135
# Install the package
120136
- bash: |
121137
set -x -e
@@ -198,6 +214,22 @@ jobs:
198214
conda list
199215
displayName: List installed packages
200216
217+
# Cache the ${HOME}/.gmt directory, for docs and testing
218+
- task: Cache@2
219+
inputs:
220+
key: cachedata | 20200519
221+
path: $(HOMEPATH)/.gmt
222+
cacheHitVar: CACHE_CACHEDATA_RESTORED
223+
displayName: Cache GMT remote data for testing
224+
225+
# Download remote files, if not already cached
226+
- bash: |
227+
set -x -e
228+
source activate testing
229+
gmt which -Gu @earth_relief_10m @earth_relief_60m @ridge.txt @Table_5_11.txt @tut_bathy.nc @tut_quakes.ngdc @tut_ship.xyz
230+
displayName: Download remote data
231+
condition: ne(variables['CACHE_CACHEDATA_RESTORED'], true)
232+
201233
# Install the package that we want to test
202234
- bash: |
203235
set -x -e

0 commit comments

Comments
 (0)