-
Notifications
You must be signed in to change notification settings - Fork 312
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(rdsn): Merge sub-project rdsn from XiaoMi/rdsn
- Loading branch information
Showing
941 changed files
with
180,108 additions
and
77 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
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
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
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,237 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
--- | ||
# Developer Notes: | ||
# | ||
# This config is for github actions. Before merging your changes of this file, | ||
# it's recommended to create a PR against the ci-test branch to test if it works | ||
# as expected. | ||
|
||
name: rdsn Lint and Unit Test | ||
|
||
on: | ||
# run on each pull request | ||
pull_request: | ||
types: [ synchronize, opened, reopened ] | ||
paths: | ||
- .github/workflows/lint_and_test_rdsn.yaml | ||
- rdsn/CMakeLists.txt | ||
- rdsn/bin/** | ||
- rdsn/compile_thrift.py | ||
- rdsn/include/** | ||
- rdsn/run.sh | ||
- rdsn/scripts/** | ||
- rdsn/src/** | ||
- rdsn/thirdparty/** | ||
branches: | ||
- master | ||
- 'v[0-9]+.*' # release branch | ||
- ci-test # testing branch for github action | ||
- '*dev' # developing branch | ||
|
||
# for manually triggering workflow | ||
workflow_dispatch: | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
container: | ||
image: apache/pegasus:clang-format-3.9 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 1 | ||
- name: clang-format | ||
working-directory: rdsn | ||
run: ./scripts/linux/run-clang-format.py --clang-format-executable=clang-format-3.9 -r src include | ||
|
||
test: | ||
name: Test | ||
needs: lint | ||
runs-on: self-hosted | ||
container: | ||
image: apache/pegasus:thirdparties-bin-ubuntu1804 | ||
env: | ||
CCACHE_DIR: /tmp/ccache/pegasus | ||
CCACHE_MAXSIZE: 10G | ||
volumes: | ||
# Place ccache compilation intermediate results in host memory, that's shared among containers. | ||
- /tmp/ccache/pegasus:/tmp/ccache/pegasus | ||
# Read docs at https://docs.docker.com/storage/tmpfs/ for more details of using tmpfs in docker. | ||
options: --mount type=tmpfs,destination=/tmp/pegasus --cap-add=SYS_PTRACE | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: dorny/paths-filter@v2 | ||
id: changes | ||
with: | ||
filters: | | ||
thirdparty: | ||
- 'rdsn/thirdparty/**' | ||
- name: Unpack prebuilt third-parties | ||
working-directory: rdsn | ||
if: steps.changes.outputs.thirdparty == 'false' | ||
run: unzip /root/thirdparties-bin.zip -d ./thirdparty | ||
- name: Rebuild third-parties | ||
if: steps.changes.outputs.thirdparty == 'true' | ||
working-directory: rdsn/thirdparty | ||
run: | | ||
mkdir build | ||
cmake -DCMAKE_BUILD_TYPE=Release -B build/ | ||
cmake --build build/ -j $(($(nproc)/2+1)) | ||
- name: Compilation | ||
working-directory: rdsn | ||
run: ./run.sh build -c --skip_thirdparty | ||
- name: Unit Testing | ||
working-directory: rdsn | ||
run: | | ||
export LD_LIBRARY_PATH=`pwd`/thirdparty/output/lib:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server | ||
ulimit -s unlimited | ||
./run.sh test --skip_thirdparty | ||
test-with-sanitizer-address: | ||
name: Test With Sanitizer Address | ||
needs: lint | ||
runs-on: self-hosted | ||
container: | ||
image: apache/pegasus:thirdparties-bin-ubuntu1804 | ||
env: | ||
CCACHE_DIR: /tmp/ccache/pegasus | ||
CCACHE_MAXSIZE: 10G | ||
volumes: | ||
# Place ccache compilation intermediate results in host memory, that's shared among containers. | ||
- /tmp/ccache/pegasus:/tmp/ccache/pegasus | ||
# Read docs at https://docs.docker.com/storage/tmpfs/ for more details of using tmpfs in docker. | ||
options: --mount type=tmpfs,destination=/tmp/pegasus --cap-add=SYS_PTRACE | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: dorny/paths-filter@v2 | ||
id: changes | ||
with: | ||
filters: | | ||
thirdparty: | ||
- 'rdsn/thirdparty/**' | ||
- name: Unpack prebuilt third-parties | ||
working-directory: rdsn | ||
if: steps.changes.outputs.thirdparty == 'false' | ||
run: unzip /root/thirdparties-bin.zip -d ./thirdparty | ||
- name: Rebuild third-parties | ||
if: steps.changes.outputs.thirdparty == 'true' | ||
working-directory: rdsn/thirdparty | ||
run: | | ||
mkdir build | ||
cmake -DCMAKE_BUILD_TYPE=Release -B build/ | ||
cmake --build build/ -j $(($(nproc)/2+1)) | ||
- name: Compilation | ||
working-directory: rdsn | ||
run: ./run.sh build -c --sanitizer address --skip_thirdparty --disable_gperf | ||
- name: Unit Testing | ||
working-directory: rdsn | ||
run: | | ||
export LD_LIBRARY_PATH=`pwd`/thirdparty/output/lib:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server | ||
ulimit -s unlimited | ||
./run.sh test --sanitizer address --skip_thirdparty --disable_gperf | ||
test-with-sanitizer-leak: | ||
name: Test With Sanitizer Leak | ||
needs: lint | ||
runs-on: self-hosted | ||
container: | ||
image: apache/pegasus:thirdparties-bin-ubuntu1804 | ||
env: | ||
CCACHE_DIR: /tmp/ccache/pegasus | ||
CCACHE_MAXSIZE: 10G | ||
volumes: | ||
# Place ccache compilation intermediate results in host memory, that's shared among containers. | ||
- /tmp/ccache/pegasus:/tmp/ccache/pegasus | ||
# Read docs at https://docs.docker.com/storage/tmpfs/ for more details of using tmpfs in docker. | ||
options: --mount type=tmpfs,destination=/tmp/pegasus --cap-add=SYS_PTRACE | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: dorny/paths-filter@v2 | ||
id: changes | ||
with: | ||
filters: | | ||
thirdparty: | ||
- 'rdsn/thirdparty/**' | ||
- name: Unpack prebuilt third-parties | ||
working-directory: rdsn | ||
if: steps.changes.outputs.thirdparty == 'false' | ||
run: unzip /root/thirdparties-bin.zip -d ./thirdparty | ||
- name: Rebuild third-parties | ||
if: steps.changes.outputs.thirdparty == 'true' | ||
working-directory: rdsn/thirdparty | ||
run: | | ||
mkdir build | ||
cmake -DCMAKE_BUILD_TYPE=Release -B build/ | ||
cmake --build build/ -j $(($(nproc)/2+1)) | ||
- name: Compilation | ||
working-directory: rdsn | ||
run: ./run.sh build -c --sanitizer leak --skip_thirdparty --disable_gperf | ||
- name: Unit Testing | ||
working-directory: rdsn | ||
run: | | ||
export LD_LIBRARY_PATH=`pwd`/thirdparty/output/lib:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server | ||
ulimit -s unlimited | ||
./run.sh test --sanitizer leak --skip_thirdparty --disable_gperf | ||
test-with-sanitizer-undefined: | ||
name: Test With Sanitizer Undefined | ||
needs: lint | ||
runs-on: self-hosted | ||
container: | ||
image: apache/pegasus:thirdparties-bin-ubuntu1804 | ||
env: | ||
CCACHE_DIR: /tmp/ccache/pegasus | ||
CCACHE_MAXSIZE: 10G | ||
volumes: | ||
# Place ccache compilation intermediate results in host memory, that's shared among containers. | ||
- /tmp/ccache/pegasus:/tmp/ccache/pegasus | ||
# Read docs at https://docs.docker.com/storage/tmpfs/ for more details of using tmpfs in docker. | ||
options: --mount type=tmpfs,destination=/tmp/pegasus --cap-add=SYS_PTRACE | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: dorny/paths-filter@v2 | ||
id: changes | ||
with: | ||
filters: | | ||
thirdparty: | ||
- 'rdsn/thirdparty/**' | ||
- name: Unpack prebuilt third-parties | ||
working-directory: rdsn | ||
if: steps.changes.outputs.thirdparty == 'false' | ||
run: unzip /root/thirdparties-bin.zip -d ./thirdparty | ||
- name: Rebuild third-parties | ||
if: steps.changes.outputs.thirdparty == 'true' | ||
working-directory: rdsn/thirdparty | ||
run: | | ||
mkdir build | ||
cmake -DCMAKE_BUILD_TYPE=Release -B build/ | ||
cmake --build build/ -j $(($(nproc)/2+1)) | ||
- name: Compilation | ||
working-directory: rdsn | ||
run: ./run.sh build -c --sanitizer undefined --skip_thirdparty --disable_gperf | ||
- name: Unit Testing | ||
working-directory: rdsn | ||
run: | | ||
export LD_LIBRARY_PATH=`pwd`/thirdparty/output/lib:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server | ||
ulimit -s unlimited | ||
./run.sh test --sanitizer undefined --skip_thirdparty --disable_gperf |
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,77 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
--- | ||
# There are 'paths' filters for .github/workflows/cpp_actions.yaml, | ||
# it can be skipped, but lead CI pending, we add this | ||
# 'always pass' action to resolve it, see more details: | ||
# https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks | ||
|
||
name: rdsn Lint and Unit Test | ||
|
||
on: | ||
# run on each pull request | ||
pull_request: | ||
types: [ synchronize, opened, reopened ] | ||
paths-ignore: | ||
- .github/workflows/cpp_actions.yaml | ||
- rdsn/CMakeLists.txt | ||
- rdsn/bin/** | ||
- rdsn/compile_thrift.py | ||
- rdsn/include/** | ||
- rdsn/run.sh | ||
- rdsn/scripts/** | ||
- rdsn/src/** | ||
- rdsn/thirdparty/** | ||
branches: | ||
- master | ||
- 'v[0-9]+.*' # release branch | ||
- ci-test # testing branch for github action | ||
- '*dev' # developing branch | ||
|
||
# for manually triggering workflow | ||
workflow_dispatch: | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: 'echo "No build required" ' | ||
|
||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: 'echo "No build required" ' | ||
|
||
test-with-sanitizer-address: | ||
name: Test With Sanitizer Address | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: 'echo "No build required" ' | ||
|
||
test-with-sanitizer-leak: | ||
name: Test With Sanitizer Leak | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: 'echo "No build required" ' | ||
|
||
test-with-sanitizer-undefined: | ||
name: Test With Sanitizer Undefined | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: 'echo "No build required" ' |
Oops, something went wrong.