This is an automated email from the ASF dual-hosted git repository.

mreddington pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode-native.git


The following commit(s) were added to refs/heads/develop by this push:
     new 53941d0  GEODE-9356: Adding NetCore and testing to the CI. (#839)
53941d0 is described below

commit 53941d0e3e9091680bd9f24c20c9e53a9e66a1df
Author: Matthew Reddington <[email protected]>
AuthorDate: Mon Aug 16 12:48:39 2021 -0500

    GEODE-9356: Adding NetCore and testing to the CI. (#839)
    
    * GEODE-9365: Building netcore as part of ALL.
    
    * GEODE-9356: Added missing newline.
    
    * GEODE-9356: Finding the dotnet program and added a compile option.
    
    * GEODE-9356: Adding .Net 5 to Windows builds.
    
    * GEODE-9356: Changed .Net SDK to 3.1, installing NetCore dll.
    
    * GEODE-9356: Code review changes.
    
    * GEODE-9356: Installing .Net toolchain to Linux platforms.
    
    * GEODE-9356: Changed a variable name.
    
    * GEODE-9356: Moved .NET install to its own script.
    
    * GEODE-9356: Added netcore unit tests.
    
    * GEODE-9356: Added missing endif.
    
    * GEODE-9356: Shooting in the dark because... YAML...
    
    * GEODE-9356: .Net tasks can fail the pipeline.
    
    * GEODE-9356: Code review changes.
---
 CMakeLists.txt                         |  1 +
 ci/lib/templates.lib.txt               |  6 ++++++
 ci/lib/templates.lib.yml               |  2 ++
 netcore/CMakeLists.txt                 | 27 +++++++++++++++++++++++++++
 packer/build-rhel-7.json               |  3 ++-
 packer/build-rhel-8.json               |  3 ++-
 packer/build-ubuntu-16-04.json         |  3 ++-
 packer/build-ubuntu-18-04.json         |  3 ++-
 packer/build-ubuntu-20-04.json         |  3 ++-
 packer/build-windows-2016-vs-2017.json |  3 ++-
 packer/build-windows-2019-vs-2017.json |  3 ++-
 packer/build-windows-2019-vs-2019.json |  3 ++-
 packer/linux/install-dotnet.sh         | 26 ++++++++++++++++++++++++++
 13 files changed, 78 insertions(+), 8 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8faaaf6..e05f2e4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -381,6 +381,7 @@ if (${BUILD_CLI})
 endif()
 add_subdirectory(tests)
 add_subdirectory(c_bindings)
+add_subdirectory(netcore)
 
 install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/xsds/ DESTINATION xsds)
 install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/defaultSystem/ DESTINATION 
defaultSystem)
diff --git a/ci/lib/templates.lib.txt b/ci/lib/templates.lib.txt
index 4916aa5..98ee197 100644
--- a/ci/lib/templates.lib.txt
+++ b/ci/lib/templates.lib.txt
@@ -78,6 +78,12 @@ set -ueo pipefail
 remote_shell cmake -E chdir (@= path @) ctest -C ${CMAKE_CONFIG} -j(@= 
str(parallel) @) --timeout=(@= str(timeout) @) --output-on-failure --repeat 
until-pass:4 --schedule-random
 (@- end @)
 
+(@ def dotnet_bash_task(path): -@)
+set -ueo pipefail
+(@= remote_functions() @)
+remote_shell chdir (@= path @) && dotnet test
+(@- end @)
+
 (@ def clang_tidy_bash_task(): -@)
 set -ueo pipefail
 export GEODE_HOME=$(pwd)/geode
diff --git a/ci/lib/templates.lib.yml b/ci/lib/templates.lib.yml
index f372806..21653ab 100644
--- a/ci/lib/templates.lib.yml
+++ b/ci/lib/templates.lib.yml
@@ -36,6 +36,7 @@
 #@      "upload_source_bash_task",
 #@      "upload_geode_bash_task",
 #@      "extract_geode_bash_task",
+#@      "dotnet_bash_task",
 #@ )
 
 #@ load("@ytt:overlay", "overlay")
@@ -221,6 +222,7 @@ 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("netcore/Netcore.Test"), "10m", build.params)
     on_failure:
       in_parallel:
         steps:
diff --git a/netcore/CMakeLists.txt b/netcore/CMakeLists.txt
new file mode 100644
index 0000000..544c47b
--- /dev/null
+++ b/netcore/CMakeLists.txt
@@ -0,0 +1,27 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+project(netcore LANGUAGES NONE)
+
+option(INCLUDE_DOTNET_CORE "Build .NET Core client." ON)
+
+find_program(DOTNET dotnet)
+
+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)
+
+  install(FILES 
${CMAKE_CURRENT_SOURCE_DIR}/NetCore/bin/$<CONFIG>/netcoreapp3.1/Apache.Geode.NetCore.dll
 DESTINATION ./lib)
