Skip to content

Commit 9ad4418

Browse files
authored
Remove aoe test from ci(#2993)
1 parent dffd1c7 commit 9ad4418

File tree

2 files changed

+30
-195
lines changed

2 files changed

+30
-195
lines changed

.github/workflows/build_matrixone.yml

Lines changed: 0 additions & 77 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 30 additions & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -13,152 +13,64 @@ on:
1313

1414
# A workflow run is made up of one or more jobs that can run sequentially or in parallel.
1515
jobs:
16-
tae-build:
16+
tae-ut:
1717
# The type of runner that the job will run on.
1818
runs-on: ubuntu-latest
19-
name: Build Plan2-TAE on CentOS/x64
20-
timeout-minutes: 30
21-
env:
22-
#Job-Status: 2-uncertain, 1-fail, 0-success
23-
Job-Status: 2
19+
name: Staticcheck and UT Test on CentOS/x64
2420

2521
# Steps represent a sequence of tasks that will be executed as part of the job.
2622
steps:
2723
# Checks-out your repository under $GITHUB_WORKSPACE, so the job can access it.
28-
- name: Dump GitHub context
29-
env:
30-
GITHUB_CONTEXT: ${{ toJson(github) }}
31-
run: echo "$GITHUB_CONTEXT"
32-
33-
- name: checkout head
34-
uses: actions/checkout@v2
35-
if: ${{ env.Job-Status }} == 2
24+
- uses: actions/checkout@v2
3625
with:
3726
fetch-depth: '3'
38-
path: ./head
3927

4028
- name: Set up Go
4129
uses: actions/setup-go@v2
42-
if: ${{ env.Job-Status }} == 2
4330
with:
4431
go-version: 1.18
4532

46-
- name: Build MatrixOne
47-
if: ${{ env.Job-Status }} == 2
33+
- name: Formats Check
4834
run: |
49-
cd $GITHUB_WORKSPACE/head && make clean && make config && make build
50-
git rev-parse --short HEAD
51-
echo "base sha: ${{ github.event.pull_request.base.sha }}"
52-
echo "head sha: ${{ github.event.pull_request.head.sha }}"
53-
cat system_vars_config.toml | sed 's/usePlan2 = false/usePlan2 = true/g' | sed 's/storageEngine = "aoe"/storageEngine = "tae"/g' > config.toml
35+
cd $GITHUB_WORKSPACE && make clean
36+
if [ "$(make fmt | grep -v gofmt | wc -l)" -gt 0 ]; then exit 1; fi
5437
55-
- name: Start MO
56-
if: ${{ env.Job-Status }} == 2
38+
- name: Detect non-ascii characters
5739
run: |
58-
cd $GITHUB_WORKSPACE/head
59-
./mo-server ./config.toml &>mo-server.log &
40+
na_characters=$(find ${{ github.workspace }} -type f -name "*.go" -exec grep -P '[\xE5-\xE9][\x80-\xBF][\x80-\xBF]|\xE4[\xB8-\xBF][\x80-\xBF]' {} + || true)
41+
if [[ -n $na_characters ]]; then
42+
echo "Detected non-ascii characters in annotation or log info. Please refer to CONTRIBUTING.md."
43+
printf '%s\n' "${na_characters[*]}"
44+
exit 1
45+
fi
6046
61-
- name: Clone test-tool repository
62-
if: ${{ env.Job-Status }} == 2
63-
uses: actions/checkout@v2
64-
with:
65-
repository: matrixorigin/mo-tester
66-
path: ./mo-tester
67-
ref: main
68-
69-
- name: Set up JDK 8 for x64
70-
if: ${{ env.Job-Status }} == 2
71-
uses: actions/setup-java@v3
72-
with:
73-
java-version: '8'
74-
distribution: 'adopt'
75-
architecture: x64
76-
77-
- name: Start BVT Test
78-
if: ${{ env.Job-Status }} == 2
79-
id: bvt_on_pr_version
80-
continue-on-error: true
81-
run: |
82-
sleep 60s
83-
cd $GITHUB_WORKSPACE/mo-tester
84-
./run.sh -n 2>&1
85-
86-
- name: Stop Current MO-Server
87-
if: ${{ env.Job-Status }} == 2
88-
run: |
89-
if [ ${{ steps.bvt_on_pr_version.outcome }} == 'success' ]; then echo "Job-Status=0" >> $GITHUB_ENV; exit 0; fi
90-
echo "BVT on pr version failed. Stop running mo-server, switch to the base sha."
91-
cd $GITHUB_WORKSPACE/mo-tester
92-
mv log head-log
93-
mv report head-report
94-
if [ "$(ps -ef | grep 'mo-server' | grep -v "grep" | wc -l)" -gt 0 ]; then pkill mo-server; else echo 'current mo-server has already crashed'; echo "Job-Status=1" >> $GITHUB_ENV; exit 1; fi
95-
96-
97-
- uses: actions/checkout@v2
98-
if: ${{ env.Job-Status }} == 2
99-
with:
100-
fetch-depth: '3'
101-
path: ./base
102-
ref: ${{ github.event.pull_request.base.sha }}
103-
104-
- name: Build MatrixOne@base
105-
if: ${{ env.Job-Status }} == 2
106-
run: |
107-
cd $GITHUB_WORKSPACE/base && make clean && make config && make build
108-
git rev-parse --short HEAD
109-
cat system_vars_config.toml | sed 's/usePlan2 = false/usePlan2 = true/g' | sed 's/storageEngine = "aoe"/storageEngine = "tae"/g' > config.toml
110-
111-
112-
- name: Start MatrixOne@base
113-
if: ${{ env.Job-Status }} == 2
114-
run: |
115-
cd $GITHUB_WORKSPACE/base
116-
./mo-server ./config.toml &>mo-server.log &
117-
118-
- name: Start BVT Test for Comparing
119-
id: bvt_on_base
120-
continue-on-error: true
121-
if: ${{ env.Job-Status }} == 2
47+
- name: Build MatrixOne
12248
run: |
123-
cd $GITHUB_WORKSPACE/mo-tester
124-
sleep 60s
125-
./run.sh -n 2>&1
49+
cd $GITHUB_WORKSPACE && make clean && make config && make build
12650
127-
- name: BVT Compare
128-
if: ${{ env.Job-Status }} == 2
51+
- name: Static Code Analysis
12952
run: |
130-
cd $GITHUB_WORKSPACE/mo-tester
131-
mv log base-log
132-
mv report base-report
133-
if [ ${{ steps.bvt_on_base.outcome }} == 'success' ]; then echo 'Base sha passed all bvt cases. Pls check head version'; exit 1; fi
134-
cat ./base-report/success.txt ./head-report/success.txt ./head-report/success.txt | grep -v '^$' | sort > cmp.txt
135-
echo '--------Cases only passed in base----------'
136-
uniq -u cmp.txt
137-
if [ "$(uniq -u cmp.txt | wc -l)" -gt 0 ]; then echo 'Some cases passed in base but failed in head. Pls check head version'; exit 3; fi
53+
cd $GITHUB_WORKSPACE
54+
make install-static-check-tools
55+
make static-check
13856
139-
- name: remove some files
140-
if: ${{ always() }}
141-
continue-on-error: true
57+
- name: Unit Testing
14258
run: |
143-
cd $GITHUB_WORKSPACE
144-
if [ -d "./head/store/" ]; then rm -rf ./head/store/; fi
145-
if [ -d "./base/store/" ]; then rm -rf ./base/store/; fi
146-
rm -rf ./head/mo-server
147-
rm -rf ./base/mo-server
59+
make ut
14860
14961
- uses: actions/upload-artifact@v2
15062
if: ${{ always() }}
15163
continue-on-error: true
15264
with:
153-
name: tae_test_reports
65+
name: test_reports
15466
path: |
15567
${{ github.workspace }}
15668
retention-days: 7
15769

158-
aoe-build:
70+
tae-bvt:
15971
# The type of runner that the job will run on.
16072
runs-on: ubuntu-latest
161-
name: Build Plan2-AOE on CentOS/x64
73+
name: BVT Test on CentOS/x64
16274
timeout-minutes: 30
16375
env:
16476
#Job-Status: 2-uncertain, 1-fail, 0-success
@@ -192,7 +104,7 @@ jobs:
192104
git rev-parse --short HEAD
193105
echo "base sha: ${{ github.event.pull_request.base.sha }}"
194106
echo "head sha: ${{ github.event.pull_request.head.sha }}"
195-
cat system_vars_config.toml | sed 's/usePlan2 = false/usePlan2 = true/g' | sed 's/storageEngine = "aoe"/storageEngine = "aoe"/g' > config.toml
107+
cat system_vars_config.toml | sed 's/usePlan2 = false/usePlan2 = true/g' | sed 's/storageEngine = "aoe"/storageEngine = "tae"/g' > config.toml
196108
197109
- name: Start MO
198110
if: ${{ env.Job-Status }} == 2
@@ -223,7 +135,7 @@ jobs:
223135
run: |
224136
sleep 60s
225137
cd $GITHUB_WORKSPACE/mo-tester
226-
./run.sh -n -g 2>&1
138+
./run.sh -n 2>&1
227139
228140
- name: Stop Current MO-Server
229141
if: ${{ env.Job-Status }} == 2
@@ -248,7 +160,7 @@ jobs:
248160
run: |
249161
cd $GITHUB_WORKSPACE/base && make clean && make config && make build
250162
git rev-parse --short HEAD
251-
cat system_vars_config.toml | sed 's/usePlan2 = false/usePlan2 = true/g' | sed 's/storageEngine = "aoe"/storageEngine = "aoe"/g' > config.toml
163+
cat system_vars_config.toml | sed 's/usePlan2 = false/usePlan2 = true/g' | sed 's/storageEngine = "aoe"/storageEngine = "tae"/g' > config.toml
252164
253165
254166
- name: Start MatrixOne@base
@@ -264,7 +176,7 @@ jobs:
264176
run: |
265177
cd $GITHUB_WORKSPACE/mo-tester
266178
sleep 60s
267-
./run.sh -n -g 2>&1
179+
./run.sh -n 2>&1
268180
269181
- name: BVT Compare
270182
if: ${{ env.Job-Status }} == 2
@@ -273,7 +185,7 @@ jobs:
273185
mv log base-log
274186
mv report base-report
275187
if [ ${{ steps.bvt_on_base.outcome }} == 'success' ]; then echo 'Base sha passed all bvt cases. Pls check head version'; exit 1; fi
276-
cat ./base-report/success.txt ./head-report/success.txt ./head-report/success.txt | sort > cmp.txt
188+
cat ./base-report/success.txt ./head-report/success.txt ./head-report/success.txt | grep -v '^$' | sort > cmp.txt
277189
echo '--------Cases only passed in base----------'
278190
uniq -u cmp.txt
279191
if [ "$(uniq -u cmp.txt | wc -l)" -gt 0 ]; then echo 'Some cases passed in base but failed in head. Pls check head version'; exit 3; fi
@@ -292,7 +204,7 @@ jobs:
292204
if: ${{ always() }}
293205
continue-on-error: true
294206
with:
295-
name: aoe_test_reports
207+
name: tae_test_reports
296208
path: |
297209
${{ github.workspace }}
298210
retention-days: 7

0 commit comments

Comments
 (0)