forked from Qihoo360/pink
-
Notifications
You must be signed in to change notification settings - Fork 2
85 lines (75 loc) · 2.66 KB
/
build_test_push.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
name: Run Redis benchmark on Rondis
on:
# Launch on any push
push:
pull_request:
# Not running on "closed" - that is taken care of by "push" (if merged)
types: [opened, synchronize, reopened]
jobs:
build-and-run-redis-benchmark:
runs-on: ubuntu-latest
env:
RONDB_TARBALL_URI: https://repo.hops.works/master/rondb-22.10.5-linux-glibc2.28-x86_64.tar.gz
RONDB_PATH: /tmp/rondb
IMAGE_NAME: rondis:latest
CONTAINER_NAME: rondis
RONDIS_PORT: 6379
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build Rondis image
run: docker build -t $IMAGE_NAME -f Dockerfile .
- name: Run rondb-docker
env:
RONDB_DOCKER_DIR: /tmp/rondb-docker
run: |
set -x
echo $pwd && ls -la
path_now=$(pwd)
git clone -b release-0.7 https://github.com/logicalclocks/rondb-docker.git $RONDB_DOCKER_DIR
cd $RONDB_DOCKER_DIR && ./build_run_docker.sh -d \
--size small \
--num-mgm-nodes 1 \
--node-groups 1 \
--replication-factor 1 \
--num-mysql-nodes 1 \
--num-rest-api-nodes 0 \
--num-benchmarking-nodes 0
echo $path_now
cd $path_now
echo $pwd && ls -la
- name: Download RonDB
run: |
set -x
echo $pwd && ls -la
wget $RONDB_TARBALL_URI -O /tmp/temp_tarball.tar.gz
(set +e; ls -la /tmp)
mkdir -p $RONDB_PATH
tar xfz /tmp/temp_tarball.tar.gz -C $RONDB_PATH --strip-components=1
(set +e; ls -la /tmp)
(set +e; ls -la $RONDB_PATH)
echo $pwd && ls -la
- name: Create Rondis environment
run: |
docker run -d \
--name=$CONTAINER_NAME \
-v $RONDB_PATH:/tmp/rondb \
-e RONDB_PATH=/tmp/rondb \
-p $RONDIS_PORT:$RONDIS_PORT \
$IMAGE_NAME \
tail -f /dev/null
# TODO: Run SQL against MySQL
- name: Build Pink
run: docker exec -i $CONTAINER_NAME bash -c "cd pink && make"
- name: Connect Docker network
run: |
# Get network name that starts with "rondb"
COMPOSE_NETWORK=$(docker network list | grep rondb | awk '{print $2}')
docker network connect $COMPOSE_NETWORK $CONTAINER_NAME
- name: Run Rondis
run: docker exec -i $CONTAINER_NAME bash -d \
-c "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/tmp/rondb/lib pink/rondis/rondis 6379 mgmd_1:1186 2"
- name: Run Redis benchmark
run: docker exec -i $CONTAINER_NAME bash \
-c "redis-benchmark -t set -c 2"