Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
26b664d
Trinity.C: unify client socket implementations
Nov 2, 2018
2fcbff6
unify incoming psco management. implement async post work
Nov 3, 2018
12a27a5
Trinity.C: Events: epoll: should use semaphore semantics for compute …
Nov 3, 2018
dc62742
Trinity.C: Events: continuation wip
Nov 4, 2018
88cefad
...
Nov 4, 2018
4470b78
...
Nov 4, 2018
7bcfc80
continuation handling wip
Nov 5, 2018
70399b8
Trinity.C: Events: implement client-side async I/O. completing contin…
Nov 5, 2018
0f32bb6
...
Nov 5, 2018
b2d1a09
cmake: prevent dotnet property leakage, and refresh the root props fi…
Nov 7, 2018
d43e236
cmake: generate .NET symbol packages
Nov 7, 2018
4d56da8
Trinity.C: Events: pwait should be acquired when it should..
Nov 7, 2018
17d75d0
cmake: integrate Trinity.Core unit tests and smoke tests
Nov 7, 2018
edfbb14
...
Nov 7, 2018
6b2839e
cmake: add .NET nuget dependencies for SmokeTest projects
Nov 7, 2018
6d40a79
tests: remove RuntimeFrameworkVersion workaround
Nov 8, 2018
2a61f5a
cmake: update xunit Linux args; update dotnet restore args
Nov 8, 2018
ab3f5c3
cmake: dotnet smoke test need proper version
Nov 8, 2018
abe6086
unit tests: upgrade to latest dotnet test
Nov 8, 2018
5aa003c
separate tests and build.
Nov 8, 2018
c3352c4
unit tests: use ctest
Nov 9, 2018
4d456b4
split build and test scripts. test script error code can be muted thr…
Nov 9, 2018
bda7c22
test scripts: report success error code even if there are test errors
Nov 9, 2018
93d7ca7
Trinity.Core: fix storage_6 regression
Nov 9, 2018
5c7c148
Trinity.C: add unit tests
Nov 9, 2018
9f2e317
Trinity.C.Unit: fix build errors
Nov 9, 2018
d31b7c9
cmake: add docs
Nov 10, 2018
71d0f77
Trinity.C/Trinity.Core: add TrinityErrorCode::E_NOTSUPPORTED
Nov 13, 2018
b692550
Trinity.C: unit test fail because of wcout/cout incompatibility
Nov 16, 2018
48db8a3
Trinity.C: add missing APIs in Trinity.h; add ostream adapter to Trin…
Nov 16, 2018
740b981
Trinity.C: expose Storage API
Nov 16, 2018
f48ba42
MTHash: properly align to cacheline. Fix PaddingTest
Nov 17, 2018
13841b0
cmake: prevent dotnet property leakage, and refresh the root props fi…
Nov 7, 2018
95be4d7
cmake: generate .NET symbol packages
Nov 7, 2018
fba5b3a
cmake: integrate Trinity.Core unit tests and smoke tests
Nov 7, 2018
26e4c13
...
Nov 7, 2018
1d86191
cmake: add .NET nuget dependencies for SmokeTest projects
Nov 7, 2018
8586348
tests: remove RuntimeFrameworkVersion workaround
Nov 8, 2018
b6c90f2
cmake: update xunit Linux args; update dotnet restore args
Nov 8, 2018
5ef8d58
cmake: dotnet smoke test need proper version
Nov 8, 2018
72de290
unit tests: upgrade to latest dotnet test
Nov 8, 2018
4d8ad09
separate tests and build.
Nov 8, 2018
dc48cfc
unit tests: use ctest
Nov 9, 2018
4fdb967
split build and test scripts. test script error code can be muted thr…
Nov 9, 2018
f3e3766
test scripts: report success error code even if there are test errors
Nov 9, 2018
4c69e17
Trinity.Core: fix storage_6 regression
Nov 9, 2018
5831659
Trinity.C: add unit tests
Nov 9, 2018
3a0dcc2
Trinity.C.Unit: fix build errors
Nov 9, 2018
5b4c06c
cmake: add docs
Nov 10, 2018
3716b36
Trinity.C/Trinity.Core: add TrinityErrorCode::E_NOTSUPPORTED
Nov 13, 2018
1dcba32
Trinity.C: unit test fail because of wcout/cout incompatibility
Nov 16, 2018
f5c25d5
Trinity.C: add missing APIs in Trinity.h; add ostream adapter to Trin…
Nov 16, 2018
0e9ae0e
Trinity.C: expose Storage API
Nov 16, 2018
8ac71fd
MTHash: properly align to cacheline. Fix PaddingTest
Nov 17, 2018
3babc7c
cleanup rebase
Nov 17, 2018
d66a616
...
Nov 17, 2018
0a4f298
MTHash: workaround GCC #66297
Nov 17, 2018
0bd5305
fix DirectoryTest
Nov 17, 2018
961b1d8
fix PathTest
Nov 17, 2018
38ed5f2
merge with cmake_unit_test
Nov 17, 2018
4175d13
Merge pull request #243 from Microsoft/cmake_unit_test
Nov 17, 2018
c3c10c6
Add Eventloop tests
Nov 17, 2018
341a522
Events: test: gcc does not have std::atomic_int32_t
Nov 17, 2018
3045175
Merge branch 'client_refactor'
Nov 17, 2018
83c82de
fix #240
Nov 17, 2018
6501522
EventsTest: workaround gcc defect
Nov 17, 2018
3a83cba
cmake: add command GEN_DOTNET_PROPS
Nov 19, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,4 @@ ServiceFabricBackup
tests/benchmarks/**/*Artifacts*
**/.vim
CMakeSettings.json
Directory.Build.props
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ FIND_PACKAGE(Dotnet 2.0 REQUIRED)
INCLUDE(PostBuild)
INCLUDE(TrinityVersion)

