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

CMake #421

Open
wants to merge 10,000 commits into
base: main_pre_flash
Choose a base branch
from
Open

CMake #421

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
10000 commits
Select commit Hold shift + click to select a range
fbc9c9f
øMerge branch 'keydbpro' into merge_os_apr_13
JohnSully Apr 21, 2022
deef34b
setup Machamp ci
zliang-sc Apr 22, 2022
fa8815d
fix typo
zliang-sc Apr 22, 2022
4d30019
make build_test.sh executable
zliang-sc Apr 22, 2022
8a7ace0
PSYNC production fixes
JohnSully Apr 22, 2022
50490de
fix the Machamp build
zliang-sc Apr 22, 2022
ea48d97
break into tests into steps
zliang-sc Apr 23, 2022
0801e2c
make build script executable
zliang-sc Apr 23, 2022
58469d4
add multi arch for machamp ci
zliang-sc Apr 23, 2022
fb9335b
specify bash on the top of sh file
zliang-sc Apr 23, 2022
bfbea1d
remove multi arch for now it is not working
zliang-sc Apr 23, 2022
a64a441
-j instead of -j2 to build with the max number of cores instead of ju…
zliang-sc Apr 23, 2022
cd715f6
Added multimaster test
Apr 25, 2022
7876859
support multi arch build and tests
zliang-sc Apr 25, 2022
8ae40c8
try remove multi arch for debugging
zliang-sc Apr 25, 2022
27130a0
debug with old img
zliang-sc Apr 25, 2022
1d8ca84
revert back changes
zliang-sc Apr 25, 2022
ebc293d
update builder image
zliang-sc Apr 26, 2022
96f7d48
Update ci.yml
JohnSully Jan 31, 2022
a352731
fork lock for all threads, use fastlock for readwritelock
MalavanEQAlpha Jan 14, 2022
f35baf8
hide forklock object in ae
msotheeswaran-sc Jan 18, 2022
fa0a602
only need to include readwritelock in ae
msotheeswaran-sc Jan 18, 2022
6d1cd00
time thread lock uses fastlock instead of std::mutex
msotheeswaran-sc Jan 26, 2022
5e2d3fa
set thread as offline when waiting for time thread lock
msotheeswaran-sc Jan 27, 2022
b5a7e4b
update README resource links
Mar 6, 2022
57ccb88
Fix MALLOC=memkind build issues
JohnSully Mar 7, 2022
b90b753
Fix module test break
JohnSully Mar 8, 2022
2928806
Eliminate firewall dialogs on mac for regular and cluster tests. The…
JohnSully Mar 8, 2022
203e4e2
remove unused var in networking.cpp
msotheeswaran-sc Apr 1, 2022
8f3f127
check ziplist len to avoid crash on empty ziplist convert
msotheeswaran-sc Apr 5, 2022
d63c5ac
remove nullptr subtraction
msotheeswaran-sc Apr 1, 2022
0f187c7
cannot mod a pointer
msotheeswaran-sc Apr 1, 2022
eb46be3
need to include stdint for uintptr_t
msotheeswaran-sc Apr 1, 2022
4af996e
use atomic_load for g_pserver->mstime
msotheeswaran-sc Apr 12, 2022
c529f0e
Integrate readwritelock with Pro Code
Apr 14, 2022
6a89ac3
Defensive asserts for RWLock
Apr 14, 2022
0ed0745
Save and restore master info in rdb to allow active replica partial s…
christianEQ Jan 13, 2022
0906704
placement new instead of memcpy
Apr 14, 2022
738f4d4
Remove asserts, RW lock can go below zero in cases of aeAcquireLock
Apr 14, 2022
4d053b1
Inclusive language
Apr 14, 2022
d7b4f1e
call aeThreadOnline() earlier
Apr 20, 2022
a0208b7
Removed mergeReplicationId
Apr 21, 2022
0a8cbc1
Fix bug in dockerfile script
JohnSully Apr 18, 2022
33a4d78
Make active client balancing a configurable option
JohnSully Apr 18, 2022
68957b2
With TLS throttle accepts if server is under heavy load - do not chan…
JohnSully Apr 18, 2022
3d2a25f
acceptTLS is threadsafe like the non TLS version
JohnSully Apr 21, 2022
af0f3db
Merge branch 'merge_os_apr_13' of https://github.sc-corp.net/Snapchat…
JohnSully Apr 26, 2022
c7108ac
PSYNC production fixes
JohnSully Apr 22, 2022
d78a54a
Merge pull request #64 from Snapchat/setup-machamp-ci
zliang-sc Apr 26, 2022
807c443
Merge branch 'keydbpro' of https://github.sc-corp.net/Snapchat/keydb-…
JohnSully Apr 27, 2022
b011bcb
Ensure we are responsive during storagecache clears
JohnSully Apr 27, 2022
343c47a
Ensure recreated tables use the same settings as ones made at boot
JohnSully Apr 27, 2022
20c34a9
Converted some existing PSYNC tests for multimaster
Apr 28, 2022
1995023
Inclusive language fix
Apr 28, 2022
d0386ca
Cleanup test suite
Apr 28, 2022
5162693
Updated test replica configs so tests make sense
Apr 28, 2022
3724cf9
Merge pull request #60 from Snapchat/merge_os_apr_13
May 2, 2022
66971f7
Merge branch 'keydbpro' of https://github.sc-corp.net/Snapchat/keydb-…
JohnSully May 2, 2022
c12d30f
Merge branch 'psync_multimaster_fixes' of https://github.sc-corp.net/…
JohnSully May 2, 2022
848af67
Merge branch 'keydbpro' into psync_multimaster_fixes
JohnSully May 2, 2022
d521bfc
active-rep test reliability
JohnSully May 3, 2022
07ffc4b
Merge pull request #66 from Snapchat/psync_multimaster_fixes
May 3, 2022
fb8a0ad
Quick fix to make psync tests work
May 3, 2022
43886c1
Merge pull request #67 from Snapchat/vsaini_psync_test_additions
May 3, 2022
ec63787
Fix PSYNC test crashes
JohnSully May 4, 2022
a6ab09c
Ensure we force moves not copies when ingesting bulk insert files
JohnSully May 4, 2022
98fd181
Merge pull request #68 from Snapchat/psync_mm_fixes
May 5, 2022
32b98ea
[CMakeLists.txt,cmake,src/CMakeLists.txt] Begin implementing CMake, C…
SamuelMarks May 13, 2022
a265f81
Merge OSS back into pro
JohnSully May 18, 2022
d2d76c2
Fix unmerged files
JohnSully May 18, 2022
15d5c3b
Merge pull request #71 from Snapchat/oss_merge_back
May 24, 2022
84b37ed
Implements the soft shutdown feature to allow clients to cooperativel…
JohnSully May 24, 2022
f60bb34
Ensure clean shutdown with multiple threads
JohnSully May 24, 2022
9024d13
Merge pull request #72 from Snapchat/soft_shutdown
May 25, 2022
d6cf39c
Merge branch 'main' into keydbpro
JohnSully Jun 5, 2022
6afeef0
Update build-and-publish.sh
msotheeswaran-sc Jun 14, 2022
56bf1af
Merge pull request #74 from Snapchat/fix-build-script
Jun 14, 2022
93ea66e
Merge branch 'keydbpro' of https://github.sc-corp.net/Snapchat/keydb-…
JohnSully Jun 29, 2022
e3f186e
Fix certificate leak during connection when tls-allowlists are used
JohnSully Jul 14, 2022
86f9888
Merge pull request #78 from Snapchat/cert_leak_fix
Jul 14, 2022
a8f6132
check tracking per db
msotheeswaran-sc Aug 17, 2022
c5cd0d8
fix warnings
msotheeswaran-sc Aug 17, 2022
23f92fa
Merge pull request #87 from Snapchat/fix_ftracking_bug
msotheeswaran-sc Aug 17, 2022
1810f8a
Fix a race when undoConnectWithMaster changes mi->repl_transfer_s but…
JohnSully Aug 21, 2022
fce669e
Fix a race in processChanges/trackChanges with rdbLoadRio by acquirin…
JohnSully Aug 22, 2022
6bb155a
Merge pull request #93 from Snapchat/fix_race_trackchanges
Aug 22, 2022
1f74115
Merge pull request #92 from Snapchat/fix_sync_cancel_race
Aug 22, 2022
dd65d4a
Fix ASAN use after free
JohnSully Aug 23, 2022
c97dc08
Additional fixes
JohnSully Aug 23, 2022
3e83935
Merge pull request #96 from Snapchat/repl_asan_fixes
Aug 23, 2022
fcb4fdc
Fix integer overflow of the track changes counter
JohnSully Aug 26, 2022
f147c75
Fix P99 latency issue for TLS where we leave work for the next event …
JohnSully Aug 26, 2022
5cfbd72
Merge pull request #99 from Snapchat/atlas_fixes
Aug 30, 2022
b4dcff4
Improve reliability of async parts of the soft shutdown tests
JohnSully Sep 28, 2022
12516b6
Fix incorrect default branch
JohnSully Sep 28, 2022
f3a7f07
Improve machamp reliability by not overloading test machines
JohnSully Sep 28, 2022
ac194e1
disable tls in machamp
JohnSully Sep 29, 2022
5afdab4
Remove threads from test as they aren't reliable in machamp
JohnSully Sep 29, 2022
ef537cc
Improve reliability of fragmentation tests
JohnSully Sep 29, 2022
d75f78d
Merge pull request #111 from Snapchat/test_reliability
Sep 29, 2022
acfd110
Verify that partial syncs do indeed occur
May 4, 2022
4c1f54d
Merge pull request #69 from Snapchat/vsaini_psync_test_augment
Sep 29, 2022
5047e64
Fix O(n) algorithm in INFO command
JohnSully Sep 12, 2022
fb0c8e4
Fix perf issue clearing many empty FLASH databases
JohnSully Nov 24, 2022
f5f1bd7
Merge main with oss release sep29 2022 (#521)
msotheeswaran-sc Dec 14, 2022
2498e0f
fix macos build warnings/ remove 32 bit CI run (#522)
msotheeswaran-sc Dec 15, 2022
f054ef7
include bzip zstd lz4 and snappy libs for alpine docker file (#523)
msotheeswaran-sc Dec 15, 2022
48e5220
TLS test fix from redis (#524)
msotheeswaran-sc Dec 29, 2022
b50f0cc
flash package update (#528)
msotheeswaran-sc Dec 29, 2022
ad0be56
Security fixes from redis: Avoid integer overflows in SETRANGE and SO…
msotheeswaran-sc Jan 17, 2023
c3343dd
fix: small errors in readme (#535)
0xflotus Jan 20, 2023
d7c34a8
Properly handle case where we delete a key that doesn't exist while a…
msotheeswaran-sc Jan 23, 2023
ff79919
Fix optional flash build (#549)
msotheeswaran-sc Jan 23, 2023
7e91711
fix debian 12 test failure
msotheeswaran-sc Jan 19, 2023
694fc59
move memory check before rocksdb to avoid crash in child
msotheeswaran-sc Jan 20, 2023
1113488
fix typo & discrepancy
Jan 25, 2023
fc8e480
remove extra call to handleBlockedClientsTimeout (#557)
msotheeswaran-sc Jan 30, 2023
d4555a6
We need to check for AE_DONT_WAIT after it is set in beforeSleep othe…
JohnSully Oct 18, 2022
687850a
Make semi-ordered-set rehashing configurable to aid in latency tuning
JohnSully Oct 24, 2022
5123e2b
change hasActiveChildProcess to return true only when there is an act…
msotheeswaran-sc Feb 3, 2023
a1978ce
Add support to notify modules of keys loaded by flash on startup (#536)
msotheeswaran-sc Feb 6, 2023
f3a9d2e
technically possible for child_type == CHILD_TYPE_AOF without active …
msotheeswaran-sc Feb 7, 2023
3492615
don't release lock on child as it can hang
msotheeswaran-sc Feb 9, 2023
b5ab1d6
need child specific release that doesn't trigger cv
msotheeswaran-sc Feb 9, 2023
0cba0ed
refactor aeReleaseForkLockChild to capture releaseRead case
msotheeswaran-sc Feb 9, 2023
932fc20
make bgsave fork by default
msotheeswaran-sc Feb 9, 2023
6c26f91
rdb_child_pid isn't the correct value
msotheeswaran-sc Feb 10, 2023
9f4c6e6
using forked bg save causes more harm than good
msotheeswaran-sc Feb 10, 2023
62d281b
Don't do async keys command when client cannot block (#564)
msotheeswaran-sc Feb 13, 2023
0bf6a0c
Merge pull request #560 from Snapchat/aof_fixes
msotheeswaran-sc Feb 13, 2023
7fcbfac
snprintf fix
msotheeswaran-sc Feb 3, 2023
819bcc1
don't sizeof on a pointer
msotheeswaran-sc Feb 3, 2023
045cc52
don't use sizeof on malloc'd pointer
msotheeswaran-sc Feb 15, 2023
5f5eb0e
Merge pull request #570 from Snapchat/fix_snprint_uses
msotheeswaran-sc Feb 15, 2023
db2c3cd
Close child info pipes when RDB save thread is done.
EreMaijala Feb 20, 2023
4ac449a
Merge pull request #575 from EreMaijala/main-issue-537
msotheeswaran-sc Feb 21, 2023
81c6c79
Fix possible crash in prefetchKeysAsync with flash enabled. (#578)
msotheeswaran-sc Feb 23, 2023
a9995d2
Upgrade rocksdb to v7.9.2 (#555)
msotheeswaran-sc Mar 2, 2023
c2077a2
Fix rdb fd leak (#579)
msotheeswaran-sc Mar 2, 2023
b398021
update slotToKey during fast load (#589)
msotheeswaran-sc Mar 8, 2023
c8dd674
Add config for AWS s3 rdb save/load. (#591)
msotheeswaran-sc Mar 8, 2023
715f832
make connectWithMaster error message less confusing (#592)
msotheeswaran-sc Mar 8, 2023
deaaa99
don't do if statement on every key for flash load, use stack object f…
msotheeswaran-sc Mar 13, 2023
06380e5
Add KeyDB global variable to lua api (#606)
msotheeswaran-sc Mar 14, 2023
858db26
add g_expirelock to previously async accesses to expireset (#618)
msotheeswaran-sc Mar 31, 2023
77bc0af
add key eviction number for storage
Apr 3, 2023
f54e3ea
restore fork impl of save to replica sockets (#622)
msotheeswaran-sc Apr 7, 2023
f9ccf90
fix the swapdb issue (#620)
hengku Apr 12, 2023
1735e73
don't count base repl buffer size as overhead (#629)
msotheeswaran-sc Apr 12, 2023
d4c0a97
Integer Overflow in RAND commands can lead to assertion (CVE-2023-251…
oranagra Feb 28, 2023
4c200e0
fix hincrbyfloat not to create a key if the new value is invalid (#11…
chendq8 Aug 28, 2022
525c97d
->ptr to ptrFromObj
msotheeswaran-sc Apr 17, 2023
36d515e
ptrFromObj to szFromObj
msotheeswaran-sc Apr 17, 2023
a8c0f9b
limit number of random elements returned based on config, exit loop e…
msotheeswaran-sc Apr 18, 2023
e4dacb4
add config to disable storage key cache
msotheeswaran-sc Apr 25, 2023
f629a76
Make it compile on FreeBSD (#650)
bra-fsn May 8, 2023
ef8b1bf
add fPreSnapshot to evictionTimeProc
msotheeswaran-sc May 24, 2023
16e8469
Fix aws startup check preventing keydb from starting
May 17, 2023
3336c4f
Flash slot to key (#653)
msotheeswaran-sc May 30, 2023
dc419a4
keys after brpop causes crash due to timeout not being reset (#662)
msotheeswaran-sc May 30, 2023
163f903
remove keyproxy test from machamp
msotheeswaran-sc May 30, 2023
0543058
Throw load error when replicaof config is before active-replica or mu…
msotheeswaran-sc Jun 1, 2023
62f3c37
Throw load error when replicaof config is before active-replica or mu…
msotheeswaran-sc Jun 1, 2023
45b41fb
Merge remote-tracking branch 'origin/main'
msotheeswaran-sc Jun 15, 2023
46660b9
Fix a bug where swapdb result was not recovered after keydb restarts …
karthyuom Jun 21, 2023
8242ba5
Fix propagate in transaction crash (#200)
msotheeswaran-sc Jun 21, 2023
2adf93b
have FreeMemoryLazyFree increment dict refcount so it doesn't try to …
msotheeswaran-sc Jun 21, 2023
9e310b1
Make inserts in flight a shared_ptr to avoid double free (#198)
msotheeswaran-sc Jun 21, 2023
b258322
Fix propagate in transaction crash (#200)
msotheeswaran-sc Jun 21, 2023
dde2c27
have FreeMemoryLazyFree increment dict refcount so it doesn't try to …
msotheeswaran-sc Jun 21, 2023
a77548e
Make inserts in flight a shared_ptr to avoid double free (#198)
msotheeswaran-sc Jun 21, 2023
533c1f7
Fix a bug where swapdb result was not recovered after keydb restarts …
karthyuom Jun 21, 2023
dcd623b
Merge remote-tracking branch 'internal/main'
msotheeswaran-sc Jun 21, 2023
f53e033
Port load shedding and availability-zone (#202)
Jun 27, 2023
c17b9f4
Cherry picking keydb changes from keydbpro to main (#203)
msotheeswaran-sc Jun 27, 2023
6efe344
port changes to 6.3
acope-sc Jun 27, 2023
4e22068
with config
acope-sc Jun 29, 2023
4ab128b
fix conflict
acope-sc Jun 29, 2023
e029c40
revert
acope-sc Jun 29, 2023
147baee
update
acope-sc Jun 29, 2023
4a9a9f9
update
acope-sc Jun 29, 2023
5b98a58
update
acope-sc Jun 29, 2023
88b24eb
update sys free
acope-sc Jun 29, 2023
c894255
fix compiler errors
acope-sc Jun 29, 2023
d346601
llu
acope-sc Jun 30, 2023
f9978c5
fixes
acope-sc Jun 30, 2023
3e67b43
fix
acope-sc Jun 30, 2023
b3492b5
fix
acope-sc Jun 30, 2023
4b72775
meminfo
acope-sc Jun 30, 2023
1d53d8b
fix
acope-sc Jun 30, 2023
3e528f2
clean
acope-sc Jun 30, 2023
5237d29
fix
acope-sc Jun 30, 2023
01b7bc4
fix
acope-sc Jun 30, 2023
e80ff9e
fix
acope-sc Jun 30, 2023
184185a
fix
acope-sc Jun 30, 2023
26285d3
Fix redis-cli symlink (#689)
pimvandenbroek Jul 5, 2023
8e052f7
Enable KeyDB FLASH in Docker images (#687)
der-eismann Jul 5, 2023
6f77a82
Fix typo in module.cpp (#686)
eltociear Jul 5, 2023
e6bc1c5
ok
acope-sc Jul 6, 2023
1c8f1a0
modify
acope-sc Jul 7, 2023
e35ce24
use enum class
acope-sc Jul 7, 2023
c0c9230
fix compile error
acope-sc Jul 7, 2023
970e594
nullptr
acope-sc Jul 7, 2023
72b47ed
Merge pull request #204 from Snapchat/acope-evict-main
acope-sc Jul 10, 2023
501ae47
Fix a bug where a temp rdb file with zero bytes is generated in flash…
karthyuom Jul 13, 2023
0d01b81
Fix a fug where repl-backlog-size config was modifed in keydb.conf wi…
Jul 14, 2023
c017719
Prevent a deadlock when running CLIENT KILL with large numbers of cli…
Jul 14, 2023
d552fd0
Fix OOM issues during full sync when fork bgsave is used (#209)
Jul 14, 2023
bef7786
Prevent crash on free when using repl-disk-buffer-reserve (#207)
Jul 14, 2023
c2c831d
Build break fix
JohnSully Jul 14, 2023
821b39a
Use tini in Alpine-based Docker image (#682)
rofafor Jul 26, 2023
4c3d934
port changes to 6.3
acope-sc Jun 27, 2023
1f2c179
with config
acope-sc Jun 29, 2023
39e3141
revert
acope-sc Jun 29, 2023
c9d63c5
update
acope-sc Jun 29, 2023
22d5ce4
update
acope-sc Jun 29, 2023
1dc5ea4
update
acope-sc Jun 29, 2023
87012bf
update sys free
acope-sc Jun 29, 2023
ac7e6c0
fix compiler errors
acope-sc Jun 29, 2023
65b7faf
llu
acope-sc Jun 30, 2023
60d7426
fixes
acope-sc Jun 30, 2023
e3cdc76
fix
acope-sc Jun 30, 2023
4c0cf9e
fix
acope-sc Jun 30, 2023
271c2cb
meminfo
acope-sc Jun 30, 2023
3792ffb
fix
acope-sc Jun 30, 2023
4da21dd
clean
acope-sc Jun 30, 2023
329bf17
fix
acope-sc Jun 30, 2023
f774a17
fix
acope-sc Jun 30, 2023
e80aba6
fix
acope-sc Jun 30, 2023
b2ecf2c
fix
acope-sc Jun 30, 2023
cf4735b
ok
acope-sc Jul 6, 2023
b5a20a4
modify
acope-sc Jul 7, 2023
872c605
use enum class
acope-sc Jul 7, 2023
0d2f98d
fix compile error
acope-sc Jul 7, 2023
cc8ed88
nullptr
acope-sc Jul 7, 2023
9ab1278
Prevent a deadlock when running CLIENT KILL with large numbers of cli…
Jul 14, 2023
06a49a6
Fix OOM issues during full sync when fork bgsave is used (#209)
Jul 14, 2023
bd6eb37
Prevent crash on free when using repl-disk-buffer-reserve (#207)
Jul 14, 2023
aef0187
Build break fix
JohnSully Jul 14, 2023
9a8a36e
Fix redis-cli symlink (#689)
pimvandenbroek Jul 5, 2023
a4c19e3
Enable KeyDB FLASH in Docker images (#687)
der-eismann Jul 5, 2023
870b0db
Fix typo in module.cpp (#686)
eltociear Jul 5, 2023
bcb5421
Fix a bug where a temp rdb file with zero bytes is generated in flash…
karthyuom Jul 13, 2023
806175d
Fix a fug where repl-backlog-size config was modifed in keydb.conf wi…
Jul 14, 2023
a464a71
Use tini in Alpine-based Docker image (#682)
rofafor Jul 26, 2023
e3a1ea3
with config
acope-sc Jun 29, 2023
ce70e8c
revert
acope-sc Jun 29, 2023
441b74a
Merge remote-tracking branch 'origin/main'
msotheeswaran-sc Jul 26, 2023
a316444
Merge branch 'main' into cmake
SamuelMarks Aug 22, 2023
ea0aeb9
[src/CMakeLists.txt] Add C++ source files to same target as C source …
SamuelMarks Aug 22, 2023
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
41 changes: 23 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,59 +8,64 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: make
run: |
sudo apt-get update
sudo apt-get -y install uuid-dev libcurl4-openssl-dev
make KEYDB_CFLAGS='-Werror' KEYDB_CXXFLAGS='-Werror' BUILD_TLS=yes -j2
sudo apt-get -y remove libzstd || true
sudo apt-get -y install uuid-dev libcurl4-openssl-dev libbz2-dev zlib1g-dev libsnappy-dev liblz4-dev libzstd-dev libgflags-dev
make BUILD_TLS=yes -j2 KEYDB_CFLAGS='-Werror' KEYDB_CXXFLAGS='-Werror'
- name: gen-cert
run: ./utils/gen-test-certs.sh
- name: test-tls
run: |
sudo apt-get -y install tcl tcl-tls
./runtest --clients 2 --verbose --tls
./runtest --clients 1 --verbose --tls --config server-threads 3
- name: cluster-test
run: |
./runtest-cluster --tls
./runtest-cluster --tls --config server-threads 3
- name: sentinel test
run: |
./runtest-sentinel
- name: module tests
run: |
./runtest-moduleapi
- name: rotation test
run: |
./runtest-rotation

build-ubuntu-old:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
with:
submodules: recursive
- name: make -j2
run: |
sudo apt-get update
sudo apt-get -y install uuid-dev libcurl4-openssl-dev
sudo apt-get -y remove libzstd || true
sudo apt-get -y install uuid-dev libcurl4-openssl-dev libbz2-dev zlib1g-dev libsnappy-dev liblz4-dev libzstd-dev libgflags-dev
make -j2

build-macos-latest:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: make
run: make KEYDB_CFLAGS='-Werror' KEYDB_CXXFLAGS='-Werror' -j2

build-libc-malloc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: make
run: |
sudo apt-get update
sudo apt-get -y install uuid-dev libcurl4-openssl-dev
sudo apt-get -y remove libzstd || true
sudo apt-get -y install uuid-dev libcurl4-openssl-dev libbz2-dev zlib1g-dev libsnappy-dev liblz4-dev libzstd-dev libgflags-dev
make KEYDB_CFLAGS='-Werror' KEYDB_CXXFLAGS='-Werror' MALLOC=libc -j2
build-ubuntu-32bit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: make
run: |
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get -y install gcc-multilib g++-multilib libc6-dev-i386 lib32z1 uuid-dev:i386 libcurl4-openssl-dev:i386
make KEYDB_CFLAGS='-Werror' KEYDB_CXXFLAGS='-Werror' 32bit -j2
164 changes: 0 additions & 164 deletions .gitlab-ci.yml

This file was deleted.

98 changes: 98 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
cmake_minimum_required(VERSION 3.15)

project(keydb VERSION 6.3.3 LANGUAGES C CXX)

#===============#
# Compiler args #
#===============#

set(CMAKE_C_VISIBILITY_PRESET hidden)
set(CMAKE_VISIBILITY_INLINES_HIDDEN YES)
set(CMAKE_C_STANDARD 99 CACHE STRING "")

add_library("${PROJECT_NAME}_compiler_flags" INTERFACE)
target_compile_features("${PROJECT_NAME}_compiler_flags" INTERFACE "c_std_${CMAKE_C_STANDARD}")

# add compiler warning flags just when building this project via
# the BUILD_INTERFACE genex
set(gcc_like "$<COMPILE_LANG_AND_ID:C,CXX,ARMClang,AppleClang,Clang,GNU,LCC>")
set(msvc "$<COMPILE_LANG_AND_ID:C,CXX,MSVC>")
target_compile_options(
"${PROJECT_NAME}_compiler_flags"
INTERFACE
"$<${gcc_like}:$<BUILD_INTERFACE:-Wshadow;-Wformat=2;-Wall>>"
"$<${msvc}:$<BUILD_INTERFACE:-W3;-WX;-Zi;-permissive->>"
)

# Set the build directories
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib")

#===========#
# Configure #
#===========#

# configure a header file to pass the version number only
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/config.h.in"
"${PROJECT_NAME}Config.h"
)

#=============#
# Sub-targets #
#=============#

add_subdirectory("src")

include(CTest)
if (BUILD_TESTING)
#add_subdirectory("tests")
endif (BUILD_TESTING)

#=========#
# Install #
#=========#

include(GNUInstallDirs)

install(
FILES "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.h"
TYPE "INCLUDE"
)
include(InstallRequiredSystemLibraries)
set(CPACK_BUNDLE_NAME "${PROJECT_NAME}")
set(CPACK_PACKAGE_VENDOR "SamuelMarks")
set(CPACK_PACKAGE_DESCRIPTION "UTF-8 replacement for C strings, supporting zero-copy use-cases (non-null-terminated).")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}")
if (APPLE)
set(CPACK_BUNDLE_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Info.plist")
set(CPACK_BUNDLE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Info.plist")
set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/cmake/CustomVolumeIcon.icns")
endif (APPLE)
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")
set(CPACK_PACKAGE_VERSION_MAJOR "${${PROJECT_NAME}_VERSION_MAJOR}")
set(CPACK_PACKAGE_VERSION_MINOR "${${PROJECT_NAME}_VERSION_MINOR}")
set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/cmake/README.txt")
set(CPACK_RESOURCE_FILE_WELCOME "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Welcome.txt")
set(CPACK_PACKAGE_CONTACT "https://github.com/Snapchat/KeyDB")

include(CPack)
include(CMakePackageConfigHelpers)

# generate the config file that is includes the exports
configure_package_config_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/Config.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
INSTALL_DESTINATION "${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}"
NO_SET_AND_CHECK_MACRO
NO_CHECK_REQUIRED_COMPONENTS_MACRO
)

# generate the version file for the config file
write_basic_package_version_file(
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
VERSION "${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}"
COMPATIBILITY AnyNewerVersion
)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
DESTINATION "${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}")
Loading