Skip to content

Commit

Permalink
change setup go and java path
Browse files Browse the repository at this point in the history
  • Loading branch information
lcxznpy committed Apr 28, 2024
1 parent fb1bd2a commit e03d556
Show file tree
Hide file tree
Showing 8 changed files with 171 additions and 215 deletions.
38 changes: 22 additions & 16 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,45 +5,47 @@ on:
workflow_call:
secrets:
S3ENDPOINT:
description: 'S3ENDPOINT For Test'
description: "S3ENDPOINT For Test"
required: true
S3REGION:
description: 'S3REGION For Test'
description: "S3REGION For Test"
required: true
S3APIKEY:
description: 'S3APIKEY For Test'
description: "S3APIKEY For Test"
required: true
S3APISECRET:
description: 'S3APISECRET For Test'
description: "S3APISECRET For Test"
required: true
S3BUCKET:
description: 'S3BUCKET For Test'
description: "S3BUCKET For Test"
required: true

jobs:
ut-linux-x86:
runs-on: ubuntu-latest
name: UT Test on Ubuntu/x86
name: UT Test on Ubuntu/x86
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '3'
fetch-depth: "3"
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- name: Set up Go
uses: ./.github/actions/setup_env
uses: matrixorigin/CI/actions/setup-env@main
with:
setup-java: false
- name: Set env
run: |
echo "endpoint=${{ secrets.S3ENDPOINT }}" >> $GITHUB_ENV
echo "region=${{ secrets.S3REGION }}" >> $GITHUB_ENV
echo "apikey=${{ secrets.S3APIKEY }}" >> $GITHUB_ENV
echo "apisecret=${{ secrets.S3APISECRET }}" >> $GITHUB_ENV
echo "bucket=${{ secrets.S3BUCKET }}" >> $GITHUB_ENV
echo "bucket=${{ secrets.S3BUCKET }}" >> $GITHUB_ENV
- name: Unit Testing
run: |
cd $GITHUB_WORKSPACE && make clean && make config
make ut UT_PARALLEL=6
ut-mac-x86:
if: ${{ !github.event.pull_request.draft }}
runs-on: macos-12
Expand All @@ -52,11 +54,13 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '3'
fetch-depth: "3"
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- name: Set up Go
uses: ./.github/actions/setup_env
uses: matrixorigin/CI/actions/setup-env@main
with:
setup-java: false
- name: Set env
run: |
echo "endpoint=${{ secrets.S3ENDPOINT }}" >> $GITHUB_ENV
Expand All @@ -68,14 +72,14 @@ jobs:
run: |
cd $GITHUB_WORKSPACE && make clean && make config
make ut UT_PARALLEL=6
sca:
runs-on: ubuntu-latest
name: SCA Test on Ubuntu/x86
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '3'
fetch-depth: "3"
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- uses: thiagodnf/[email protected]
Expand All @@ -86,11 +90,13 @@ jobs:
.github/ISSUE_TEMPLATE/*.yml
.github/ISSUE_TEMPLATE/*.yaml
- name: Set up Go
uses: ./.github/actions/setup_env
uses: matrixorigin/CI/actions/setup-env@main
with:
setup-java: false
- name: Prepare ENV
run: |
cd $GITHUB_WORKSPACE && make clean && make config && make build
make install-static-check-tools
make install-static-check-tools
- name: Static Code Analysis
run: |
cd $GITHUB_WORKSPACE
Expand Down
30 changes: 11 additions & 19 deletions .github/workflows/e2e-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ jobs:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: '3'
fetch-depth: "3"
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}

- name: Print run attempt
run: echo "run attempt is ${{ github.run_attempt }}"

- name: docker compose launch-multi-cn
timeout-minutes: 10
run: |
Expand All @@ -39,7 +39,7 @@ jobs:
mkdir -p ${{ github.workspace }}/docker-compose-log
docker-compose -f etc/launch-tae-compose/compose.yaml --profile launch-multi-cn up -d --build
# wait for ready
i=1
while [ $(mysql -h 127.0.0.1 -P 6001 -u dump -p111 --execute 'create database if not exists compose_test;use compose_test; create table if not exists compose_test_table(col1 int auto_increment primary key);show tables;' 2>&1 | tee /dev/stderr | grep 'compose_test_table' | wc -l) -lt 1 ]; do
Expand All @@ -65,12 +65,8 @@ jobs:
path: ./mo-tester
ref: main

- name: Set up JDK 8 for x64
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'adopt'
architecture: x64
- name: Set up Go And Java
uses: matrixorigin/CI/actions/setup-env@main

- name: Start BVT Test
id: bvt_on_pr_version
Expand All @@ -81,7 +77,7 @@ jobs:
sed -i 's/ port: [0-9]*/ port: 12345/g' mo.yml
cat mo.yml
echo "============================="
./run.sh -n -g -o -p $GITHUB_WORKSPACE/test/distributed/cases -s /test/distributed/resources -e pessimistic_transaction 2>&1
- name: export log
Expand Down Expand Up @@ -109,7 +105,7 @@ jobs:
with:
name: Compose-multi-cn-e2e-bvt-test-docker-log(Optimistic,PUSH)
path: |
${{ github.workspace }}/docker-compose-log
${{ github.workspace }}/docker-compose-log
retention-days: 7