GEN_DOTNET_PROPS(${CMAKE_CURRENT_LIST_DIR}/Directory.Build.props PACKAGE_VERSION ${TRINITY_VERSION})

PROJECT(GraphEngine VERSION ${TRINITY_VERSION} LANGUAGES CXX)
ENABLE_TESTING()

SET(CMAKE_CXX_STANDARD 14)
SET(CMAKE_CXX_STANDARD_REQUIRED ON)
Expand All @@ -26,6 +29,7 @@ ELSE()
ENDIF()

ADD_SUBDIRECTORY(src/Trinity.C)
ADD_SUBDIRECTORY(src/Trinity.C.UnitTest)
ADD_SUBDIRECTORY(src/Trinity.TSL)
ADD_SUBDIRECTORY(src/Trinity.Core)
ADD_SUBDIRECTORY(src/Modules/LIKQ)
Expand Down
9 changes: 0 additions & 9 deletions Directory.Build.props

This file was deleted.

3 changes: 2 additions & 1 deletion cmake/DotnetImports.props.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<Project>
<PropertyGroup>
<OutputPath>${_DN_OUTPUT_PATH}/</OutputPath>
<XPLAT_LIB_DIR>${CMAKE_BINARY_DIR}/</XPLAT_LIB_DIR>
<XPLAT_LIB_DIR>${_DN_XPLAT_LIB_DIR}/</XPLAT_LIB_DIR>
<DOTNET_PACKAGE_VERSION>${_DN_VERSION}</DOTNET_PACKAGE_VERSION>
${_DN_CUSTOM_BUILDPROPS}
</PropertyGroup>
</Project>
151 changes: 138 additions & 13 deletions cmake/FindDotnet.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
# [PACKAGE output_nuget_packages... ]
# [VERSION nuget_package_version]
# [DEPENDS depend_nuget_packages... ]
# [CUSTOM_BUILDPROPS <CustomProp>value</CustomProp>....]
# [SOURCES additional_file_dependencies... ])
# ```
#
Expand All @@ -43,18 +44,58 @@
# [PLATFORM platform]
# [PACKAGE output_nuget_packages... ]
# [DEPENDS depend_nuget_packages... ]
# [CUSTOM_BUILDPROPS <CustomProp>value</CustomProp>....]
# [SOURCES additional_file_dependencies... ])
# ```
#
# SMOKETEST_DOTNET -- add a dotnet smoke test project to the build. The project will be run during a build,
# and if the program fails to build or run, the build fails. Currently only .NET Core App framework is supported.
# Multiple smoke tests will be run one-by-one to avoid global resource conflicts.
#
# SMOKETEST_DOTNET(<project_file> [RELEASE|DEBUG] [X86|X64|ANYCPU] [NETCOREAPP]
# [CONFIG configuration]
# [PLATFORM platform]
# [PACKAGE output_nuget_packages... ]
# [VERSION nuget_package_version]
# [DEPENDS depend_nuget_packages... ]
# [CUSTOM_BUILDPROPS <CustomProp>value</CustomProp>....]
# [SOURCES additional_file_dependencies... ])
#
# For all the above functions, `RELEASE|DEBUG` overrides `CONFIG`, `X86|X64|ANYCPU` overrides PLATFORM.
# For Unix systems, the target framework defaults to `netstandard2.0`, unless `NETCOREAPP` is specified.
# For Windows, the project is built as-is, allowing multi-targeting.
#
#
# DOTNET_REGISTER_LOCAL_REPOSITORY -- register a local NuGet package repository.
#
# ```
# DOTNET_REGISTER_LOCAL_REPOSITORY(repo_name repo_path)
# ```
#
# TEST_DOTNET -- add a dotnet test project to ctest. The project will be run with `dotnet test`,
# and trx test reports will be generated in the build directory. For Windows, all target frameworks
# are tested against. For other platforms, only .NET Core App is tested against.
# Test failures will not fail the build.
# Tests are only run with `ctest -C <config>`, not with `cmake --build ...`
#
# ```
# TEST_DOTNET(<project_file>
# [ARGUMENTS additional_dotnet_test_args...])
# ```
#
# For all the above functions, `RELEASE|DEBUG` overrides `CONFIG`, `X86|X64|ANYCPU` overrides PLATFORM.
# For Unix systems, the target framework defaults to `netstandard2.0`, unless `NETCOREAPP` is specified.
# For Windows, the project is built as-is, allowing multi-targeting.
# GEN_DOTNET_PROPS -- Generates a Directory.Build.props file. The created file is populated with MSBuild properties:
# - DOTNET_PACKAGE_VERSION: a version string that can be referenced in the actual project file as $(DOTNET_PACKAGE_VERSION).
# The version string value can be set with PACKAGE_VERSION argument, and defaults to '1.0.0'.
# - XPLAT_LIB_DIR: points to the cmake build root directory.
# - OutputPath: Points to the cmake build root directory. Therefore, projects built without cmake will consistently output
# to the cmake build directory.
# - Custom properties can be injected with XML_INJECT argument, which injects an arbitrary string into the project XML file.
#
# ```
# GEN_DOTNET_PROPS(<target_props_file>
# [PACKAGE_VERSION version]
# [XML_INJECT xml_injection])
# ```
#
# Require 3.5 for batch copy multiple files

