Skip to content

Commit 39950f8

Browse files
authored
CI: Cache gmt_hash_server.txt and gmt_data_server.txt files (#3020)
1 parent 29c2623 commit 39950f8

File tree

7 files changed

+13
-5
lines changed

7 files changed

+13
-5
lines changed

.github/workflows/benchmarks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ jobs:
7777
mkdir -p ~/.gmt
7878
mv .gmt/* ~/.gmt
7979
# Change modification times of the two files, so GMT won't refresh it
80-
touch ~/.gmt/server/gmt_data_server.txt ~/.gmt/server/gmt_hash_server.txt
80+
touch ~/.gmt/gmt_data_server.txt ~/.gmt/gmt_hash_server.txt
8181
ls -lhR ~/.gmt
8282
8383
# Install the package that we want to test

.github/workflows/cache_data.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ jobs:
6666
run: |
6767
python -c "from pygmt.helpers.caching import cache_data; cache_data()"
6868
69+
- name: List downloaded remote files
70+
run: ls -lhR ~/.gmt
71+
6972
# Upload the downloaded files as artifacts to GitHub
7073
- name: Upload artifacts to GitHub
7174
uses: actions/upload-artifact@v4
@@ -74,3 +77,5 @@ jobs:
7477
path: |
7578
~/.gmt/cache
7679
~/.gmt/server
80+
~/.gmt/gmt_data_server.txt
81+
~/.gmt/gmt_hash_server.txt

.github/workflows/ci_docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ jobs:
124124
mkdir -p ~/.gmt
125125
mv .gmt/* ~/.gmt
126126
# Change modification times of the two files, so GMT won't refresh it
127-
touch ~/.gmt/server/gmt_data_server.txt ~/.gmt/server/gmt_hash_server.txt
127+
touch ~/.gmt/gmt_data_server.txt ~/.gmt/gmt_hash_server.txt
128128
ls -lhR ~/.gmt
129129
130130
# Install the package that we want to test

.github/workflows/ci_doctests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ jobs:
8383
mkdir -p ~/.gmt
8484
mv .gmt/* ~/.gmt
8585
# Change modification times of the two files, so GMT won't refresh it
86-
touch ~/.gmt/server/gmt_data_server.txt ~/.gmt/server/gmt_hash_server.txt
86+
touch ~/.gmt/gmt_data_server.txt ~/.gmt/gmt_hash_server.txt
8787
ls -lhR ~/.gmt
8888
8989
# Install the package that we want to test

.github/workflows/ci_tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ jobs:
135135
mkdir -p ~/.gmt
136136
mv .gmt/* ~/.gmt
137137
# Change modification times of the two files, so GMT won't refresh it
138-
touch ~/.gmt/server/gmt_data_server.txt ~/.gmt/server/gmt_hash_server.txt
138+
touch ~/.gmt/gmt_data_server.txt ~/.gmt/gmt_hash_server.txt
139139
ls -lhR ~/.gmt
140140
141141
# Pull baseline image data from dvc remote (DAGsHub)

.github/workflows/ci_tests_dev.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ jobs:
147147
mkdir -p ~/.gmt
148148
mv .gmt/* ~/.gmt
149149
# Change modification times of the two files, so GMT won't refresh it
150-
touch ~/.gmt/server/gmt_data_server.txt ~/.gmt/server/gmt_hash_server.txt
150+
touch ~/.gmt/gmt_data_server.txt ~/.gmt/gmt_hash_server.txt
151151
ls -lhR ~/.gmt
152152
153153
# Install the package that we want to test

.github/workflows/ci_tests_legacy.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ jobs:
9595
mkdir -p ~/.gmt
9696
mv .gmt/* ~/.gmt
9797
# Change modification times of the two files, so GMT won't refresh it
98+
# The two files are in the `~/.gmt/server` directory for GMT<=6.4, and
99+
# in the `~/.gmt` directory for GMT>=6.5.
100+
mv ~/.gmt/gmt_data_server.txt ~/.gmt/gmt_hash_server.txt ~/.gmt/server/
98101
touch ~/.gmt/server/gmt_data_server.txt ~/.gmt/server/gmt_hash_server.txt
99102
ls -lhR ~/.gmt
100103

0 commit comments

Comments
 (0)