-
Notifications
You must be signed in to change notification settings - Fork 228
Cache GMT remote data as artifacts on Github #530
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
3411352
Cache GMT remote data as artifacts on Github
weiji14 ce654f2
Download cached remote data artifacts from Github
weiji14 91c6a89
Include instructions on how to manually refresh the CI data cache
weiji14 c4c0e91
List download remote files in ~/.gmt
weiji14 fc05431
Try downloading artifacts to $HOME instead of ~
weiji14 9e0c690
List files in the current directory
seisman a598279
Still use ~ instead of $HOME
seisman 769f098
Bump action-download-artifact from 2.0.0 to 2.6.3
weiji14 cac2abb
Download to ./.gmt instead of ~/.gmt, and list hidden files
weiji14 a716bcc
Just download to `.gmt` folder and list recursively
weiji14 9d678e5
Move downloaded files from .gmt to ~/.gmt
weiji14 de0c64b
Make a directory under ~/.gmt before moving files into it
weiji14 c51a7fd
Merge branch 'master' into cache-artifact
seisman 0bc910d
Remove Python version argument from setup miniconda
weiji14 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# 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 | ||
|
||
steps: | ||
# Setup Miniconda | ||
- name: Setup Miniconda | ||
uses: goanpeca/setup-miniconda@v1.6.0 | ||
with: | ||
channels: conda-forge | ||
|
||
# Install GMT | ||
- name: Install GMT | ||
shell: bash -l {0} | ||
run: conda install -c conda-forge gmt=6.1.0 | ||
|
||
# Download remote files | ||
- name: Download remote data | ||
shell: bash -l {0} | ||
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 | ||
|
||
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.