Expand Down Expand Up @@ -120,7 +161,7 @@ FUNCTION(DOTNET_GET_DEPS _DN_PROJECT arguments)
# oneValueArgs
"CONFIG;PLATFORM;VERSION"
# multiValueArgs
"PACKAGE;DEPENDS;ARGUMENTS;OUTPUT;SOURCES"
"PACKAGE;DEPENDS;ARGUMENTS;OUTPUT;SOURCES;CUSTOM_BUILDPROPS"
# the input arguments
${arguments})

Expand Down Expand Up @@ -170,8 +211,16 @@ FUNCTION(DOTNET_GET_DEPS _DN_PROJECT arguments)
SET(_DN_VERSION "1.0.0")
ENDIF()

# Set the output path to the current binary directory.
# Separated output directories prevent overwriting.
# Later we then copy the outputs to the root binary directory.

GET_FILENAME_COMPONENT(_DN_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/bin ABSOLUTE)

# In a cmake build, the XPLAT libraries are always copied over.
# Set the proper directory for .NET projects.
SET(_DN_XPLAT_LIB_DIR ${CMAKE_BINARY_DIR})

SET(DOTNET_PACKAGES ${_DN_PACKAGE} PARENT_SCOPE)
SET(DOTNET_CONFIG ${_DN_CONFIG} PARENT_SCOPE)
SET(DOTNET_PLATFORM ${_DN_PLATFORM} PARENT_SCOPE)
Expand Down Expand Up @@ -200,16 +249,18 @@ FUNCTION(DOTNET_GET_DEPS _DN_PROJECT arguments)

SET(_DN_IMPORT_PROP ${CMAKE_CURRENT_BINARY_DIR}/${_DN_projname}.imports.props)
CONFIGURE_FILE(${DOTNET_MODULE_DIR}/DotnetImports.props.in ${_DN_IMPORT_PROP})
SET(_DN_IMPORT_ARGS "/p:DirectoryBuildPropsPath=${_DN_IMPORT_PROP}")

SET(DOTNET_BUILD_PROPERTIES ${_DN_PLATFORM_PROP} "/p:DirectoryBuildPropsPath=${_DN_IMPORT_PROP}" "/p:DOTNET_PACKAGE_VERSION=${_DN_VERSION}" PARENT_SCOPE)
SET(DOTNET_IMPORT_PROPERTIES ${_DN_IMPORT_ARGS} PARENT_SCOPE)
SET(DOTNET_BUILD_PROPERTIES ${_DN_PLATFORM_PROP} ${_DN_IMPORT_ARGS} PARENT_SCOPE)
SET(DOTNET_BUILD_OPTIONS ${_DN_BUILD_OPTIONS} PARENT_SCOPE)
SET(DOTNET_PACK_OPTIONS ${_DN_PACK_OPTIONS} PARENT_SCOPE)
SET(DOTNET_PACK_OPTIONS --include-symbols ${_DN_PACK_OPTIONS} PARENT_SCOPE)

