Skip to content

FBSW-317 Integrate CodeCov with CICD #19

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

Closed
wants to merge 41 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
7485170
Run centos and debian workflows on push and PR
igchor Nov 2, 2021
7a6dbc2
Introduce FileShmSegment for file-backed shared memory
igchor Oct 20, 2021
cc5643c
Adjust and enable tests for ShmFileSegment
igchor Oct 16, 2021
14d974e
Add support for shm opts serialization
guptask Oct 27, 2021
ba089ef
Initial version of config API extension to support multiple memory tiers
victoria-mcgrath Oct 28, 2021
17eb460
Merge pull request #4 from igchor/workflows_pr
igchor Nov 2, 2021
aa758e8
Merge pull request #3 from igchor/develop2
guptask Nov 2, 2021
ee63ef3
Integrate Memory Tier config API with CacheAllocator.
igchor Oct 30, 2021
6b4f46b
Add MemoryTierCacheConfig::fromShm()
igchor Nov 6, 2021
f401f17
Fix test_shm_manager.cpp test
igchor Nov 9, 2021
35cb682
Merge pull request #2 from igchor/config_api_integration
igchor Nov 16, 2021
becfc35
Merge pull request #6 from igchor/enable_tests
igchor Nov 16, 2021
e101f94
Run tests on CI
igchor Nov 5, 2021
7881456
Run long tests (navy/bench) every day on CI
igchor Nov 16, 2021
a0d4a7c
Moved common segment code for posix and file shm segments into ShmCommon
guptask Nov 7, 2021
a49e9fd
Enabled memory tier config API for cachebench.
victoria-mcgrath Nov 18, 2021
6975593
Merge pull request #7 from guptask/segment_common_migration
igchor Nov 19, 2021
52db035
Merge pull request #10 from igchor/cron_tests
igchor Nov 19, 2021
ee16a0a
Enabled shared memory tier in cachebench.
victoria-mcgrath Nov 23, 2021
9291d51
Converted nvmCacheState_ to std::optional to simplify NVM cache state…
victoria-mcgrath Nov 29, 2021
4c2a412
codecov changes
guptask Dec 16, 2021
5e69ebd
Run CI on prebuild docker image
igchor Dec 15, 2021
c06ec45
Run only centos build on CI
igchor Dec 15, 2021
3e303d3
Merge pull request #20 from igchor/ci_build
igchor Dec 17, 2021
4444c23
Initial multi-tier support implementation
igchor Sep 28, 2021
91562f0
updates from latest develop
guptask Dec 21, 2021
6e722c2
updated the timeout value
guptask Dec 23, 2021
c10403a
Extend CompressedPtr to work with multiple tiers
igchor Dec 11, 2021
5977cb9
Implemented async Item movement between tiers
vinser52 Dec 18, 2021
9a7901e
Adding example for multitiered cache
vinser52 Dec 9, 2021
dc9fa6c
Enable workarounds in tests
igchor Dec 24, 2021
97caba8
Add basic multi-tier test
igchor Dec 30, 2021
1856a24
Set correct size for each memory tier
igchor Dec 30, 2021
a043394
Async eviction implementation
victoria-mcgrath Dec 30, 2021
fab8ea9
Merge branch 'develop' of https://github.com/pmem/CacheLib into codecov
guptask Jan 4, 2022
ccc4f1c
Extend cachbench with value validation
igchor Jan 19, 2022
33162a7
Merge pull request #31 from igchor/validate_value
igchor Jan 20, 2022
48f099a
Merge branch 'develop' of https://github.com/pmem/CacheLib into codecov
guptask Jan 25, 2022
c923bb4
Aadding new configs to hit_ratio/graph_cache_leader_fobj
vinser52 Jan 27, 2022
b06846a
Merge pull request #32 from vinser52/configs
igchor Jan 27, 2022
ef12e6f
Merge branch 'develop' of https://github.com/pmem/CacheLib into codecov
guptask Feb 1, 2022
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
39 changes: 39 additions & 0 deletions .github/workflows/build-cachelib-centos-long.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: build-cachelib-centos-latest
on:
schedule:
- cron: '0 7 * * *'

jobs:
build-cachelib-centos8-latest:
name: "CentOS/latest - Build CacheLib with all dependencies"
runs-on: ubuntu-latest
# Docker container image name
container: "centos:latest"
steps:
- name: "update packages"
run: dnf upgrade -y
- name: "install sudo,git"
run: dnf install -y sudo git cmake gcc
- name: "System Information"
run: |
echo === uname ===
uname -a
echo === /etc/os-release ===
cat /etc/os-release
echo === df -hl ===
df -hl
echo === free -h ===
free -h
echo === top ===
top -b -n1 -1 -Eg || timeout 1 top -b -n1
echo === env ===
env
echo === gcc -v ===
gcc -v
- name: "checkout sources"
uses: actions/checkout@v2
- name: "build CacheLib using build script"
run: ./contrib/build.sh -j -v -T
- name: "run tests"
timeout-minutes: 60
run: cd opt/cachelib/tests && ../../../run_tests.sh long
20 changes: 12 additions & 8 deletions .github/workflows/build-cachelib-centos.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
name: build-cachelib-centos-latest
on:
schedule:
- cron: '30 5 * * 1,4'
push:
pull_request:

