Skip to content

Commit

Permalink
Merge branch 'main' into docs-editiontwo
Browse files Browse the repository at this point in the history
  • Loading branch information
Elliezza authored Feb 22, 2024
2 parents b449e35 + 8f19aeb commit b0d2c32
Show file tree
Hide file tree
Showing 424 changed files with 8,185 additions and 4,355 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/cicd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,10 @@ jobs:
run: |
echo "SQL_JAVASDK_ENABLE=ON" >> $GITHUB_ENV
- name: Install Dependencies
run: |
brew install z3
- name: configure
env:
SQL_JAVASDK_ENABLE: ${{ env.SQL_JAVASDK_ENABLE }}
Expand Down Expand Up @@ -204,6 +208,13 @@ jobs:
path: openmldb-*.tar.gz
name: release-artifacts

- name: Upload Event File
if: always()
uses: actions/upload-artifact@v3
with:
name: event-file
path: ${{ github.event_path }}

release:
runs-on: ubuntu-latest
# if test failed, shouldn't release
Expand Down
34 changes: 27 additions & 7 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ jobs:
BUILD_SHARED_LIBS: ON
TESTING_ENABLE_STRIP: ON
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true

- name: download lcov
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: linux-test-project/lcov
ref: v1.16
Expand All @@ -73,18 +73,38 @@ jobs:
- name: debug
if: always()
run: |
run: |
du -d 1 -h build
df -h
- name: upload coverage
uses: actions/upload-artifact@v3
with:
# include the generated html report in build/coverage, great for local diagnose
name: coverage-cpp-${{ github.sha }}
path: |
build/coverage.*
build/coverage/
retention-days: 3