ENDFUNCTION()

MACRO(ADD_DOTNET_DEPENDENCY_TARGETS)
MACRO(ADD_DOTNET_DEPENDENCY_TARGETS tgt)
FOREACH(pkg_dep ${DOTNET_DEPENDS})
ADD_DEPENDENCIES(BUILD_${DOTNET_PROJNAME} PKG_${pkg_dep})
ADD_DEPENDENCIES(${tgt}_${DOTNET_PROJNAME} PKG_${pkg_dep})
MESSAGE(" ${DOTNET_PROJNAME} <- ${pkg_dep}")
ENDFOREACH()

Expand All @@ -227,11 +278,11 @@ MACRO(ADD_DOTNET_DEPENDENCY_TARGETS)
COMMAND ${rm_command}
DEPENDS ${DOTNET_deps}
)
ADD_DEPENDENCIES(BUILD_${DOTNET_PROJNAME} DOTNET_PURGE_${pkg})
ADD_DEPENDENCIES(${tgt}_${DOTNET_PROJNAME} DOTNET_PURGE_${pkg})
# Add a target for the built package -- this can be referenced in
# another project.
ADD_CUSTOM_TARGET(PKG_${pkg})
ADD_DEPENDENCIES(PKG_${pkg} BUILD_${DOTNET_PROJNAME})
ADD_DEPENDENCIES(PKG_${pkg} ${tgt}_${DOTNET_PROJNAME})
MESSAGE("==== ${DOTNET_PROJNAME} -> ${pkg}")
ENDFOREACH()
ENDMACRO()
Expand All @@ -247,7 +298,7 @@ MACRO(DOTNET_BUILD_COMMANDS)
ELSE()
SET(build_dotnet_cmds
COMMAND ${CMAKE_COMMAND} -E echo "=======> Building .NET project ${DOTNET_PROJNAME} [${DOTNET_CONFIG} ${DOTNET_PLATFORM}]"
COMMAND ${DOTNET_EXE} restore ${DOTNET_PROJPATH}
COMMAND ${DOTNET_EXE} restore ${DOTNET_PROJPATH} ${DOTNET_IMPORT_PROPERTIES}
COMMAND ${DOTNET_EXE} clean ${DOTNET_PROJPATH} ${DOTNET_BUILD_PROPERTIES}
COMMAND ${DOTNET_EXE} build --no-restore ${DOTNET_PROJPATH} -c ${DOTNET_CONFIG} ${DOTNET_BUILD_PROPERTIES} ${DOTNET_BUILD_OPTIONS})
SET(build_dotnet_type "dotnet")
Expand Down Expand Up @@ -286,7 +337,7 @@ FUNCTION(ADD_DOTNET DOTNET_PROJECT)
DOTNET_GET_DEPS(${DOTNET_PROJECT} "${ARGN}")
SET(DOTNET_IS_MSBUILD FALSE)
DOTNET_BUILD_COMMANDS()
ADD_DOTNET_DEPENDENCY_TARGETS()
ADD_DOTNET_DEPENDENCY_TARGETS(BUILD)
ENDFUNCTION()

FUNCTION(ADD_MSBUILD DOTNET_PROJECT)
Expand All @@ -298,7 +349,7 @@ FUNCTION(ADD_MSBUILD DOTNET_PROJECT)
DOTNET_GET_DEPS(${DOTNET_PROJECT} "${ARGN}")
SET(DOTNET_IS_MSBUILD TRUE)
DOTNET_BUILD_COMMANDS()
ADD_DOTNET_DEPENDENCY_TARGETS()
ADD_DOTNET_DEPENDENCY_TARGETS(BUILD)
ENDFUNCTION()

FUNCTION(RUN_DOTNET DOTNET_PROJECT)
Expand All @@ -315,5 +366,79 @@ FUNCTION(RUN_DOTNET DOTNET_PROJECT)
ADD_DEPENDENCIES(RUN_${DOTNET_PROJNAME} BUILD_${DOTNET_PROJNAME})
ENDFUNCTION()

FUNCTION(TEST_DOTNET DOTNET_PROJECT)
DOTNET_GET_DEPS(${DOTNET_PROJECT} "${ARGN}")
MESSAGE("-- Adding dotnet test project ${DOTNET_PROJECT}")
IF(WIN32)
SET(test_framework_args "")
ELSE()
SET(test_framework_args -f netcoreapp2.0)
ENDIF()