jobs:
build-cachelib-centos8-latest:
name: "CentOS/latest - Build CacheLib with all dependencies"
runs-on: ubuntu-latest
# Docker container image name
container: "centos:latest"
container: "ghcr.io/igchor/cachelib-deps:centos8"
steps:
- name: "update packages"
run: dnf upgrade -y
- name: "install sudo,git"
run: dnf install -y sudo git cmake gcc
- name: "System Information"
run: |
echo === uname ===
Expand All @@ -31,5 +28,12 @@ jobs:
gcc -v
- name: "checkout sources"
uses: actions/checkout@v2
- name: "download codecov using the download-codecov script"
run: ./download-codecov.sh
- name: "print workspace"
run: echo $GITHUB_WORKSPACE
- name: "build CacheLib using build script"
run: ./contrib/build.sh -j -v -T
run: mkdir build && cd build && cmake ../cachelib -DBUILD_TESTS=ON -DCMAKE_INSTALL_PREFIX=/opt -DCMAKE_BUILD_TYPE=Debug && make install -j$(nproc)
- name: "run tests"
timeout-minutes: 120
run: cd /opt/tests && $GITHUB_WORKSPACE/run_tests.sh
6 changes: 5 additions & 1 deletion .github/workflows/build-cachelib-debian.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: build-cachelib-debian-10
on:
schedule:
- cron: '30 5 * * 2,6'
- cron: '30 5 * * 0,3'

jobs:
build-cachelib-debian-10:
name: "Debian/Buster - Build CacheLib with all dependencies"
Expand Down Expand Up @@ -37,3 +38,6 @@ jobs:
uses: actions/checkout@v2
- name: "build CacheLib using build script"
run: ./contrib/build.sh -j -v -T
- name: "run tests"
timeout-minutes: 60
run: cd opt/cachelib/tests && ../../../run_tests.sh
3 changes: 3 additions & 0 deletions cachelib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)
set(CACHELIB_HOME ${CMAKE_CURRENT_SOURCE_DIR})
set(CACHELIB_BUILD ${CMAKE_CURRENT_BINARY_DIR})

# Add code coverage
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -coverage")

# Add root dir so qualified includes work.
# E.g. #include "cachelib/allocator/foobar.h"
include_directories(${CACHELIB_HOME}/..)
Expand Down
2 changes: 2 additions & 0 deletions cachelib/allocator/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ if (BUILD_TESTS)
add_test (tests/ChainedHashTest.cpp)
add_test (tests/AllocatorResizeTypeTest.cpp)
add_test (tests/AllocatorHitStatsTypeTest.cpp)
add_test (tests/AllocatorMemoryTiersTest.cpp)
add_test (tests/MemoryTiersTest.cpp)
add_test (tests/MultiAllocatorTest.cpp)
add_test (tests/NvmAdmissionPolicyTest.cpp)
add_test (nvmcache/tests/NvmItemTests.cpp)
Expand Down
6 changes: 6 additions & 0 deletions cachelib/allocator/Cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
namespace facebook {
namespace cachelib {

CacheBase::CacheBase(unsigned numTiers): numTiers_(numTiers) {}

unsigned CacheBase::getNumTiers() const {
return numTiers_;
}

void CacheBase::setRebalanceStrategy(
PoolId pid, std::shared_ptr<RebalanceStrategy> strategy) {
std::unique_lock<std::mutex> l(lock_);
Expand Down
9 changes: 8 additions & 1 deletion cachelib/allocator/Cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ enum class RemoveContext { kEviction, kNormal };
// A base class of cache exposing members and status agnostic of template type.
class CacheBase {
public:
CacheBase() = default;
CacheBase(unsigned numTiers = 1);
virtual ~CacheBase() = default;

// Movable but not copyable
Expand All @@ -65,6 +65,9 @@ class CacheBase {
CacheBase(CacheBase&&) = default;
CacheBase& operator=(CacheBase&&) = default;

// TODO: come up with some reasonable number
static constexpr unsigned kMaxTiers = 8;

// Get a string referring to the cache name for this cache
virtual const std::string getCacheName() const = 0;

Expand Down Expand Up @@ -253,6 +256,10 @@ class CacheBase {
// @return The number of slabs that were actually reclaimed (<= numSlabs)
virtual unsigned int reclaimSlabs(PoolId id, size_t numSlabs) = 0;

unsigned getNumTiers() const;

unsigned numTiers_ = 1;

// Protect 'poolRebalanceStragtegies_' and `poolResizeStrategies_`
// and `poolOptimizeStrategy_`
mutable std::mutex lock_;
Expand Down
Loading