-
Notifications
You must be signed in to change notification settings - Fork 22
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
Swig warnings, options and test fixes #1247
Conversation
ptheywood
commented
Nov 18, 2024
•
edited
Loading
edited
- Fixes tests and exception messages introduced in Graph visualisation would only work if CUDASimulation was explicitly init() #1243 / ba93b32
- Suppress Swig deprecation notices when runnign via pytest (these are suppressed by regular python invocation by default)
- Add several CMake options / cache variables to allow control of the required/fetched Swig version, to enable easier testing & downgrading on CI.
- Add CMake Warnings if Swig 4.2.0 or 4.2.1 are found
- Update CI to use Swig 4.1.0, rather than the any version available greater than 4.0.2
- This is to avoid Swig 4.2.0/4.2.1, without switching to the less tested 4.3.0
- Fix sign comparison warning in the test suite only issued on windows since include changes from cpplint2
b8d349b
to
55f25ad
Compare
55f25ad
to
722a779
Compare
Force-pushed with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only thing im wary of is the tests you've updated, as the tested code is somewhat brittle. Have they been tested on both Linux/Windows?
Linux only. They were already failing since #1243 so worst case they are still failing on windows (but are fixed on linux) |
Windows non-wheel Draft-Release CI has failed due to a warning in the test suite, which regular windows CI does not build due to time required. However yesterdays push of this branch was fine, and the changes made today should not impact that workflow at all... Looks to be in files which have not been modified recently, so presumably a newly detected warning or internal in xutility? Doesn't reproduce locally with my current MSVC version (14.41 not 14.42)
Windows C++ test suite (CUDA 12.6) all passed (1126) Took a long time though due to jitify CUDA 12.6 perf. |
That line number feels wrong
Feels more like line 72, though only solution feels like some redundant cast of the
|
The (fixed) stanadalone windows tests workflow didn't encounter the warnings... https://github.com/FLAMEGPU/FLAMEGPU2/actions/runs/11931553879 Edit: The commits being checked out in the workflows is differnet, as DraftRelease in this case is triggered on pull_request not push in this case (as that is what is important for PRs which will cause a release to occur), so is post-merge, which may be relevant. I.e. this is caused by a change in includes to fix linting. I'll do the rebase so I can re-trigger the standalone to try and repro |
pytest.ini appears to require being above the outermost test file
- CMake warning if SWIG 4.2.0 is found that it probably won't work - CMake warning if Swig 4.2.1 is found that ==/!= None won't work - add FLAMEGPU_SWIG_MINIMUM CMake cache variable to allow overriding of the minimum swig version (i.e. to force a newer version on CI) - add FLAMEGPU_SWIG_DOWNLOAD CMake cachce variable to allow overriding of the version of swig to download if required swig not found (mostly for CI) - add FLAMEGPU_SWIG_EXACT CMake option which switches from a minimum required Swig to an exact required swig, to allow downgrading (on CI)
…manylinux swig images 4.3.0 has not been tested as much, so falling back to an older version for now, and 4.1.0 errored on CI during install
5d0dc01
to
05aefc2
Compare
Ignore it then 🤷♂️ |
Reproduced the errors in the standalone workflow after a rebase so it includes the cpplint changes. So it should be caused by one of the changes in #1245 I'll try to reproduce it locally when i'm back in Windows with that knowledge, and if so either resolve or just suppress it. I expect it must be caused by an include change, but not sure how to resolve that or narrow down which include is problematic so might just suppress it if I can't find a quick-ish fix. |
That was the line number after the merge with master (i.e. the cpplint fixes) it's actually the line before (and commenting it out prevents the warning):
The inclusion of std::array<int, TEST_LEN> inTransform;
// ..
EXPECT_EQ(uint32_t_out, std::count(inTransform.begin(), inTransform.end(), static_cast<uint32_t>(1))); So it's a valid warning here, as each int element is being compared to a uint32(1), just very weird that it's only triggered when has been included, and the action being triggered by pull_request threw us off by looking at the wrong method which has |
… test_transform_reduce.cu std::count was comparing a uint32_t against int elements in a std::array. Warning only issued by msvc when <algorithm> has been included as part of a lint fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not looked at it detail, but should be fine.