-
Notifications
You must be signed in to change notification settings - Fork 279
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Approved by: @yingfeng
- Loading branch information
Showing
3 changed files
with
100 additions
and
9 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,92 @@ | ||
name: MatrixOne e2e CI(Race-Enabled) | ||
|
||
on: | ||
pull_request: | ||
types: [ closed ] | ||
branches: [ main,'[0-9]+.[0-9]+.[0-9]+' ] | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
multi-cn-bvt-linux-x86: | ||
if: github.event.pull_request.merged == true | ||
runs-on: ubuntu-latest | ||
name: Multi-CN e2e BVT Test on Linux/x64 | ||
timeout-minutes: 120 | ||
|
||
steps: | ||
- name: checkout head | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: '3' | ||
path: ./head | ||
repository: ${{ github.event.pull_request.base.repo.full_name }} | ||
ref: main | ||
|
||
- name: Set up Go | ||
uses: ./head/.github/actions/setup_env | ||
|
||
- name: Build MatrixOne | ||
run: | | ||
cd $GITHUB_WORKSPACE/head && make clean && make debug | ||
git rev-parse --short HEAD | ||
- name: Start MO | ||
run: | | ||
cd $GITHUB_WORKSPACE/head | ||
sed -i s/debug/error/ etc/launch-tae-multi-CN-tae-DN/cn1.toml | ||
sed -i s/debug/error/ etc/launch-tae-multi-CN-tae-DN/cn2.toml | ||
sed -i s/debug/error/ etc/launch-tae-multi-CN-tae-DN/dn.toml | ||
sed -i s/debug/error/ etc/launch-tae-multi-CN-tae-DN/log.toml | ||
./optools/run_bvt.sh $GITHUB_WORKSPACE/head launch-tae-multi-CN-tae-DN | ||
- name: Clone test-tool repository | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: matrixorigin/mo-tester | ||
path: ./mo-tester | ||
ref: main | ||
|
||
- name: Set up JDK 8 for x64 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '8' | ||
distribution: 'adopt' | ||
architecture: x64 | ||
|
||
- name: Start BVT Test | ||
id: bvt_on_pr_version | ||
run: | | ||
export LC_ALL="C.UTF-8" | ||
locale | ||
cd $GITHUB_WORKSPACE/mo-tester | ||
./run.sh -n -g -p $GITHUB_WORKSPACE/head/test/distributed/cases 2>&1 | ||
- name: Check mo-service Status | ||
if: ${{ always() && !cancelled() }} | ||
run: | | ||
if [ "$(ps -ef | grep 'mo-service' | grep -v "grep" | wc -l)" -gt 0 ]; then pkill -9 mo-service; else echo 'current mo-service has already crashed'; exit 1; fi | ||
- name: generate upload files | ||
if: ${{ always() }} | ||
continue-on-error: true | ||
run: | | ||
mkdir -p ${{ github.workspace }}/upload | ||
rm -rf ./mo-tester/.git | ||
rm -rf ./mo-tester/lib | ||
mv ${{ github.workspace }}/head/mo-service.log ${{ github.workspace }}/upload/ | ||
mv ${{ github.workspace }}/mo-tester ${{ github.workspace }}/upload/ | ||
- name: check data race | ||
run: | | ||
cat ${{ github.workspace }}/upload/mo-service.log | grep -C2 'DATA RACE' || true | ||
if [ "$(cat ${{ github.workspace }}/upload/mo-service.log |grep 'DATA RACE' | grep -v "grep" | wc -l)" -gt 0 ]; then exit 1; fi | ||
- uses: actions/upload-artifact@v3 | ||
if: ${{ always() }} | ||
continue-on-error: true | ||
with: | ||
name: multi-cn-e2e_linux_x86_reports | ||
path: | | ||
${{ github.workspace }}/upload | ||
retention-days: 7 |
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 |
---|---|---|
|
@@ -19,9 +19,8 @@ jobs: | |
go-version: "1.19" | ||
- name: Build normal | ||
run: | | ||
make config | ||
make build | ||
zip mo-linux-amd64.zip mo-service ./etc/cn-standalone-test.toml | ||
zip -r mo-linux-amd64.zip mo-service ./etc/launch-tae-CN-tae-DN | ||
- name: Get release | ||
id: get_release | ||
uses: bruceadams/[email protected] | ||
|
@@ -48,7 +47,6 @@ jobs: | |
go-version: "1.19" | ||
- name: Build normal | ||
run: | | ||
make config | ||
make build | ||
- name: Import Code-Signing Certificates | ||
uses: Apple-Actions/import-codesign-certs@v1 | ||
|
@@ -66,11 +64,12 @@ jobs: | |
cp ./optools/sign/gon.json ./gon.json | ||
gon -log-json ./gon.json | ||
unzip -d ./mo-macos11 mo-macos11.zip | ||
cp system_vars_config.toml ./mo-macos11/ | ||
mkdir -p ./mo-macos11/etc | ||
cp -r ./etc/launch-tae-CN-tae-DN ./mo-macos11/etc/ | ||
cd ./mo-macos11 | ||
spctl -a -vvv -t install mo-server | ||
codesign --test-requirement="=notarized" -vv mo-server | ||
zip mo-darwin-x86_64.zip mo-service ./etc/cn-standalone-test.toml | ||
spctl -a -vvv -t install mo-service | ||
codesign --test-requirement="=notarized" -vv mo-service | ||
zip -r mo-darwin-x86_64.zip mo-service ./etc/launch-tae-CN-tae-DN | ||
- name: Get release | ||
id: get_release | ||
uses: bruceadams/[email protected] | ||
|
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"source" : ["./mo-server"], | ||
"source" : ["./mo-service"], | ||
"bundle_id" : "com.matrixorigin.matrixone", | ||
"apple_id": { | ||
"username" : "[email protected]", | ||
|
@@ -11,4 +11,4 @@ | |
"zip" :{ | ||
"output_path" : "mo-macos11.zip" | ||
} | ||
} | ||
} |