forked from taosdata/driver-go
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
1,468 additions
and
270 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,140 @@ | ||
name: compatibility | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- '3.1' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
matrix: | ||
td_version: [ 'main', '3.0' ] | ||
name: Build ${{ matrix.td_version }} | ||
outputs: | ||
commit_id: ${{ steps.get_commit_id.outputs.commit_id }} | ||
steps: | ||
- name: checkout TDengine by pr | ||
if: github.event_name == 'pull_request' | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: 'taosdata/TDengine' | ||
path: 'TDengine' | ||
ref: ${{ matrix.td_version }} | ||
|
||
- name: get_commit_id | ||
id: get_commit_id | ||
run: | | ||
cd TDengine | ||
echo "commit_id=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT | ||
- name: Cache server by pr | ||
if: github.event_name == 'pull_request' | ||
id: cache-server-pr | ||
uses: actions/cache@v3 | ||
with: | ||
path: server.tar.gz | ||
key: ${{ runner.os }}-build-${{ matrix.td_version }}-${{ steps.get_commit_id.outputs.commit_id }} | ||
|
||
- name: prepare install | ||
if: > | ||
(github.event_name == 'pull_request' && steps.cache-server-pr.outputs.cache-hit != 'true') | ||
run: sudo apt install -y libgeos-dev | ||
|
||
- name: install TDengine | ||
if: > | ||
(github.event_name == 'pull_request' && steps.cache-server-pr.outputs.cache-hit != 'true') | ||
run: | | ||
cd TDengine | ||
mkdir debug | ||
cd debug | ||
cmake .. -DBUILD_TEST=off -DBUILD_HTTP=false -DVERNUMBER=3.9.9.9 | ||
make -j 4 | ||
- name: package | ||
if: > | ||
(github.event_name == 'pull_request' && steps.cache-server-pr.outputs.cache-hit != 'true') | ||
run: | | ||
mkdir -p ./release | ||
cp ./TDengine/debug/build/bin/taos ./release/ | ||
cp ./TDengine/debug/build/bin/taosd ./release/ | ||
cp ./TDengine/tools/taosadapter/taosadapter ./release/ | ||
cp ./TDengine/debug/build/lib/libtaos.so.3.9.9.9 ./release/ | ||
cp ./TDengine/debug/build/lib/librocksdb.so.8.1.1 ./release/ ||: | ||
cp ./TDengine/include/client/taos.h ./release/ | ||
cat >./release/install.sh<<EOF | ||
chmod +x ./taos | ||
chmod +x ./taosd | ||
chmod +x ./taosadapter | ||
cp ./taos /bin/ | ||
cp ./taosd /bin/ | ||
cp ./taosadapter /bin/ | ||
cp ./libtaos.so.3.9.9.9 /usr/lib | ||
cp ./librocksdb.so.8.1.1 /usr/lib ||: | ||
ln -sf /usr/lib/libtaos.so.3.9.9.9 /usr/lib/libtaos.so.1 | ||
ln -sf /usr/lib/libtaos.so.1 /usr/lib/libtaos.so | ||
ln -sf /usr/lib/librocksdb.so.8.1.1 /usr/lib/librocksdb.so.8 ||: | ||
ln -sf /usr/lib/librocksdb.so.8 /usr/lib/librocksdb.so ||: | ||
cp ./taos.h /usr/include | ||
EOF | ||
tar -zcvf server.tar.gz ./release | ||
test: | ||
runs-on: ubuntu-22.04 | ||
needs: build | ||
strategy: | ||
matrix: | ||
go: [ '1.14', 'stable' ] | ||
td_version: [ 'main', '3.0' ] | ||
name: Go ${{ matrix.td_version }} ${{ matrix.go }} | ||
steps: | ||
- name: get cache server by pr | ||
if: github.event_name == 'pull_request' | ||
id: get-cache-server-pr | ||
uses: actions/cache@v3 | ||
with: | ||
path: server.tar.gz | ||
key: ${{ runner.os }}-build-${{ matrix.td_version }}-${{ needs.build.outputs.commit_id }} | ||
restore-keys: | | ||
${{ runner.os }}-build-${{ matrix.td_version }}- | ||
- name: prepare install | ||
run: sudo apt install -y libgeos-dev | ||
|
||
- name: install | ||
run: | | ||
tar -zxvf server.tar.gz | ||
cd release && sudo sh install.sh | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: copy taos cfg | ||
run: | | ||
sudo mkdir -p /etc/taos | ||
sudo cp ./.github/workflows/taos.cfg /etc/taos/taos.cfg | ||
sudo cp ./.github/workflows/taosadapter.toml /etc/taos/taosadapter.toml | ||
- name: shell | ||
run: | | ||
cat >start.sh<<EOF | ||
ulimit -n 65535 && TAOS_SUPPORT_VNODES=256 taosd | ||
EOF | ||
- name: taosd | ||
run: nohup sudo sh ./start.sh & | ||
|
||
- name: start taosadapter | ||
run: sudo taosadapter & | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
cache-dependency-path: go.sum | ||
|
||
- name: Test | ||
run: sudo go test -v --count=1 -coverprofile=coverage.txt -covermode=atomic ./... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
fqdn localhost | ||
firstEp localhost:6030 | ||
asyncLog 0 | ||
debugFlag 143 | ||
supportVnodes 256 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
debug = true | ||
taosConfigDir = "" | ||
port = 6041 | ||
logLevel = "info" | ||
httpCodeServerError = false | ||
SMLAutoCreateDB = false | ||
|
||
[cors] | ||
allowAllOrigins = true | ||
|
||
#[pool] | ||
#maxConnect = 0 | ||
#maxIdle = 0 | ||
#idleTimeout = 0 | ||
|
||
[ssl] | ||
enable = false | ||
certFile = "" | ||
keyFile = "" | ||
|
||
[log] | ||
#path = "/var/log/taos" | ||
rotationCount = 30 | ||
rotationTime = "24h" | ||
rotationSize = "1GB" | ||
enableRecordHttpSql = false | ||
sqlRotationCount = 2 | ||
sqlRotationTime = "24h" | ||
sqlRotationSize = "1GB" | ||
|
||
[monitor] | ||
disable = true | ||
collectDuration = "3s" | ||
disableCollectClientIP = true | ||
incgroup = false | ||
pauseQueryMemoryThreshold = 70 | ||
pauseAllMemoryThreshold = 80 | ||
identity = "" | ||
writeToTD = false | ||
user = "root" | ||
password = "taosdata" | ||
writeInterval = "30s" | ||
|
||
[uploadKeeper] | ||
enable = false | ||
url = "http://127.0.0.1:6043/adapter_report" | ||
interval = "15s" | ||
timeout = "5s" | ||
retryTimes = 3 | ||
retryInterval = "5s" | ||
|
||
[opentsdb] | ||
enable = true | ||
|
||
[influxdb] | ||
enable = true | ||
|
||
[statsd] | ||
enable = false | ||
port = 6044 | ||
db = "statsd" | ||
user = "root" | ||
password = "taosdata" | ||
worker = 10 | ||
gatherInterval = "5s" | ||
protocol = "udp" | ||
maxTCPConnections = 250 | ||
tcpKeepAlive = false | ||
allowPendingMessages = 50000 | ||
deleteCounters = true | ||
deleteGauges = true | ||
deleteSets = true | ||
deleteTimings = true | ||
|
||
[collectd] | ||
enable = false | ||
port = 6045 | ||
db = "collectd" | ||
user = "root" | ||
password = "taosdata" | ||
worker = 10 | ||
|
||
|
||
[opentsdb_telnet] | ||
enable = false | ||
maxTCPConnections = 250 | ||
tcpKeepAlive = false | ||
dbs = ["opentsdb_telnet", "collectd", "icinga2", "tcollector"] | ||
ports = [6046, 6047, 6048, 6049] | ||
user = "root" | ||
password = "taosdata" | ||
batchSize = 1 | ||
flushInterval = "0s" | ||
|
||
[node_exporter] | ||
enable = false | ||
db = "node_exporter" | ||
user = "root" | ||
password = "taosdata" | ||
urls = ["http://localhost:9100"] | ||
responseTimeout = "5s" | ||
httpUsername = "" | ||
httpPassword = "" | ||
httpBearerTokenString = "" | ||
caCertFile = "" | ||
certFile = "" | ||
keyFile = "" | ||
insecureSkipVerify = true | ||
gatherDuration = "5s" | ||
|
||
[prometheus] | ||
enable = true | ||
|
||
[tmq] | ||
releaseIntervalMultiplierForAutocommit = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.