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

Update CI: run tests with conda installed dependencies #4

Merged
merged 20 commits into from
Nov 15, 2022

Conversation

benbovy
Copy link
Collaborator

@benbovy benbovy commented Oct 28, 2022

This PR adds a github workflow to build and run the tests on Linux / MacOS / Windows after installing dependencies with conda.

I've been pedantic here and enabled all kinds of warnings :-)
Add definitions that are also in s2geometry CMakeLists.txt.
@codecov-commenter
Copy link

codecov-commenter commented Oct 28, 2022

Codecov Report

Base: 14.36% // Head: 14.36% // No change to project coverage 👍

Coverage data is based on head (22f07b2) compared to base (95f0af7).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##           master       #4   +/-   ##
=======================================
  Coverage   14.36%   14.36%           
=======================================
  Files          14       14           
  Lines        1490     1490           
  Branches       29       29           
=======================================
  Hits          214      214           
  Misses       1270     1270           
  Partials        6        6           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@benbovy
Copy link
Collaborator Author

benbovy commented Oct 28, 2022

Hmm not sure why we still have linking errors on Windows here. Another package that I maintain and that also depends on s2geometry has been built successfully on Windows with the last conda-forge s2 package: conda-forge/pys2index-feedstock#12.

@benbovy
Copy link
Collaborator Author

benbovy commented Oct 31, 2022

Hmm not sure why we still have linking errors on Windows here.

Global data symbols are missing in the conda-forge s2geometry windows shared library (more info: https://cmake.org/cmake/help/latest/prop_tgt/WINDOWS_EXPORT_ALL_SYMBOLS.html). We'll probably need a new s2geometry conda-forge build with one more patch to manually add __declspec(dllexport) to the missing symbols.

@paleolimbot
Copy link
Owner

Sorry I haven't been of more help here! (The R windows package uses msys2/mingw/gcc, so I haven't run into these particular linking issues before).

@benbovy
Copy link
Collaborator Author

benbovy commented Nov 2, 2022

No worries! conda-forge/s2geometry-feedstock#10 will hopefully fix it.

Force build to release to fix error similar to
https://stackoverflow.com/a/27395888 (not sure what's happening).

Use static linking (easier?). On Windows the GTest DLL (bundled build)
is not found.
Switch to static linking (again)

Build everything in Release mode, otherwise there's still this annoying
SEH Exception:

- Add `-config Release` to cmake build command for multi-config
generators (e.g., MSVC)

- Keep `CMAKE_BUILD_TYPE=Release` for single-config generators (e.g.,
make)
@benbovy
Copy link
Collaborator Author

benbovy commented Nov 2, 2022

Windows / MSVC gave me some headache here but hopefully this will be helpful later, e.g., for packaging s2geography on conda-forge.

The conda environment cache might be a bit overkill, I just wanted to try it (following steps from the setup-miniconda action documentation). It'll save some package downloads anyway.

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.

3 participants