Skip to content

Commit

Permalink
chore(rdsn): Merge sub-project rdsn from XiaoMi/rdsn
Browse files Browse the repository at this point in the history
  • Loading branch information
acelyc111 authored Jun 23, 2022
2 parents 8758a57 + fb8c784 commit 20f96b5
Show file tree
Hide file tree
Showing 941 changed files with 180,108 additions and 77 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/check_license_header.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ on:
push:
branches:
- master
- 'v[0-9]+.*' # release branch
- ci-test # testing branch for github action
- '*dev' # developing branch

jobs:
license-check:
name: "License Check"
Expand All @@ -29,11 +33,11 @@ jobs:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v2
- name: Check License Header
uses: apache/skywalking-eyes@v0.2.0
uses: apache/skywalking-eyes@v0.3.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # needed only when you want License-Eye to comment on the pull request.
# with:
# Optional: set the log level. The default value is `info`.
# log: debug
# Optional: set the config file. The default value is `.licenserc.yaml`.
# config: .licenserc.yaml
with:
# Optional: set the log level. The default value is `info`.
# log: debug
# Optional: set the config file. The default value is `.licenserc.yaml`.
config: .licenserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# it's recommended to create a PR against the ci-test branch to test if it works
# as expected.

name: CPP Lint and Unit Test
name: Pegasus cpp Lint and Unit Test

on:
# run on each pull request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
# specific language governing permissions and limitations
# under the License.
---
# There are 'paths' filters for ci-pull-request.yaml,
# There are 'paths' filters for lint_and_test_pegasus.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: CPP Lint and Unit Test
name: Pegasus cpp Lint and Unit Test

on:
# run on each pull request
Expand Down
237 changes: 237 additions & 0 deletions .github/workflows/lint_and_test_rdsn.yaml
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
77 changes: 77 additions & 0 deletions .github/workflows/lint_and_test_rdsn_always_pass.yaml
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" '
Loading

0 comments on commit 20f96b5

Please sign in to comment.