Skip to content

Commit

Permalink
Update cache key to 20200712 and use GMT 6.1.0 specific dataset names
Browse files Browse the repository at this point in the history
  • Loading branch information
weiji14 committed Jul 12, 2020
1 parent 1f1d6ae commit 12f5b90
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions .github/workflows/ci_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,14 @@ jobs:
steps:
# Checkout current git repository
- name: Checkout
uses: actions/checkout@v2.1.0

# Workaround for versioneer, see https://github.com/warner/python-versioneer/issues/206
- name: Fetch all history for all tags and branches
run: git fetch --prune --unshallow
uses: actions/checkout@v2.3.1
with:
# fecth all history so that versioneer works
fetch-depth: 0

# Setup Miniconda
- name: Setup Miniconda
uses: goanpeca/setup-miniconda@v1.3.1
uses: goanpeca/setup-miniconda@v1.6.0
with:
python-version: ${{ matrix.python-version }}
channels: conda-forge
Expand All @@ -166,26 +165,28 @@ jobs:
path: |
~/.gmt/cache
~/.gmt/server
key: cache2-gmt-${{ github.ref }}-${{ runner.os }}-20200629
restore-keys: cache2-gmt-refs/heads/master-
key: cache2-gmt-${{ runner.os }}-${{ github.ref }}-20200711
restore-keys: cache2-gmt-${{ runner.os }}-refs/heads/master-

# Workaround for the timeouts of 'gmt which' on Linux and Windows
- name: Download remote data using wget (Linux & Windows)
run: |
if [ "$RUNNER_OS" == "Windows" ]; then choco install wget; fi # install wget on Windows
mkdir ~/.gmt ~/.gmt/cache ~/.gmt/server
mkdir -p ~/.gmt ~/.gmt/cache ~/.gmt/server/earth/earth_relief/
wget --no-check-certificate https://oceania.generic-mapping-tools.org/gmt_hash_server.txt -P ~/.gmt/server/
for data in earth_relief_01d.grd earth_relief_30m.grd earth_relief_10m.grd; do
wget --no-check-certificate https://oceania.generic-mapping-tools.org/${data} -P ~/.gmt/server/
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
wget --no-check-certificate https://oceania.generic-mapping-tools.org/server/earth/earth_relief/${data} -P ~/.gmt/server/earth/earth_relief/
done
for data in ridge.txt Table_5_11.txt tut_bathy.nc tut_quakes.ngdc tut_ship.xyz usgs_quakes_22.txt; do
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
wget --no-check-certificate https://oceania.generic-mapping-tools.org/cache/${data} -P ~/.gmt/cache/
done
if: steps.cache2.outputs.cache-hit != 'true' && runner.os != 'macOS'

# Download remote files, if not already cached
- name: Download remote data (macOS)
run: $GMT_INSTALL_DIR/bin/gmt which -Gu @earth_relief_60m @earth_relief_30m @earth_relief_10m @ridge.txt @Table_5_11.txt @tut_bathy.nc @tut_quakes.ngdc @tut_ship.xyz @usgs_quakes_22.txt
run: |
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
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
if: steps.cache2.outputs.cache-hit != 'true' && runner.os == 'macOS'

# Install the package that we want to test
Expand Down

0 comments on commit 12f5b90

Please sign in to comment.