Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/actions/download_gmt_cache/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Download the cached GMT remote data files
#
# GMT downloads remote data files (e.g. Earth relief grids) on demand. To avoid
# hitting the data servers in every job, the files are cached once by the
# 'cache_data.yaml' workflow and uploaded as the 'gmt-cache' artifact. This action
# downloads that artifact into the ~/.gmt directory.
#
# The job must check out the repository before using this action, and needs the
# 'actions: read' permission to download artifacts from other workflow runs.
name: Download GMT cache
description: Download the cached GMT remote data files into the ~/.gmt directory.

runs:
using: composite
steps:
- name: Download remote data from GitHub
# The job default shell is not inherited by composite actions, so it's set here to
# match the login shell used by the workflows.
shell: bash -l {0}
run: |
# Download cached files to ~/.gmt directory and list them
gh run download --name gmt-cache --dir ~/.gmt/
# Change modification times of the two files, so GMT won't refresh it
touch ~/.gmt/gmt_data_server.txt ~/.gmt/gmt_hash_server.txt
ls -lhR ~/.gmt
env:
GH_TOKEN: ${{ github.token }}
9 changes: 1 addition & 8 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,7 @@ jobs:

# Download cached remote files (artifacts) from GitHub
- name: Download remote data from GitHub
run: |
# Download cached files to ~/.gmt directory and list them
gh run download --name gmt-cache --dir ~/.gmt/
# Change modification times of the two files, so GMT won't refresh it
touch ~/.gmt/gmt_data_server.txt ~/.gmt/gmt_hash_server.txt
ls -lhR ~/.gmt
env:
GH_TOKEN: ${{ github.token }}
uses: ./.github/actions/download_gmt_cache

# Install the package that we want to test
- name: Install the package
Expand Down
9 changes: 1 addition & 8 deletions .github/workflows/ci_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,7 @@ jobs:

# Download cached remote files (artifacts) from GitHub
- name: Download remote data from GitHub
run: |
# Download cached files to ~/.gmt directory and list them
gh run download --name gmt-cache --dir ~/.gmt/
# Change modification times of the two files, so GMT won't refresh it
touch ~/.gmt/gmt_data_server.txt ~/.gmt/gmt_hash_server.txt
ls -lhR ~/.gmt
env:
GH_TOKEN: ${{ github.token }}
uses: ./.github/actions/download_gmt_cache

# Install the package that we want to test
- name: Install the package
Expand Down
9 changes: 1 addition & 8 deletions .github/workflows/ci_doctests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,7 @@ jobs:

# Download cached remote files (artifacts) from GitHub
- name: Download remote data from GitHub
run: |
# Download cached files to ~/.gmt directory and list them
gh run download --name gmt-cache --dir ~/.gmt/
# Change modification times of the two files, so GMT won't refresh it
touch ~/.gmt/gmt_data_server.txt ~/.gmt/gmt_hash_server.txt
ls -lhR ~/.gmt
env:
GH_TOKEN: ${{ github.token }}
uses: ./.github/actions/download_gmt_cache

# Install the package that we want to test
- name: Install the package
Expand Down
9 changes: 1 addition & 8 deletions .github/workflows/ci_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,7 @@ jobs:

# Download cached remote files (artifacts) from GitHub
- name: Download remote data from GitHub
run: |
# Download files to ~/.gmt directory and list them
gh run download --name gmt-cache --dir ~/.gmt/
# Change modification times of the two files, so GMT won't refresh it
touch ~/.gmt/gmt_data_server.txt ~/.gmt/gmt_hash_server.txt
ls -lhR ~/.gmt
env:
GH_TOKEN: ${{ github.token }}
uses: ./.github/actions/download_gmt_cache

# Install the package that we want to test
- name: Install the package
Expand Down
9 changes: 1 addition & 8 deletions .github/workflows/ci_tests_dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,7 @@ jobs:

# Download cached remote files (artifacts) from GitHub
- name: Download remote data from GitHub
run: |
# Download cached files to ~/.gmt directory and list them
gh run download --name gmt-cache --dir ~/.gmt/
# Change modification times of the two files, so GMT won't refresh it
touch ~/.gmt/gmt_data_server.txt ~/.gmt/gmt_hash_server.txt
ls -lhR ~/.gmt
env:
GH_TOKEN: ${{ github.token }}
uses: ./.github/actions/download_gmt_cache

# Install the package that we want to test
- name: Install the package
Expand Down
9 changes: 1 addition & 8 deletions .github/workflows/ci_tests_legacy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,7 @@ jobs:

# Download cached remote files (artifacts) from GitHub
- name: Download remote data from GitHub
run: |
# Download cached files to ~/.gmt directory and list them
gh run download --name gmt-cache --dir ~/.gmt/
# Change modification times of the two files, so GMT won't refresh it.
touch ~/.gmt/gmt_data_server.txt ~/.gmt/gmt_hash_server.txt
ls -lhR ~/.gmt
env:
GH_TOKEN: ${{ github.token }}
uses: ./.github/actions/download_gmt_cache

# Install the package that we want to test
- name: Install the package
Expand Down