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

Add CMake option to allow data files to be found in local directory, allowing developer to keep local copy, and CI system to cache #728

Closed
edwardhartnett opened this issue Dec 11, 2022 · 0 comments · Fixed by #732
Assignees
Labels

Comments

@edwardhartnett
Copy link
Collaborator

We download a bunch of test data from the FTP site.

On the g2/g2c/grib_util projects I have added an option to CMakeLists.txt that allows a local directory to be checked for data before ftp is called. If the file is found in the local directory, then it is copied, otherwise it is fetched from FTP. This allows me to keep a local copy of the test data files. When I work on the code, cmake does not keep downloading the test files.

Also, and even better, the CI system can then cache the data files and not have to fetch them for each test run. This speeds up the CI a lot.

@edwardhartnett edwardhartnett self-assigned this Dec 11, 2022
GeorgeGayno-NOAA pushed a commit that referenced this issue Dec 14, 2022
… found instead of using FTP. (#732)

Add handling for the TEST_FILE_DIR option in CMake. This allows the programmer to 
specify a local directory to check first, before downloading test data files from the FTP site.

Use this capability, and a cache, to cache the data for all CI runs as well. This prevents
the CI system from downloading these test files hundreds of times per day.

Part of #719.
Fixes #728
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant