Skip to content

Commit 405d74a

Browse files
authored
Initial commit (#1)
* repo-sync-2023-03-27T16:29:09+0800 * rename CI
1 parent c35f33d commit 405d74a

File tree

635 files changed

+173687
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

635 files changed

+173687
-1
lines changed

.bazelrc

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
common --experimental_repo_remote_exec
2+
common --experimental_ui_max_stdouterr_bytes=-1
3+
4+
build --incompatible_new_actions_api=false
5+
build --copt=-fdiagnostics-color=always
6+
build --enable_platform_specific_config
7+
8+
build --cxxopt=-std=c++17
9+
build --host_cxxopt=-std=c++17
10+
build --linkopt -fvisibility=hidden
11+
12+
# Binary safety flags
13+
build --copt=-fPIC
14+
build --host_copt=-fstack-protector-strong
15+
build:linux --host_copt=-Wl,-z,noexecstack
16+
build:macos --host_copt=-Wa,--noexecstack
17+
18+
19+
test --keep_going
20+
test --test_output=errors
21+
test --test_timeout=1800
22+
23+
# platform specific config
24+
# Bazel will automatic pick platform config since we have enable_platform_specific_config set
25+
build:macos --features=-supports_dynamic_linker
26+
build:macos --cxxopt -Wno-deprecated-enum-enum-conversion
27+
build:macos --cxxopt -Wno-deprecated-anon-enum-enum-conversion
28+
build:macos --macos_minimum_os=11.0
29+
30+
# static link libstdc++ & libgcc on Linux
31+
build:linux --copt=-fopenmp
32+
build:linux --linkopt=-fopenmp
33+
build:linux --action_env=BAZEL_LINKOPTS=-static-libstdc++:-static-libgcc
34+
build:linux --action_env=BAZEL_LINKLIBS=-l%:libstdc++.a:-l%:libgcc.a
35+
36+
build:asan --strip=never
37+
build:asan --copt -fno-sanitize-recover=all
38+
build:asan --copt -fsanitize=address
39+
build:asan --copt -Og
40+
build:asan --copt -g
41+
build:asan --copt -fno-omit-frame-pointer
42+
build:asan --linkopt -fsanitize=address
43+
build:asan --linkopt -static-libasan
44+
45+
build:ubsan --strip=never
46+
build:ubsan --copt -fno-sanitize-recover=all
47+
build:ubsan --copt -fsanitize=undefined
48+
build:ubsan --copt -Og
49+
build:ubsan --copt -g
50+
build:ubsan --copt -fno-omit-frame-pointer
51+
build:ubsan --linkopt -fsanitize=undefined
52+
build:ubsan --linkopt -static-libubsan
53+
54+
build:macos-asan --features=asan
55+
build:macos-ubsan --features=ubsan
56+
57+
test:asan --strip=never
58+
test:asan --copt -fno-sanitize-recover=all
59+
test:asan --copt -fsanitize=address
60+
test:asan --copt -O0
61+
test:asan --copt -g
62+
test:asan --copt -fno-omit-frame-pointer
63+
test:asan --linkopt -fsanitize=address
64+
test:asan --linkopt -static-libasan
65+
66+
test:ubsan --strip=never
67+
test:ubsan --copt -fno-sanitize-recover=all
68+
test:ubsan --copt -fsanitize=undefined
69+
test:ubsan --copt -O0
70+
test:ubsan --copt -g
71+
test:ubsan --copt -fno-omit-frame-pointer
72+
test:ubsan --linkopt -fsanitize=undefined
73+
test:ubsan --linkopt -static-libubsan

.bazelversion

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
5.4.0

.ci/docker-compose/.env

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
SCDB_PORT=8080
2+
MYSQL_PORT=13306
3+
SCQL_IMAGE_TAG=latest

.ci/docker-compose/README.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Startup
2+
3+
```bash
4+
# You could specify project name via flag `-p project_name` to
5+
# avoid container name conflict in multi-user environments.
6+
docker compose up -d
7+
```
8+
9+
10+
# Notes
11+
12+
1. You could customize scdbserver and mysql container published port env `SCDB_PORT` and `MYSQL_PORT` in file `.env`, default port is `8080`.
13+
14+
2. You could customize scql image tag via env `SCQL_IMAGE_TAG` in file `.env`.
15+
16+

.ci/docker-compose/docker-compose.yml

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
version: '3.8'
2+
services:
3+
scdb:
4+
image: scql:${SCQL_IMAGE_TAG:-latest}
5+
command:
6+
- /home/admin/bin/scdbserver
7+
- -config=/home/admin/configs/config.yml
8+
restart: always
9+
ports:
10+
- mode: host
11+
protocol: tcp
12+
published: ${SCDB_PORT:-8080}
13+
target: 8080
14+
volumes:
15+
- ./scdb/conf/:/home/admin/configs/
16+
engine_alice:
17+
command:
18+
- /home/admin/bin/scqlengine
19+
- --flagfile=/home/admin/engine/conf/gflags.conf
20+
image: scql:${SCQL_IMAGE_TAG:-latest}
21+
volumes:
22+
- ./engine/alice/conf/gflags.conf:/home/admin/engine/conf/gflags.conf
23+
engine_bob:
24+
command:
25+
- /home/admin/bin/scqlengine
26+
- --flagfile=/home/admin/engine/conf/gflags.conf
27+
image: scql:${SCQL_IMAGE_TAG:-latest}
28+
volumes:
29+
- ./engine/bob/conf/gflags.conf:/home/admin/engine/conf/gflags.conf
30+
engine_carol:
31+
command:
32+
- /home/admin/bin/scqlengine
33+
- --flagfile=/home/admin/engine/conf/gflags.conf
34+
image: scql:${SCQL_IMAGE_TAG:-latest}
35+
volumes:
36+
- ./engine/carol/conf/gflags.conf:/home/admin/engine/conf/gflags.conf
37+
mysql:
38+
image: mysql:latest
39+
environment:
40+
- MYSQL_ROOT_PASSWORD=testpass
41+
- TZ=Asia/Shanghai
42+
healthcheck:
43+
retries: 10
44+
test:
45+
- CMD
46+
- mysqladmin
47+
- ping
48+
- -h
49+
- mysql
50+
timeout: 20s
51+
expose:
52+
- "3306"
53+
ports:
54+
- mode: host
55+
protocol: tcp
56+
published: ${MYSQL_PORT:-13306}
57+
target: 3306
58+
restart: always
59+
volumes:
60+
- ./mysql/initdb:/docker-entrypoint-initdb.d
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
--listen_port=8003
2+
--enable_builtin_service=true
3+
--internal_port=9527
4+
--datasource_router=embed
5+
--enable_scdb_authorization=true
6+
--engine_credential=alice_credential
7+
--embed_router_conf={"datasources":[{"id":"ds001","name":"mysql db","kind":"MYSQL","connection_str":"db=alice;user=root;password=testpass;host=mysql;auto-reconnect=true"}],"rules":[{"db":"*","table":"*","datasource_id":"ds001"}]}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
--listen_port=8003
2+
--enable_builtin_service=true
3+
--internal_port=9527
4+
--datasource_router=embed
5+
--enable_scdb_authorization=true
6+
--engine_credential=bob_credential
7+
--embed_router_conf={"datasources":[{"id":"ds001","name":"mysql db","kind":"MYSQL","connection_str":"db=bob;user=root;password=testpass;host=mysql;auto-reconnect=true"}],"rules":[{"db":"*","table":"*","datasource_id":"ds001"}]}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
--listen_port=8003
2+
--enable_builtin_service=true
3+
--internal_port=9527
4+
--datasource_router=embed
5+
--enable_scdb_authorization=true
6+
--engine_credential=carol_credential
7+
--embed_router_conf={"datasources":[{"id":"ds001","name":"mysql db","kind":"MYSQL","connection_str":"db=carol;user=root;password=testpass;host=mysql;auto-reconnect=true"}],"rules":[{"db":"*","table":"*","datasource_id":"ds001"}]}

0 commit comments

Comments
 (0)