Skip to content
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

CI: Cache GMT remote files for testings #3056

Merged
merged 1 commit into from
Apr 10, 2020
Merged
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
19 changes: 15 additions & 4 deletions ci/azure-pipelines-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,14 @@ steps:
cmake --build .
displayName: Compile GMT

# Cache the ${HOME}/.gmt directory, for docs and testing
- task: Cache@2
inputs:
key: cachedata | 20200409
path: $(HOME)/.gmt
cacheHitVar: CACHE_CACHEDATA_RESTORED
displayName: Cache GMT remote data for testing

- bash: |
set -x -e
cd build
Expand Down Expand Up @@ -83,14 +91,17 @@ steps:
gmt earthtide -T2018-06-18T12:00:00 -Gsolid_tide_up.grd
displayName: Check a few simple commands

# Run the full tests
# Download remote files, if not already cached
- bash: |
set -x -e
# Download cache files from remote server before testing, see see #939.
$(gmt --show-sharedir)/tools/gmt_getremote.sh cache
# Download earth relief files used in testing
gmt which -Gu @earth_relief_01m @earth_relief_02m @earth_relief_04m @earth_relief_05m @earth_relief_10m @earth_relief_15m
# run all jobs, and rerun failed jobs
displayName: Download remote data
condition: ne(variables['CACHE_CACHEDATA_RESTORED'], true)

# Run the full tests, and rerun failed tests
- bash: |
set -x -e
cd build
ctest ${CTEST_ARGS} || ctest ${CTEST_ARGS} --rerun-failed || ctest ${CTEST_ARGS} --rerun-failed
displayName: Full tests
Expand Down
19 changes: 15 additions & 4 deletions ci/azure-pipelines-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@ steps:
cmake --build .
displayName: Compile GMT

# Cache the ${HOME}/.gmt directory, for docs and testing
- task: Cache@2
inputs:
key: cachedata | 20200409
path: $(HOME)/.gmt
cacheHitVar: CACHE_CACHEDATA_RESTORED
displayName: Cache GMT remote data for testing

- bash: |
set -x -e
cd build
Expand Down Expand Up @@ -86,14 +94,17 @@ steps:
gmt earthtide -T2018-06-18T12:00:00 -Gsolid_tide_up.grd
displayName: Check a few simple commands

# Run the full tests
# Download remote files, if not already cached
- bash: |
set -x -e
# Download cache files from remote server before testing, see see #939.
$(gmt --show-sharedir)/tools/gmt_getremote.sh cache
# Download earth relief files used in testing
gmt which -Gu @earth_relief_01m @earth_relief_02m @earth_relief_04m @earth_relief_05m @earth_relief_10m @earth_relief_15m
# run all jobs, and rerun failed jobs
displayName: Download remote data
condition: ne(variables['CACHE_CACHEDATA_RESTORED'], true)

# Run the full tests, and rerun failed tests
- bash: |
set -x -e
cd build
ctest ${CTEST_ARGS} || ctest ${CTEST_ARGS} --rerun-failed
displayName: Full tests
Expand Down
18 changes: 15 additions & 3 deletions ci/azure-pipelines-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,14 @@ steps:
cmake --build .
displayName: Compile GMT

# Cache the ${HOME}/.gmt directory, for docs and testing
- task: Cache@2
inputs:
key: cachedata | 20200409
path: $(HOME)/.gmt
cacheHitVar: CACHE_CACHEDATA_RESTORED
displayName: Cache GMT remote data for testing

- bash: |
set -x -e
cd build
Expand All @@ -127,15 +135,19 @@ steps:
gmt earthtide -T2018-06-18T12:00:00 -Gsolid_tide_up.grd
displayName: Check a few simple commands

# Download remote files, if not already cached
- bash: |
set -x -e
# Download cache files from remote server before testing, see see #939.
$(gmt --show-sharedir)/tools/gmt_getremote.sh cache
# Download earth relief files used in testing
gmt which -Gu @earth_relief_01m @earth_relief_02m @earth_relief_04m @earth_relief_05m @earth_relief_10m @earth_relief_15m
displayName: Download remote data
condition: ne(variables['CACHE_CACHEDATA_RESTORED'], true)

# Run the full tests, and rerun failed tests
- bash: |
set -x -e
# disable MinGW's path conversion, see #1035.
export MSYS_NO_PATHCONV=1
# run all jobs, and rerun failed jobs
cd build
ctest ${CTEST_ARGS} || ctest ${CTEST_ARGS} --rerun-failed || ctest ${CTEST_ARGS} --rerun-failed
displayName: Full tests
Expand Down