ADD_TEST(NAME ${DOTNET_PROJNAME}
COMMAND ${DOTNET_EXE} test ${test_framework_args} --results-directory "${CMAKE_BINARY_DIR}" --logger trx ${DOTNET_RUN_ARGUMENTS}
WORKING_DIRECTORY ${DOTNET_PROJDIR})

ENDFUNCTION()

SET(DOTNET_LAST_SMOKETEST "")

FUNCTION(SMOKETEST_DOTNET DOTNET_PROJECT)
IF(WIN32)
ADD_DOTNET(${DOTNET_PROJECT} "${ARGN}")
# TODO should run on all targeted frameworks
RUN_DOTNET(${DOTNET_PROJECT} "${ARGN}" ARGUMENTS -f netcoreapp2.0)
ELSE()
ADD_DOTNET(${DOTNET_PROJECT} "${ARGN}" NETCOREAPP)
RUN_DOTNET(${DOTNET_PROJECT} "${ARGN}" ARGUMENTS -f netcoreapp2.0)
ENDIF()

DOTNET_GET_DEPS(${DOTNET_PROJECT} "${ARGN}")
ADD_CUSTOM_TARGET(
SMOKETEST_${DOTNET_PROJNAME}
ALL
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${DOTNET_PROJNAME}.runtimestamp)
ADD_DOTNET_DEPENDENCY_TARGETS(SMOKETEST)
IF(DOTNET_LAST_SMOKETEST)
ADD_DEPENDENCIES(SMOKETEST_${DOTNET_PROJNAME} ${DOTNET_LAST_SMOKETEST})
ENDIF()
# Chain the smoke tests together so they are executed sequentially
SET(DOTNET_LAST_SMOKETEST SMOKETEST_${DOTNET_PROJNAME})

ENDFUNCTION()

SET(DOTNET_IMPORTS_TEMPLATE ${CMAKE_CURRENT_LIST_DIR}/DotnetImports.props.in)

FUNCTION(GEN_DOTNET_PROPS target_props_file)
CMAKE_PARSE_ARGUMENTS(
# prefix
_DNP
# options (flags)
""
# oneValueArgs
"PACKAGE_VERSION;XML_INJECT"
# multiValueArgs
""
# the input arguments
${ARGN})

IF(NOT _DNP_PACKAGE_VERSION)
SET(_DNP_PACKAGE_VERSION 1.0.0)
ENDIF()

IF(_DNP_XML_INJECT)
SET(_DN_CUSTOM_BUILDPROPS ${_DNP_XML_INJECT})
ENDIF()

SET(_DN_OUTPUT_PATH ${CMAKE_BINARY_DIR})
SET(_DN_XPLAT_LIB_DIR ${CMAKE_BINARY_DIR})
SET(_DN_VERSION ${_DNP_PACKAGE_VERSION})
CONFIGURE_FILE(${DOTNET_IMPORTS_TEMPLATE} ${target_props_file})
UNSET(_DN_OUTPUT_PATH)
UNSET(_DN_XPLAT_LIB_DIR)
UNSET(_DN_VERSION)
ENDFUNCTION()


MESSAGE("-- Found .NET toolchain: ${DOTNET_EXE} (version ${DOTNET_VERSION})")
SET(DOTNET_FOUND TRUE)
4 changes: 0 additions & 4 deletions cmake/TrinityVersion.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
IF(${TRINITY_VERSION})
RETURN()
ENDIF()

EXECUTE_PROCESS(
COMMAND ${DOTNET_EXE} help # to avoid "FIRST RUN EXPERIENCE" leaking into our version string
OUTPUT_QUIET
Expand Down
17 changes: 0 additions & 17 deletions src/BuildProfile/ProductInfo.h

This file was deleted.

66 changes: 0 additions & 66 deletions src/BuildProfile/Trinity.Core/AssemblyInfo.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<PropertyGroup>
<TargetFrameworks>net461;netcoreapp2.0</TargetFrameworks>
<OutputType>Exe</OutputType>
<RuntimeFrameworkVersion>2.0.0</RuntimeFrameworkVersion>
<RootNamespace>GraphEngine.DataImporter</RootNamespace>
<AssemblyName>GraphEngine.DataImporter</AssemblyName>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

<PropertyGroup>
<TargetFrameworks>netcoreapp2.0;net461</TargetFrameworks>
<RuntimeFrameworkVersion>2.0.0</RuntimeFrameworkVersion>

<NoWarn>MSB4018</NoWarn>
<IsPackable>false</IsPackable>
Expand Down
Loading