-
Notifications
You must be signed in to change notification settings - Fork 244
54 lines (48 loc) · 1.71 KB
/
cache_data.yaml
File metadata and controls
54 lines (48 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# This workflow gets and uploads the GMT data artifacts used in the PyGMT CI tests
name: Cache data
on:
# Uncomment the 'pull_request' line below to manually re-cache data artifacts
# pull_request:
# Schedule runs on 12 noon every Sunday
schedule:
- cron: '0 12 * * 0'
jobs:
gmt_cache:
name: Cache GMT artifacts
runs-on: macOS-latest
defaults:
run:
shell: bash -l {0}
steps:
# Setup Miniconda
- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v2.0.1
with:
channels: conda-forge
miniconda-version: "latest"
# Install GMT
- name: Install GMT
run: conda install -c conda-forge gmt=6.1.1
# Download remote files
- name: Download remote data
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 \
@earth_relief_05m_p @earth_relief_05m_g
# Download one tile of the 03s srtm data.
# @N35E135.earth_relief_03s_g.nc is for internal use only.
# The naming scheme may change.
# DO NOT USE IT IN SCRIPTS.
gmt which -Ga @N35E135.earth_relief_03s_g.nc
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
# Upload the downloaded files as artifacts to GitHub
- name: Upload artifacts to GitHub
uses: actions/upload-artifact@v2
with:
name: gmt-cache
path: |
~/.gmt/cache
~/.gmt/server