-
Notifications
You must be signed in to change notification settings - Fork 312
/
Copy pathkeydb.yaml
107 lines (95 loc) · 2.6 KB
/
keydb.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
package:
name: keydb
version: 6.3.4
epoch: 1
description: A Multithreaded Fork of Redis
copyright:
- license: BSD-3-Clause
environment:
contents:
packages:
- autoconf
- automake
- bash
- build-base
- busybox
- bzip2-dev
- curl-dev
- jemalloc-dev
- libbz2-1
- libcurl-openssl4
- lz4-dev
- nasm
- openssl-dev
- posix-libc-utils
- snappy-dev
- tcl
- tcl-dev
- util-linux-dev
- zlib-dev
- zstd-dev
pipeline:
- uses: git-checkout
with:
repository: https://github.com/Snapchat/KeyDB
tag: v${{package.version}}
expected-commit: 7e7e5e57d25fe246a8201f0acf5e7363c0bf1e14
recurse-submodules: true
- uses: patch
working-directory: ./deps/rocksdb
with:
patches: ../../cstdint.patch
- runs: |
# From here: https://github.com/Snapchat/KeyDB/blob/main/pkg/docker/Dockerfile#L52C9-L55C92
# disable protected mode as it relates to docker
grep -E '^ *createBoolConfig[(]"protected-mode",.*, *1 *,.*[)],$' ./src/config.cpp; \
sed -ri 's!^( *createBoolConfig[(]"protected-mode",.*, *)1( *,.*[)],)$!\10\2!' ./src/config.cpp; \
grep -E '^ *createBoolConfig[(]"protected-mode",.*, *0 *,.*[)],$' ./src/config.cpp;
- runs: |
make -j$(nproc)
- runs: make install
- runs: |
# The make install doesn't respect PREFIX
mkdir -p ${{targets.destdir}}/usr/bin
mv /usr/local/bin/* ${{targets.destdir}}/usr/bin
- uses: strip
subpackages:
- name: keydb-cli
pipeline:
- runs: |
mkdir -p ${{targets.subpkgdir}}/usr/bin
mv ${{targets.destdir}}/usr/bin/keydb-cli ${{targets.subpkgdir}}/usr/bin
test:
pipeline:
- runs: |
keydb-cli --version
- name: keydb-benchmark
pipeline:
- runs: |
mkdir -p ${{targets.subpkgdir}}/usr/bin
mv ${{targets.destdir}}/usr/bin/keydb-benchmark ${{targets.subpkgdir}}/usr/bin
test:
pipeline:
- runs: |
keydb-benchmark --version
keydb-benchmark --help
update:
enabled: true
github:
identifier: Snapchat/KeyDB
strip-prefix: v
test:
environment:
contents:
packages:
- keydb-cli
pipeline:
- runs: |
keydb-server &
sleep 2 # wait for keydb to start
keydb-cli SET bike:1 "Process 134" || exit 1
keydb-cli GET bike:1 | grep 'Process 134' || exit 1
keydb-cli exists bike:1 | grep 1 || exit 1
keydb-cli exists bike:2 | grep 0 || exit 1
keydb-sentinel --version
keydb-server --version