@@ -82,39 +82,21 @@ jobs:
82
82
shell : bash -l {0}
83
83
run : conda list
84
84
85
- # Cache the ${HOME}/.gmt directory, for docs and testing
86
- - name : Cache GMT directory
87
- uses : actions/cache@v2
88
- id : cache
85
+ # Download cached remote files (artifacts) from Github
86
+ - name : Download remote data from Github
87
+
89
88
with :
90
- path : |
91
- ~/.gmt/cache
92
- ~/.gmt/server
93
- key : cache-gmt-${{ runner.os }}-${{ github.ref }}-20200711
94
- restore-keys : cache-gmt-${{ runner.os }}-refs/heads/master-
95
-
96
- # Workaround for the timeouts of 'gmt which' on Linux and Windows
97
- - name : Download remote data using wget (Linux & Windows)
98
- shell : bash -l {0}
99
- run : |
100
- if [ "$RUNNER_OS" == "Windows" ]; then choco install wget; fi # install wget on Windows
101
- mkdir -p ~/.gmt ~/.gmt/cache ~/.gmt/server/earth/earth_relief/
102
- wget --no-check-certificate https://oceania.generic-mapping-tools.org/gmt_hash_server.txt -P ~/.gmt/server/
103
- for data in earth_relief_01d_p.grd earth_relief_01d_g.grd earth_relief_30m_p.grd earth_relief_30m_g.grd earth_relief_10m_p.grd earth_relief_10m_g.grd; do
104
- wget --no-check-certificate https://oceania.generic-mapping-tools.org/server/earth/earth_relief/${data} -P ~/.gmt/server/earth/earth_relief/
105
- done
106
- for data in ridge.txt Table_5_11.txt test.dat.nc tut_bathy.nc tut_quakes.ngdc tut_ship.xyz usgs_quakes_22.txt; do
107
- wget --no-check-certificate https://oceania.generic-mapping-tools.org/cache/${data} -P ~/.gmt/cache/
108
- done
109
- if : steps.cache.outputs.cache-hit != 'true' && runner.os != 'macOS'
110
-
111
- # Download remote files, if not already cached
112
- - name : Download remote data (macOS)
89
+ workflow : cache_data.yaml
90
+ name : gmt-cache
91
+ path : .gmt
92
+
93
+ # Move downloaded files to ~/.gmt directory and list them
94
+ - name : Move and list downloaded remote files
113
95
shell : bash -l {0}
114
96
run : |
115
- gmt which -Ga @earth_relief_10m_p @earth_relief_10m_g @earth_relief_30m_p @earth_relief_30m_g @earth_relief_01d_p @earth_relief_01d_g
116
- gmt which -Ga @ridge.txt @Table_5_11.txt @test.dat.nc @tut_bathy.nc @tut_quakes.ngdc @tut_ship.xyz @usgs_quakes_22.txt
117
- if : steps.cache.outputs.cache-hit != 'true' && runner.os == 'macOS'
97
+ mkdir -p ~/.gmt
98
+ mv .gmt/* ~/.gmt
99
+ ls -lh ~/.gmt
118
100
119
101
# Install the package that we want to test
120
102
- name : Install the package
0 commit comments