forked from IGinX-THU/IGinX
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
233 lines (210 loc) · 10.3 KB
/
action.yml
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
name: "conf-writer"
description: "use conf-writer to change the target/conf after IGinX was installed"
inputs:
if-CapExp:
description: "if you need capacity expansion"
required: false
default: "false"
DB-name:
description: "DB name"
required: false
default: IoTDB12
Test-Way:
description: "the way to test"
required: false
default: clearData
Read-Only:
description: "make the storage engine read-only"
required: false
default: "false"
Has-Data:
description: "does the storage engine has data"
required: false
default: "false"
Push-Down:
description: "make the IGinX push down filter"
required: false
default: "false"
Metadata:
description: "which metadata service to use"
required: false
default: zookeeper
Root-Dir-Path:
description: "the path of IGinX root directory"
required: false
default: "."
use-free-thread-python:
description: "use python3.13 free-threading mode"
required: false
default: "false"
zookeeper-port:
description: "zookeeper service port"
required: false
default: "2181"
Close-Optimizer:
description: "close all optimizer"
required: false
default: "false"
runs:
using: "composite" # Mandatory parameter
steps:
- id: project
uses: ./.github/actions/project
- name: Set Test Environment
shell: bash
run: |
echo "${{ inputs.DB-name }}" > ${{ inputs.Root-Dir-Path }}/test/src/test/resources/DBName.txt
echo "${{ inputs.if-CapExp }}" > ${{ inputs.Root-Dir-Path }}/test/src/test/resources/isScaling.txt
echo "${{ inputs.Test-Way }}" > ${{ inputs.Root-Dir-Path }}/test/src/test/resources/dbce-test-way.txt
- name: Change Zookeeper Port
uses: ./.github/actions/edit
with:
paths: ${{ inputs.Root-Dir-Path }}/core/target/iginx-core-*/conf/config.properties
statements: s/zookeeperConnectionString=127.0.0.1:[0-9]*/zookeeperConnectionString=127.0.0.1:${{ inputs.zookeeper-port }}/g
- name: Change UDF conf
uses: ./.github/actions/edit
with:
paths: ${{ inputs.Root-Dir-Path }}/core/target/iginx-core-*/conf/config.properties
statements: s/needInitBasicUDFFunctions=false/needInitBasicUDFFunctions=true/g
- name: Find PythonCMD && Set Free-threading Support ENV
id: find_python_cmd
shell: bash -el {0}
run: |
if [[ "${{ inputs.use-free-thread-python }}" == "true" ]]; then
if [ "$RUNNER_OS" == "Windows" ]; then
pythonPath=$(echo "$FT_PYTHON_PATH" | sed 's/\\/\//g')
pythonCMD="${pythonPath}/python3.13t.exe"
echo "TORCH_SUPPORTED=false" >> $GITHUB_ENV
else
pythonCMD='python3.13t'
echo "TORCH_SUPPORTED=false" >> $GITHUB_ENV
fi
else
if [ "$RUNNER_OS" == "Windows" ]; then
pythonCMD=python
else
pythonCMD=python3
fi
fi
# have to set env to make it work in ut tests
echo "pythonCMD=${pythonCMD}" >> $GITHUB_ENV
echo "pythonCMD=${pythonCMD}" >> $GITHUB_OUTPUT
echo ${pythonCMD}
- name: Change Python CMD
uses: ./.github/actions/edit
with:
paths: ${{ inputs.Root-Dir-Path }}/core/target/iginx-core-*/conf/config.properties
statements: s|pythonCMD=python3|pythonCMD=${{ steps.find_python_cmd.outputs.pythonCMD }}|g
- if: inputs.Close-Optimizer=='true'
name: Close All Optimizer
uses: ./.github/actions/edit
with:
paths: ${{ inputs.Root-Dir-Path }}/core/target/iginx-core-*/conf/config.properties
statements: |
s/Rule=on/Rule=off/g
s/enablePushDown=true/enablePushDown=false/g
s/ColumnPruningRule=off/ColumnPruningRule=on/g
- if: inputs.Set-Key-Range-Test-Policy=='true'
name: Change KeyRangeTestPolicy
uses: ./.github/actions/edit
with:
paths: ${{ inputs.Root-Dir-Path }}/core/target/iginx-core-*/conf/config.properties
statements: s/policyClassName=.*$/policyClassName=cn.edu.tsinghua.iginx.policy.test.KeyRangeTestPolicy/g
- name: Change Log Conf
uses: ./.github/actions/edit
with:
paths: ${{ inputs.Root-Dir-Path }}/core/target/iginx-core-*/conf/config.properties
statements: s/logger.iginx.level=.*$/logger.iginx.level=debug/g
- name: Change File Permission
uses: ./.github/actions/edit
with:
paths: ${{ inputs.Root-Dir-Path }}/core/target/iginx-core-*/conf/file-permission.properties
statements: |
s/^default.transformerRule.include=.*$/default.transformerRule.include=glob:**.denied/g
s/^default.transformerRule.write=.*$/default.transformerRule.write=false/g
- if: inputs.Metadata=='etcd'
name: Change Metadata to ETCD
uses: ./.github/actions/edit
with:
paths: ${{ inputs.Root-Dir-Path }}/core/target/iginx-core-*/conf/config.properties
statements: |
s/^metaStorage=.*$/metaStorage=etcd/g
s/^zookeeperConnectionString=/#zookeeperConnectionString=/g
s/^#etcdEndpoints=/etcdEndpoints=/g
- name: Hidden All IGinX StorageEngineList
uses: ./.github/actions/edit
with:
paths: ${{ inputs.Root-Dir-Path }}/core/target/iginx-core-*/conf/config.properties
statements: s/^storageEngineList=/#storageEngineList=/g
- if: inputs.DB-name=='InfluxDB'
name: Change InfluxDB Config
uses: ./.github/actions/edit
with:
paths: ${{ inputs.Root-Dir-Path }}/core/target/iginx-core-*/conf/config.properties
statements: |
s/your-token/testToken/g
s/your-organization/testOrg/g
s/#storageEngineList=127.0.0.1#8086#influxdb/storageEngineList=127.0.0.1#8086#influxdb/g
- if: inputs.DB-name=='IoTDB12'
name: Change IoTDB12 Config
uses: ./.github/actions/edit
with:
paths: ${{ inputs.Root-Dir-Path }}/core/target/iginx-core-*/conf/config.properties
statements: s/#storageEngineList=127.0.0.1#6667#iotdb12/storageEngineList=127.0.0.1#6667#iotdb12/g
- if: inputs.DB-name=='Mix-IoTDB12-InfluxDB'
name: Change Mix-IoTDB12-InfluxDB Config
uses: ./.github/actions/edit
with:
paths: ${{ inputs.Root-Dir-Path }}/core/target/iginx-core-*/conf/config.properties
statements: $astorageEngineList=127.0.0.1#6667#iotdb12#username=root#password=root#sessionPoolSize=50#has_data=false#is_read_only=false,127.0.0.1#8086#influxdb#url=http://localhost:8086/#token=testToken#organization=testOrg#has_data=false
- if: inputs.DB-name=='MongoDB'
name: Change MongoDB Config
uses: ./.github/actions/edit
with:
paths: ${{ inputs.Root-Dir-Path }}/core/target/iginx-core-*/conf/config.properties
statements: s/^#storageEngineList=127.0.0.1#27017/storageEngineList=127.0.0.1#27017/g
- if: inputs.DB-name=='Redis'
name: Change Redis Config
uses: ./.github/actions/edit
with:
paths: ${{ inputs.Root-Dir-Path }}/core/target/iginx-core-*/conf/config.properties
statements: s/^#storageEngineList=127.0.0.1#6379/storageEngineList=127.0.0.1#6379/g
- if: inputs.DB-name=='PostgreSQL'
name: Change PostgreSQL Config
uses: ./.github/actions/edit
with:
paths: ${{ inputs.Root-Dir-Path }}/core/target/iginx-core-*/conf/config.properties
statements: s/^#storageEngineList=127.0.0.1#5432#relational#engine=postgresql/storageEngineList=127.0.0.1#5432#relational#engine=postgresql/g
- if: inputs.DB-name == 'MySQL'
name: Change MySQL Config
uses: ./.github/actions/edit
with:
paths: ${{ inputs.Root-Dir-Path }}/core/target/iginx-core-*/conf/config.properties
statements: s|^#storageEngineList=127.0.0.1#3306#relational#engine=mysql.*$|storageEngineList=127.0.0.1#3306#relational#engine=mysql#username=root#has_data=false|g
- if: inputs.DB-name == 'FileSystem'
name: Modify IGinX Config
uses: ./.github/actions/edit
with:
paths: ${{ inputs.Root-Dir-Path }}/core/target/iginx-core-*/conf/config.properties
statements: |
s/^#storageEngineList=127.0.0.1#[0-9]*#filesystem/storageEngineList=127.0.0.1#6668#filesystem/g
s|dir=[^#]*|dir=${{ steps.project.outputs.workspace }}/test/iginx_mn|g
s|dummy_dir=[^#]*|dummy_dir=${{ steps.project.outputs.workspace }}/test/mn|g
s/data.config.write.buffer.size=[0-9]*/data.config.write.buffer.size=1048576/g
s/dummy.struct=[^#]*/dummy.struct=LegacyParquet/g
s/chunk_size_in_bytes=[0-9]*/chunk_size_in_bytes=8/g
s/write.buffer.size=[0-9]*/write.buffer.size=1048576/g
s/client.connectPool.maxTotal=[0-9]*/client.connectPool.maxTotal=2/g
- name: Set Read-Only
uses: ./.github/actions/edit
with:
paths: ${{ inputs.Root-Dir-Path }}/core/target/iginx-core-*/conf/config.properties
statements: s/is_read_only=[^#]*/is_read_only=${{ inputs.Read-Only }}/g
- name: Set Has-Data
uses: ./.github/actions/edit
with:
paths: ${{ inputs.Root-Dir-Path }}/core/target/iginx-core-*/conf/config.properties
statements: s/has_data=[^#]*/has_data=${{ inputs.Has-Data }}/g
- name: Show Config
shell: bash
run: cat ${{ inputs.Root-Dir-Path }}/core/target/iginx-core-*/conf/config.properties