Skip to content

Conversation

weiji14
Copy link
Owner

@weiji14 weiji14 commented May 19, 2020

Description of proposed changes

Newer attempt of #35.

Fixes #

Reminders

  • Run make format and make check to make sure the code follows the style guide.
  • Add tests for new features or tests that would have caught the bug that you're fixing.
  • Add new public functions/methods/classes to doc/api/index.rst.
  • Write detailed docstrings for all functions/methods.
  • If adding new functionality, add an example to docstrings or tutorials.

@weiji14 weiji14 force-pushed the gh-actions-ci branch 2 times, most recently from 5a9c874 to 5794fe0 Compare May 19, 2020 10:58
@weiji14 weiji14 force-pushed the gh-actions-ci branch 2 times, most recently from 1ef85a1 to 57772da Compare May 21, 2020 06:57
@seisman
Copy link

seisman commented Jun 3, 2020

The GitHub Actions look promising. It seems the macOS agent doesn't correctly cache the ~/.gmt directory (i.e., the cache size is only 22 B). Perhaps you could try to update the cache key to re-cache the directory?

@weiji14
Copy link
Owner Author

weiji14 commented Jun 3, 2020

The GitHub Actions look promising.

Yeah, it's meant to consolidate all our Linux/macOS/Windows unit tests into one file using a matrix build specification (instead of having .travis.yml and .azure-pipelines.yml). Was going to put gmt-master into it somehow too at some point. It's been a lot of trial and error at this point getting it to work but should be getting there!

It seems the macOS agent doesn't correctly cache the ~/.gmt directory (i.e., the cache size is only 22 B). Perhaps you could try to update the cache key to re-cache the directory?

Good spotting, I'll try that. Not sure if it's because the Linux build runs faster than macOS and 'caches' things first.

@weiji14 weiji14 force-pushed the gh-actions-ci branch 2 times, most recently from 0fa0644 to a2083c3 Compare June 3, 2020 20:43
uses: actions/cache@v2
id: cache
with:
path: $(HOME)/.gmt
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GitHub Actions may not support $(HOME). Try ~/.gmt instead. See the pip cache example

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, won't hurt to try.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now macOS has the correct cache (~6MB), but Linux fails to extract the cache tarballs.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. Not sure why the Windows run is saying it can't find the cache.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll try using ${{ github.workspace }}/.gmt instead.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still no luck. I noticed that Linux and Windows agents actually can download some files but timeout for others. For example:

Run gmt which -Gu @earth_relief_10m @earth_relief_60m @ridge.txt @Table_5_11.txt @tut_bathy.nc @tut_quakes.ngdc @tut_ship.xyz
earth_relief_10m: Download file from the GMT data server [data set size is 2.8M].
earth_relief_10m: Earth Relief at 10x10 arc minutes obtained by Gaussian Cartesian filtering (18 km fullwidth) of SRTM15+V2 [Tozer et al., 2019].

gmtwhich [ERROR]: Libcurl Error: Timeout was reached
gmtwhich [ERROR]: You can turn remote file download off by setting GMT_DATA_SERVER_LIMIT = 0.
gmtwhich [ERROR]: File earth_relief_10m.grd not found!
earth_relief_60m: Download file from the GMT data server [data set size is 106K].
earth_relief_60m: Earth Relief at 60x60 arc minutes obtained by Gaussian Cartesian filtering (111 km fullwidth) of SRTM15+V2 [Tozer et al., 2019].

C:/Users/runneradmin/.gmt/server/earth_relief_60m.grd
C:/Users/runneradmin/.gmt/cache/ridge.txt
C:/Users/runneradmin/.gmt/cache/Table_5_11.txt
C:/Users/runneradmin/.gmt/cache/tut_bathy.nc
C:/Users/runneradmin/.gmt/cache/tut_quakes.ngdc
C:/Users/runneradmin/.gmt/cache/tut_ship.xyz

I think a workaround would be running the "gmt which" command multiple times until all files are downloaded.

Try just caching ~/.gmt/cache and ~/.gmt/server.
@ghost
Copy link

ghost commented Jun 7, 2020

DeepCode failed to analyze this pull request

Something went wrong despite trying multiple times, sorry about that.
Please comment this pull request with "Retry DeepCode" to manually retry, or contact us so that a human can look into the issue.


jobs:
test:
name: ${{ matrix.os }} - Python ${{ matrix.python_version }}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another typo:

Suggested change
name: ${{ matrix.os }} - Python ${{ matrix.python_version }}
name: ${{ matrix.os }} - Python ${{ matrix.python-version }}

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see you've been working on it on a branch in upstream pygmt. Should I move this Pull Request there so we can both work on it?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that would be better.

@weiji14
Copy link
Owner Author

weiji14 commented Jun 10, 2020

Closing in favour of upstream PR at GenericMappingTools#475.

@weiji14 weiji14 closed this Jun 10, 2020
@weiji14 weiji14 deleted the gh-actions-ci branch June 10, 2020 04:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants