forked from naver/arcus-java-client
-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (71 loc) · 2.02 KB
/
ci.yml
File metadata and controls
76 lines (71 loc) · 2.02 KB
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
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- develop
jobs:
test:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'temurin'
cache: maven
- name: Install ARCUS Dependencies
run: sudo apt-get install -qq build-essential autoconf automake libtool libcppunit-dev python-setuptools python-dev ant
- name: Cache Maven Dependencies
uses: actions/cache@v3.0.0
with:
path: ~/.m2
key: ${{runner.os}}-maven
- name: Cache ARCUS Directory
id: arcus-cache
uses: actions/cache@v3.0.0
with:
path: ~/arcus
key: ${{runner.os}}-arcus
- name: Install ARCUS
if: steps.arcus-cache.outputs.cache-hit != 'true'
run: |
set -e
# clone
git clone --recursive https://github.com/naver/arcus.git $HOME/arcus
# build dependencies
cd ~/arcus/scripts && ./build.sh
# build server
cd ${HOME}/arcus/server
git checkout develop
git pull
./configure --prefix=${HOME}/arcus --enable-zk-integration --with-libevent=${HOME}/arcus --with-zookeeper=${HOME}/arcus
make
make install
- name: Run ARCUS Server
env:
ARCUS_CONF: |
{
"serviceCode": "test",
"servers": [{
"hostname": "localhost",
"ip": "127.0.0.1",
"config": {
"port": "11212"
}
}],
"config": {
"threads": "6",
"memlimit": "1000",
"connections": "1000"
}
}
run: |
set -e
rm -rf ~/arcus/zookeeper/data
cd ~/arcus/scripts && echo -e ${ARCUS_CONF} > conf/test.conf && ./arcus.sh quicksetup conf/test.conf
- name: Test ARCUS Client
run: mvn test -DUSE_ZK=false -DARCUS_HOST=127.0.0.1:11212 && mvn test -DUSE_ZK=true