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

GEODE-9549: enable netcore tests in CI #867

Conversation

pdxcodemonkey
Copy link
Contributor

No description provided.

- Adds post-build steps to netcore directory to move output files
from source directory to build directory
- Enable test running job in yml
- Alpine image blows up trying to read SSH key file, because reasons.
- Still no idea what's gonna happen tho
- last tag we can try is debian_component_based
- This simplifies the cmake config, and makes the post-build file copy
  steps more reliable
- Two potential issues: first, not capitalizing subprojects means we
  potentially have two cmake targets called 'netcore'.  This is probably
  bad.  Second, seeing sharing violations and weirdness on various
  platforms, it looks like NuGet restore being run on two projects at
  once.  Try to fix this by making NetCore.Test depend on NetCore.
- We're copying the output files to the binary dir prior to install, so
  that's where install should pick up the library
- Turns out 'dotnet test' won't run in the output directory, it
  literally requires projects to be built in place.
- Also added a couple of missing CMakeLists.txt files.
- Shouldn't be installing in the test dirs (copy/paste error)
- Give Java project a reasonable name
- Windows scripts and tests work properly now
- Should work on all platforms now
- parallel builds on Linux would hit sharing violations, apparently because projects were being built more than once and simultaneously.
- Eliminates need for start/stop scripts, all done via ctest now
- no longer in use or necessary
- Still getting sharing violations on parallel builds, so need to ensure
  none of these build at the same time.
- file copy for C bindings library had wrong destination dir
- Forgot this one, and it's failing RAT check
- binary path doesn't actually include 'x64', not sure how it got that way on my dev machine
- Still didn't get it right, they sure use a lot of subdirectories
- Tests actually run this way, which is nice
- command will default to Debug config unless specified, which causes problems on release builds
- dotnet command line switches are case-sensitive, it turns out
- Removed for debugging .net core test running
@@ -222,7 +221,8 @@ plan:
- #@ remote_task("net-integration-tests", config.config, ctest_bash_task("build/clicache/integration-test2"), "1h", build.params)
- #@ remote_task("net-legacy-integration-tests", config.config, ctest_bash_task("build/clicache/integration-test", timeout=500, parallel=4), "2h", build.params)
#@ end
#! - #@ remote_task("netcore-tests", config.config, dotnet_bash_task("source/netcore/NetCore.Test"), "10m", build.params)
- #@ remote_task("netcore-integration-test", config.config, ctest_bash_task("build/netcore/NetCore.Test", config.config, parallel=1), "10m", build.params)
Copy link
Contributor

Choose a reason for hiding this comment

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

YES!!! Though I would love to see the directory/project name match the integration test designation.

if(DOTNET AND INCLUDE_DOTNET_CORE)
add_custom_target(netcore ALL COMMAND ${DOTNET} build --configuration $<CONFIG> WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/NetCore DEPENDS apache-geode-c VERBATIM)
add_custom_target(netcore-test ALL COMMAND ${DOTNET} build --configuration $<CONFIG> WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/NetCore.Test DEPENDS netcore VERBATIM)
add_subdirectory(NetCore)
Copy link
Contributor

Choose a reason for hiding this comment

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

You should probably .NET Core check around the add_subdirectory calls. This prevents them from even being processed on when not enabled.

if(DOTNET AND INCLUDE_DOTNET_CORE)
endif()

# limitations under the License.
project(netcore-session-integrationtest LANGUAGES NONE)

if(DOTNET AND INCLUDE_DOTNET_CORE)
Copy link
Contributor

Choose a reason for hiding this comment

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

My moving this out to the parent it avoids the issue of tests being added in this file for targets never built.

@pdxcodemonkey pdxcodemonkey merged commit a202932 into apache:develop Sep 22, 2021
@pdxcodemonkey pdxcodemonkey deleted the feature/GEODE-9549-enable-netcore-tests branch September 22, 2021 14:18
davebarnes97 pushed a commit to davebarnes97/geode-native that referenced this pull request Feb 9, 2022
* GEODE-9549: Enable .net core tests in CI
- Enable test running job in yml
* GEODE-9549: Build NetCore and NetCore.Test projects individually
- This simplifies the cmake config, and makes the post-build file copy
  steps more reliable
* GEODE-9549: Copy C bindings lib to binary dir for tests
- Give Java project a reasonable name
* GEODE-9549: Use ctest to run netcore tests
- Eliminates need for start/stop scripts, all done via ctest now
* GEODE-9549: Make .net core project build in sequence
- Still getting sharing violations on parallel builds, so need to ensure
  none of these build at the same time.

Co-authored-by: Jacob Barrett <[email protected]>
davebarnes97 pushed a commit to davebarnes97/geode-native that referenced this pull request Feb 9, 2022
* GEODE-9549: Enable .net core tests in CI
- Enable test running job in yml
* GEODE-9549: Build NetCore and NetCore.Test projects individually
- This simplifies the cmake config, and makes the post-build file copy
  steps more reliable
* GEODE-9549: Copy C bindings lib to binary dir for tests
- Give Java project a reasonable name
* GEODE-9549: Use ctest to run netcore tests
- Eliminates need for start/stop scripts, all done via ctest now
* GEODE-9549: Make .net core project build in sequence
- Still getting sharing violations on parallel builds, so need to ensure
  none of these build at the same time.

Co-authored-by: Jacob Barrett <[email protected]>
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