+endif()
diff --git a/packer/build-rhel-7.json b/packer/build-rhel-7.json
index fa85f84..5b13d02 100644
--- a/packer/build-rhel-7.json
+++ b/packer/build-rhel-7.json
@@ -121,7 +121,8 @@
         "rhel/disable-selinux.sh",
         "rhel/7/install-devtoolset.sh",
         "rhel/install-jdk-11.sh",
-        "linux/install-cmake.sh"
+        "linux/install-cmake.sh",
+        "linux/install-dotnet.sh"
       ]
     },
     {
diff --git a/packer/build-rhel-8.json b/packer/build-rhel-8.json
index a443f93..c566446 100644
--- a/packer/build-rhel-8.json
+++ b/packer/build-rhel-8.json
@@ -120,7 +120,8 @@
       "scripts": [
         "rhel/disable-selinux.sh",
         "rhel/install-jdk-11.sh",
-        "linux/install-cmake.sh"
+        "linux/install-cmake.sh",
+        "linux/install-dotnet.sh"
       ]
     },
     {
diff --git a/packer/build-ubuntu-16-04.json b/packer/build-ubuntu-16-04.json
index 3121907..a5a45ca 100644
--- a/packer/build-ubuntu-16-04.json
+++ b/packer/build-ubuntu-16-04.json
@@ -101,7 +101,8 @@
       "scripts": [
         "linux/install-cmake.sh",
         "ubuntu/install-clang-format.sh",
-        "ubuntu/install-jdk-11.sh"
+        "ubuntu/install-jdk-11.sh",
+        "linux/install-dotnet.sh"
       ]
     },
     {
diff --git a/packer/build-ubuntu-18-04.json b/packer/build-ubuntu-18-04.json
index 66acfa6..34ea8b5 100644
--- a/packer/build-ubuntu-18-04.json
+++ b/packer/build-ubuntu-18-04.json
@@ -101,7 +101,8 @@
       "scripts": [
         "linux/install-cmake.sh",
         "ubuntu/install-clang-format.sh",
-        "ubuntu/install-jdk-11.sh"
+        "ubuntu/install-jdk-11.sh",
+        "linux/install-dotnet.sh"
       ]
     },
     {
diff --git a/packer/build-ubuntu-20-04.json b/packer/build-ubuntu-20-04.json
index 47de7f5..add5702 100644
--- a/packer/build-ubuntu-20-04.json
+++ b/packer/build-ubuntu-20-04.json
@@ -101,7 +101,8 @@
       "scripts": [
         "ubuntu/install-clang-format.sh",
         "linux/install-cmake.sh",
-        "ubuntu/install-jdk-11.sh"
+        "ubuntu/install-jdk-11.sh",
+        "linux/install-dotnet.sh"
       ]
     },
     {
diff --git a/packer/build-windows-2016-vs-2017.json 
b/packer/build-windows-2016-vs-2017.json
index 3c049ce..7f1a4bf 100644
--- a/packer/build-windows-2016-vs-2017.json
+++ b/packer/build-windows-2016-vs-2017.json
@@ -92,7 +92,8 @@
         "choco install doxygen.install -confirm",
         "choco install openssl -confirm",
         "choco install strawberryperl -confirm",
-        "choco install nuget.commandline -confirm"
+        "choco install nuget.commandline -confirm",
+        "choco install dotnetcore-sdk -confirm"
       ]
     },
     {
diff --git a/packer/build-windows-2019-vs-2017.json 
b/packer/build-windows-2019-vs-2017.json
index 727f2a5..e5fc4cb 100644
--- a/packer/build-windows-2019-vs-2017.json
+++ b/packer/build-windows-2019-vs-2017.json
@@ -92,7 +92,8 @@
         "choco install doxygen.install -confirm",
         "choco install openssl -confirm",
         "choco install strawberryperl -confirm",
-        "choco install nuget.commandline -confirm"
+        "choco install nuget.commandline -confirm",
+        "choco install dotnetcore-sdk -confirm"
       ]
     },
     {
diff --git a/packer/build-windows-2019-vs-2019.json 
b/packer/build-windows-2019-vs-2019.json
index 9fa7916..72718b6 100644
--- a/packer/build-windows-2019-vs-2019.json
+++ b/packer/build-windows-2019-vs-2019.json
@@ -92,7 +92,8 @@
         "choco install doxygen.install -confirm",
         "choco install openssl -confirm",
         "choco install strawberryperl -confirm",
-        "choco install nuget.commandline -confirm"
+        "choco install nuget.commandline -confirm",
+        "choco install dotnetcore-sdk -confirm"
       ]
     },
     {
diff --git a/packer/linux/install-dotnet.sh b/packer/linux/install-dotnet.sh
new file mode 100644
index 0000000..e028683
--- /dev/null
+++ b/packer/linux/install-dotnet.sh
@@ -0,0 +1,26 @@
+#!/usr/bin/env bash
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+# 
+#      http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+set -x -e -o pipefail
+
+tmp=$(mktemp)
+
+curl -o ${tmp} -L $(curl -s https://dot.net/v1/dotnet-install.sh)
+
+bash ${tmp} --channel 3.1
+
+rm -f ${tmp}

Reply via email to