coverage-publish:
needs: ["coverage"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true

- name: Download Artifacts
uses: actions/download-artifact@v3
with:
name: coverage-cpp-${{ github.sha }}
path: build

- name: Upload Coverage Report
uses: codecov/codecov-action@v3
with:
files: build/coverage.info
name: coverage-cpp
fail_ci_if_error: true
verbose: true

- name: stop service
run: |
./steps/ut_zookeeper.sh stop
13 changes: 10 additions & 3 deletions .github/workflows/hybridse-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
# this option enables print inner output rows of each node in runner
HYBRIDSE_DEBUG: true
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install dependencies
run: |
Expand All @@ -79,6 +79,13 @@ jobs:
run: |
make hybridse-test
- name: Upload Event File
if: always()
uses: actions/upload-artifact@v3
with:
name: event-file
path: ${{ github.event_path }}

- name: Upload Cpp UT Results
if: always()
uses: actions/upload-artifact@v3
Expand All @@ -89,7 +96,7 @@ jobs:
publish-test-results-linux:
needs: ["linux-build"]
# the action will only run on 4paradigm/HybridSE's context, not for fork repo or dependabot
# the action will only run on 4paradigm/OpenMLDB's context, not for fork repo or dependabot
if: >
always() && github.event_name == 'push' || (
github.event.pull_request.head.repo.full_name == github.repository &&
Expand All @@ -104,7 +111,7 @@ jobs:

publish-test-results-mac:
needs: ["macos-build"]
# the action will only run on 4paradigm/HybridSE's context, not for fork repo or dependabot
# the action will only run on 4paradigm/OpenMLDB's context, not for fork repo or dependabot
if: >
always() && github.event_name == 'push' || (
github.event.pull_request.head.repo.full_name == github.repository &&
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/integration-test-src.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ jobs:
html_body: test/integration-test/openmldb-test-java/openmldb-sdk-test/target/surefire-reports/html/overview.html
to: ${{ secrets.MAIL_TO }}
from: GitHub Actions
content_type: text/plain
attachments: surefire-reports.tar.gz

java-sdk-cluster-memory-task:
Expand Down Expand Up @@ -148,7 +147,6 @@ jobs:
html_body: file://test/integration-test/openmldb-test-java/openmldb-sdk-test/target/surefire-reports/html/overview.html
to: ${{ secrets.MAIL_TO }}
from: GitHub Actions
content_type: text/plain
attachments: surefire-reports.tar.gz

java-sdk-cluster-memory-1:
Expand Down Expand Up @@ -191,7 +189,6 @@ jobs:
body: OpenMLDB Memory 1 Test Failed
to: ${{ secrets.MAIL_TO }}
from: GitHub Actions
content_type: text/plain
attachments: surefire-reports.tar.gz

java-sdk-cluster-ssd-0:
Expand Down Expand Up @@ -234,7 +231,6 @@ jobs:
body: OpenMLDB SSD Test Failed
to: ${{ secrets.MAIL_TO }}
from: GitHub Actions
content_type: text/plain
attachments: surefire-reports.tar.gz

# java-sdk-cluster-ssd-task:
Expand Down Expand Up @@ -320,7 +316,6 @@ jobs:
body: OpenMLDB HDD Test Failed
to: ${{ secrets.MAIL_TO }}
from: GitHub Actions
content_type: text/plain
attachments: surefire-reports.tar.gz

# java-sdk-cluster-hdd-task:
Expand Down Expand Up @@ -568,5 +563,4 @@ jobs:
html_body: test/integration-test/openmldb-test-java/openmldb-sdk-test/target/surefire-reports/html/overview.html
to: ${{ secrets.MAIL_TO }}
from: GitHub Actions
content_type: text/plain
attachments: surefire-reports.tar.gz
11 changes: 6 additions & 5 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ jobs:
pr-name-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '14'
node-version: '18'
- name: Install Dependencies
run: npm install @commitlint/config-conventional
- uses: JulienKode/[email protected]
run: npm install @commitlint/[email protected]

- uses: JulienKode/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ jobs:
files: artifacts/linux-ut-result-*/**/*.xml
check_name: Linux Test Report
comment_title: Linux Test Report
event_name: ${{ github.event.workflow_run.event }}
run_id: ${{ github.event.workflow_run.id }}
12 changes: 8 additions & 4 deletions .github/workflows/publish-hybridse-test-result-from-fork.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ jobs:
files: artifacts/linux-ut-result-*/**/*.xml
check_name: HybridSE Linux Test Report
comment_title: HybridSE Linux Test Report
event_name: ${{ github.event.workflow_run.event }}
run_id: ${{ github.event.workflow_run.id }}

test-results-mac:
if: >
Expand All @@ -31,7 +33,9 @@ jobs:
name: Publish HybridSE Mac UT Results
uses: ./.github/workflows/publish-test-result-from-fork-action.yml
with:
commit: ${{ github.event.workflow_run.head_sha }}
files: artifacts/macos-ut-result-*/**/*.xml
check_name: HybridSE Mac Test Report
comment_title: HybridSE Mac Test Report
commit: ${{ github.event.workflow_run.head_sha }}
files: artifacts/macos-ut-result-*/**/*.xml
check_name: HybridSE Mac Test Report
comment_title: HybridSE Mac Test Report
event_name: ${{ github.event.workflow_run.event }}
run_id: ${{ github.event.workflow_run.id }}
2 changes: 2 additions & 0 deletions .github/workflows/publish-sdk-test-result-from-fork.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ jobs:
files: artifacts/linux-ut-result-*/**/*.xml
check_name: SDK Test Report
comment_title: SDK Test Report
event_name: ${{ github.event.workflow_run.event }}
run_id: ${{ github.event.workflow_run.id }}
55 changes: 20 additions & 35 deletions .github/workflows/publish-test-result-from-fork-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,58 +7,43 @@ on:
files:
required: true
type: string
event_name:
required: true
type: string
check_name:
required: true
type: string
comment_title:
required: true
type: string
run_id:
required: true
type: number

permissions:
checks: write
pull-requests: write

# required by download step to access artifacts API
actions: read

jobs:
test-results:
runs-on: ubuntu-latest
steps:
- name: Download Artifacts
uses: actions/github-script@v3
- name: Download and Extract Artifacts
uses: dawidd6/action-download-artifact@v3
with:
script: |
var fs = require('fs');
var path = require('path');
var artifacts_path = path.join('${{github.workspace}}', 'artifacts')
fs.mkdirSync(artifacts_path, { recursive: true })
var artifacts = await github.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{ github.event.workflow_run.id }},
});
run_id: ${{ inputs.run_id }}
path: artifacts

for (const artifact of artifacts.data.artifacts) {
var download = await github.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: artifact.id,
archive_format: 'zip',
});
var artifact_path = path.join(artifacts_path, `${artifact.name}.zip`)
fs.writeFileSync(artifact_path, Buffer.from(download.data));
console.log(`Downloaded ${artifact_path}`);
}
- name: Extract Artifacts
run: |
for file in artifacts/*.zip
do
if [ -f "$file" ]
then
dir="${file/%.zip/}"
mkdir -p "$dir"
unzip -d "$dir" "$file"
fi
done
- name: Publish UT Results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
commit: ${{ inputs.commit }}
files: ${{ inputs.files }}
check_name: ${{ inputs.check_name }}
comment_title: ${{ inputs.comment_title }}
event_name: ${{ inputs.event_name }}
# u should upload the event file with upload name 'event-file'
event_file: artifacts/event-file/event.json
4 changes: 4 additions & 0 deletions .github/workflows/publish-test-results-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ on:
required: true
type: string

permissions:
checks: write
pull-requests: write

jobs:
publish-test-results:
runs-on: ubuntu-latest
Expand Down
Loading

0 comments on commit b0d2c32

Please sign in to comment.