Skip to content

Commit

Permalink
Merge pull request eBay#44 from szmyd/master
Browse files Browse the repository at this point in the history
Disable SPDK testing.
  • Loading branch information
szmyd committed Aug 16, 2023
1 parent 169654a commit 09ca3db
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 40 deletions.
33 changes: 24 additions & 9 deletions .github/workflows/build_dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,18 +131,11 @@ jobs:

- name: Build Cache
run: |
conan install \
-o prerelease=${{ inputs.prerelease }} \
-o malloc_impl=${{ inputs.malloc-impl }} \
-o testing=False \
-s build_type=${{ inputs.build-type }} \
--build missing \
import/sisl
conan install \
-o sisl:prerelease=${{ inputs.prerelease }} \
-o sisl:malloc_impl=${{ inputs.malloc-impl }} \
-o sisl:testing=False \
-o testing=off \
-o iomgr:testing=off \
-s build_type=${{ inputs.build-type }} \
--build missing \
.
Expand All @@ -163,13 +156,35 @@ jobs:
fail_on_cache_miss: true
if: ${{ inputs.testing == 'True' && github.event_name != 'pull_request' && steps.restore-cache.outputs.cache-hit != 'true' }}

- name: Code Coverage Run
run: |
conan install \
-o sisl:prerelease=${{ inputs.prerelease }} \
-o sisl:malloc_impl=${{ inputs.malloc-impl }} \
-o sisl:testing=False \
-o coverage=True \
-o testing=epoll_mode \
-s build_type=${{ inputs.build-type }} \
--build missing \
.
conan build .
if: ${{ inputs.testing == 'True' && inputs.platform == 'ubuntu-22.04' && inputs.build-type == 'Debug' && inputs.malloc-impl == 'libc' && inputs.prerelease == 'False' }}

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
gcov: true
if: ${{ inputs.testing == 'True' && inputs.platform == 'ubuntu-22.04' && inputs.build-type == 'Debug' && inputs.malloc-impl == 'libc' && inputs.prerelease == 'False' }}


- name: Create and test Package
run: |
conan create \
-o sisl:prerelease=${{ inputs.prerelease }} \
-o sisl:malloc_impl=${{ inputs.malloc-impl }} \
-o sisl:testing=False \
-o iomgr:testing=off \
-o iomgr:testing='epoll_mode' \
-s build_type=${{ inputs.build-type }} \
--build missing \
.
Expand Down
16 changes: 6 additions & 10 deletions .github/workflows/merge_conan_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,22 @@ jobs:
strategy:
fail-fast: false
matrix:
platform: ["ubuntu-22.04", "ubuntu-20.04"]
platform: ["ubuntu-22.04"]
build-type: ["Debug", "Release"]
malloc-impl: ["libc", "tcmalloc", "jemalloc"]
prerelease: ["True", "False"]
exclude:
- build-type: Debug
platform: ubuntu-20.04
- malloc-impl: tcmalloc
platform: ubuntu-20.04
- malloc-impl: jemalloc
platform: ubuntu-20.04
- malloc-impl: jemalloc
build-type: Debug
- malloc-impl: tcmalloc
build-type: Debug
- malloc-impl: tcmalloc
prerelease: "True"
- malloc-impl: jemalloc
prerelease: "False"
- malloc-impl: libc
build-type: Release
platform: ubuntu-22.04
- prerelease: "False"
build-type: Debug

uses: ./.github/workflows/build_commit.yml
with:
platform: ${{ matrix.platform }}
Expand Down
14 changes: 4 additions & 10 deletions .github/workflows/pr_conan_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,20 @@ jobs:
strategy:
fail-fast: false
matrix:
platform: ["ubuntu-22.04", "ubuntu-20.04"]
platform: ["ubuntu-22.04"]
build-type: ["Debug", "Release"]
malloc-impl: ["libc", "tcmalloc", "jemalloc"]
prerelease: ["True", "False"]
exclude:
- build-type: Debug
platform: ubuntu-20.04
- malloc-impl: tcmalloc
platform: ubuntu-20.04
- malloc-impl: jemalloc
platform: ubuntu-20.04
- malloc-impl: jemalloc
build-type: Debug
- malloc-impl: tcmalloc
build-type: Debug
- malloc-impl: jemalloc
prerelease: "False"
- malloc-impl: libc
build-type: Release
platform: ubuntu-22.04
- prerelease: "False"
build-type: Debug