multi-CN-bvt-docker-compose-pessimistic:
Expand All @@ -122,7 +118,7 @@ jobs:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: '3'
fetch-depth: "3"
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}

Expand All @@ -137,7 +133,7 @@ jobs:
cat ./etc/launch-tae-compose/config/tn.toml
mkdir -p ${{ github.workspace }}/docker-compose-log
docker-compose -f etc/launch-tae-compose/compose.yaml --profile launch-multi-cn up -d --build
# wait for ready
i=1
while [ $(mysql -h 127.0.0.1 -P 6001 -u dump -p111 --execute 'create database if not exists compose_test;use compose_test; create table if not exists compose_test_table(col1 int auto_increment primary key);show tables;' 2>&1 | tee /dev/stderr | grep 'compose_test_table' | wc -l) -lt 1 ]; do
Expand All @@ -158,12 +154,8 @@ jobs:
path: ./mo-tester
ref: main

- name: Set up JDK 8 for x64
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'adopt'
architecture: x64
- name: Set up Go And Java
uses: matrixorigin/CI/actions/setup-env@main

- name: Start BVT Test
id: bvt_on_pr_version
Expand Down
44 changes: 13 additions & 31 deletions .github/workflows/e2e-standalone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:
- name: checkout head
uses: actions/checkout@v4
with:
fetch-depth: '3'
fetch-depth: "3"
path: ./head
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- name: Set up Go
uses: ./head/.github/actions/setup_env
- name: Set up Go And Java
uses: matrixorigin/CI/actions/setup-env@main
- name: Build MatrixOne
run: |
cd $GITHUB_WORKSPACE/head && make clean && make build
Expand All @@ -44,12 +44,6 @@ jobs:
repository: matrixorigin/mo-tester
path: ./mo-tester
ref: main
- name: Set up JDK 8 for x64
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'adopt'
architecture: x64
- name: Start BVT Test
id: bvt_on_pr_version
run: |
Expand Down Expand Up @@ -80,10 +74,10 @@ jobs:
run: |
cd $GITHUB_WORKSPACE/head
mv mo-service.log mo-service.r1.log
# delete for clear the start finish status of mo
rm -rf mo-data/local/system_init_completed
./optools/run_bvt.sh $GITHUB_WORKSPACE/head launch
- name: Start BVT Test for MO with Version of Head Restarted
id: bvt_on_latest_head_version_run2
Expand All @@ -96,10 +90,10 @@ jobs:
echo "============================="
./run.sh -n -g -o -p $GITHUB_WORKSPACE/head/test/distributed/cases -e pessimistic_transaction 2>&1
- name: Dump restarted mo-service goroutines
- name: Dump restarted mo-service goroutines
if: ${{ always() && !cancelled() }}
run: |
if [ "$(ps -ef | grep 'mo-service' | grep -v "grep" | wc -l)" -gt 0 ]; then curl http://localhost:12345/debug/pprof/goroutine\?debug=2 -o ${{ github.workspace }}/head/restarted-dump-stacks.log; pkill -9 mo-service; else echo 'current mo-service has already crashed'; exit 1; fi
if [ "$(ps -ef | grep 'mo-service' | grep -v "grep" | wc -l)" -gt 0 ]; then curl http://localhost:12345/debug/pprof/goroutine\?debug=2 -o ${{ github.workspace }}/head/restarted-dump-stacks.log; pkill -9 mo-service; else echo 'current mo-service has already crashed'; exit 1; fi
- name: Check Log Messages Count per second
if: ${{ always() && !cancelled() }}
run: |
Expand Down Expand Up @@ -138,8 +132,8 @@ jobs:
path: ./head
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- name: Set up Go
uses: ./head/.github/actions/setup_env
- name: Set up Go And Java
uses: matrixorigin/CI/actions/setup-env@main
- name: Build MatrixOne
run: |
cd $GITHUB_WORKSPACE/head && make clean && make build
Expand All @@ -159,11 +153,6 @@ jobs:
repository: matrixorigin/mo-tester
path: ./mo-tester
ref: main
- name: Set up JDK 8 for x64
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'adopt'
- name: Start BVT Test
id: bvt_on_pr_version
run: |
Expand Down Expand Up @@ -214,13 +203,13 @@ jobs:
- name: checkout head
uses: actions/checkout@v4
with:
fetch-depth: '3'
fetch-depth: "3"
path: ./head
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}

- name: Set up Go
uses: ./head/.github/actions/setup_env
- name: Set up Go And Java
uses: matrixorigin/CI/actions/setup-env@main

- name: Build MatrixOne
run: |
Expand All @@ -245,13 +234,6 @@ jobs:
path: ./mo-tester
ref: main

- name: Set up JDK 8 for x64
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'adopt'
architecture: x64

- name: Start BVT Test
id: bvt_on_pr_version
run: |
Expand All @@ -261,7 +243,7 @@ jobs:
sed -i 's/ port: [0-9]*/ port: 12345/g' mo.yml
cat mo.yml
echo "============================="
./run.sh -n -g -o -p $GITHUB_WORKSPACE/head/test/distributed/cases -s $GITHUB_WORKSPACE/head/test/distributed/resources -e optimistic 2>&1
- name: Dump mo-service goroutines
Expand Down
Loading

0 comments on commit e03d556

Please sign in to comment.