uses: ./.github/workflows/build_commit.yml
with:
platform: ${{ matrix.platform }}
Expand Down
2 changes: 1 addition & 1 deletion .jenkins/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ pipeline {
if (("${env.BRANCH_NAME}" =~ /PR-/) && ("$BUILD_TYPE" == "debug")) {
sh "echo Skipping debug build for PR branch"
} else {
sh "conan create -u ${BUILD_MISSING} -o sisl:prerelease=${PRERELEASE} -o ${PROJECT}:sanitize=${SANITIZE} -pr ${BUILD_PROFILE} . ${PROJECT}/${TAG}"
sh "conan create ${BUILD_MISSING} -o sisl:prerelease=${PRERELEASE} -o ${PROJECT}:sanitize=${SANITIZE} -pr ${BUILD_PROFILE} . ${PROJECT}/${TAG}"
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ if(CCACHE_FOUND)
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
endif ()

if(BUILD_TESTING)
enable_testing()
endif()

add_subdirectory(src/)

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# IOManager
[![Conan Build](https://github.com/eBay/IOManager/actions/workflows/merge_conan_build.yml/badge.svg?branch=master)](https://github.com/eBay/IOManager/actions/workflows/merge_conan_build.yml)
[![CodeCov](https://codecov.io/gh/eBay/IOManager/branch/master/graph/badge.svg)](https://codecov.io/gh/eBay/IOManager)

IOManager tries to bridge the gap in existing async framework to build full async networked database/storage/keyvalue storage. Motivation
and design are explained below.
Expand Down
5 changes: 2 additions & 3 deletions cmake/debug_flags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,10 @@ set (REALLY_NO_OPTIMIZATION_FLAGS "${REALLY_NO_OPTIMIZATION_FLAGS} -fno-web"
set (REALLY_NO_OPTIMIZATION_FLAGS "${REALLY_NO_OPTIMIZATION_FLAGS} -fno-tree-slp-vectorize" )# E&C.
set (REALLY_NO_OPTIMIZATION_FLAGS "${REALLY_NO_OPTIMIZATION_FLAGS} -fthreadsafe-statics" )# Slightly smaller in code that doesn't need to be TS.

if (DEFINED ${BUILD_COVERAGE})
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${REALLY_NO_OPTIMIZATION_FLAGS}")
if (DEFINED BUILD_COVERAGE)
if (${BUILD_COVERAGE})
include (cmake/CodeCoverage.cmake)
APPEND_COVERAGE_COMPILER_FLAGS()
SETUP_TARGET_FOR_COVERAGE_GCOVR_XML(NAME coverage EXECUTABLE ctest DEPENDENCIES )
endif ()
endif ()
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${REALLY_NO_OPTIMIZATION_FLAGS}")
17 changes: 10 additions & 7 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class IOMgrConan(ConanFile):
'grpc_support': True,
'sanitize': False,
'spdk': True,
'testing': 'full',
'testing': 'epoll_mode',
'sisl:prerelease': True,
'fiber_impl': 'boost',
}
Expand Down Expand Up @@ -74,15 +74,17 @@ def build(self):
definitions = {'CMAKE_TEST_TARGET': self.options.testing,
'CMAKE_EXPORT_COMPILE_COMMANDS': 'ON',
'CONAN_CMAKE_SILENT_OUTPUT': 'ON',
'MEMORY_SANITIZER_ON': 'OFF'}
'MEMORY_SANITIZER_ON': 'OFF',
'BUILD_TESTING': 'OFF',
}
if self.options.testing:
definitions['BUILD_TESTING'] = 'ON'

test_target = None
if self.settings.build_type == "Debug":
if self.options.sanitize:
definitions['MEMORY_SANITIZER_ON'] = 'ON'
elif self.options.coverage:
definitions['BUILD_COVERAGE'] = 'ON'
test_target = 'coverage'
if self.options.coverage:
definitions['BUILD_COVERAGE'] = 'ON'

if self.options.fiber_impl == "boost":
definitions['FIBER_IMPL'] = 'boost'
Expand All @@ -91,7 +93,8 @@ def build(self):

cmake.configure(defs=definitions)
cmake.build()
cmake.test(target=test_target, output_on_failure=True)
if self.options.testing:
cmake.test(output_on_failure=True)

def package(self):
copy(self, "LICENSE", self.source_folder, join(self.package_folder, "licenses"), keep_path=False)
Expand Down

0 comments on commit 09ca3db

Please sign in to comment.