Skip to content

Commit

Permalink
Merge pull request #7 from cyjseagull/feature-milestone2
Browse files Browse the repository at this point in the history
sync code from dev branch
  • Loading branch information
cyjseagull authored Aug 22, 2024
2 parents d95e5f3 + c0bdf75 commit 34befa0
Show file tree
Hide file tree
Showing 69 changed files with 1,504 additions and 922 deletions.
17 changes: 17 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 120
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- security
# Label to use when marking an issue as stale
staleLabel: wontfix
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
224 changes: 224 additions & 0 deletions .github/workflows/cpp_workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,224 @@
name: WeDPR-Component ci(cpp)
on:
push:
paths-ignore:
- "docs/**"
- "Changelog.md"
- "README.md"
pull_request:
paths-ignore:
- "docs/**"
- "Changelog.md"
- "README.md"
release:
types: [published, push]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
RUST_BACKTRACE: 1
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true

jobs:
build:
name: build all
runs-on: ${{ matrix.os }}
continue-on-error: true
strategy:
fail-fast: false
matrix:
os: [macos-12, ubuntu-20.04]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 5
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2022-07-28
override: true
- name: Prepare vcpkg
if: runner.os != 'Windows'
uses: friendlyanon/setup-vcpkg@v1
with: { committish: 51b14cd4e1230dd51c11ffeff6f7d53c61cc5297 }
- uses: actions/cache@v2
id: deps_cache
with:
path: |
deps/
c:/vcpkg
!c:/vcpkg/.git
!c:/vcpkg/buildtrees
!c:/vcpkg/packages
!c:/vcpkg/downloads
key: build-${{ matrix.os }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }}
restore-keys: |
build-${{ matrix.os }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }}
build-${{ matrix.os }}-${{ github.base_ref }}-
build-${{ matrix.os }}-
- name: Build for linux
if: runner.os == 'Linux'
run: |
sudo apt install -y lcov ccache wget libgmp-dev python3-dev
export GCC='gcc-10'
export CXX='g++-10'
bash cpp/tools/install_depends.sh -o ubuntu
mkdir -p cpp/build && cd cpp/build && cmake -DTESTS=ON -DCOVERAGE=ON -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake ../
make -j3
- name: Build for macos
if: runner.os == 'macOS'
run: |
bash cpp/tools/install_depends.sh -o macos
mkdir -p cpp/build && cd cpp/build && cmake -DTESTS=ON -DCOVERAGE=ON -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake ../
make -j3
- name: Test
if: runner.os != 'Windows'
run: |
cd cpp/build && CTEST_OUTPUT_ON_FAILURE=TRUE ctest
make coverage
build_sdk:
name: build sdk
runs-on: ${{ matrix.os }}
continue-on-error: true
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, windows-2019, macos-12]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 5
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2022-07-28
override: true
- name: Prepare vcpkg
if: runner.os != 'Windows'
uses: friendlyanon/setup-vcpkg@v1
with: { committish: 51b14cd4e1230dd51c11ffeff6f7d53c61cc5297 }
- uses: actions/cache@v2
id: deps_cache
with:
path: |
deps/
c:/vcpkg
!c:/vcpkg/.git
!c:/vcpkg/buildtrees
!c:/vcpkg/packages
!c:/vcpkg/downloads
key: build-${{ matrix.os }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }}
restore-keys: |
build-${{ matrix.os }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }}
build-${{ matrix.os }}-${{ github.base_ref }}-
build-${{ matrix.os }}-
- name: Build for windows
if: runner.os == 'Windows'
run: |
mkdir -p cpp/build && cd cpp/build && cmake -DCMAKE_BUILD_TYPE=Release -DTESTS=OFF -DBUILD_SDK=ON -DVCPKG_TARGET_TRIPLET=x64-windows-static -DCMAKE_TOOLCHAIN_FILE=c:/vcpkg/scripts/buildsystems/vcpkg.cmake ../
cmake --build . --parallel 3
- name: Build for linux
if: runner.os == 'Linux'
run: |
sudo apt install -y lcov ccache wget libgmp-dev python3-dev
export GCC='gcc-10'
export CXX='g++-10'
bash cpp/tools/install_depends.sh -o ubuntu
mkdir -p cpp/build && cd cpp/build && cmake -DTESTS=ON -DCOVERAGE=ON -DBUILD_SDK=ON -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake ../
make -j3
- name: Build for macos
if: runner.os == 'macOS'
run: |
bash cpp/tools/install_depends.sh -o macos
mkdir -p cpp/build && cd cpp/build && cmake -DTESTS=ON -DCOVERAGE=ON -DBUILD_SDK=ON -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake ../
make -j3
- name: Test
if: runner.os != 'Windows'
run: |
cd cpp/build && CTEST_OUTPUT_ON_FAILURE=TRUE make test
make coverage
- uses: actions/upload-artifact@v2
if: runner.os == 'macos'
with:
name: libppc-crypto-sdk-jni.dylib
path: ./cpp/ppc-crypto-c-sdk/bindings/java/src/main/resources/META-INF/native/libppc-crypto-sdk-jni.dylib
- uses: actions/upload-artifact@v2
if: runner.os == 'Windows'
with:
name: libppc-crypto-sdk-jni.dylib
path: D:\a\WeDPR-Component\cpp\ppc-crypto-c-sdk\bindings\java\src\main\resources\META-INF\native\Release\ppc-crypto-sdk-jni.dll

build_centos:
name: build_centos full node
runs-on: ${{ matrix.os }}
continue-on-error: true
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
container: docker.io/centos:7
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 5
- uses: actions/cache@v2
id: deps_cache
with:
path: |
/home/runner/.ccache
/Users/runner/.ccache/
deps/
key: centos-notest-${{ matrix.os }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }}
restore-keys: |
centos-notest-${{ matrix.os }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }}
centos-notest-${{ matrix.os }}-${{ github.base_ref }}-
centos-notest-${{ matrix.os }}-
- name: Prepare centos tools
run: |
sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo
sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo
sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo
yum install -y java-11-openjdk-devel git make gcc gcc-c++ glibc-static glibc-devel openssl cmake3 ccache devtoolset-11 llvm-toolset-7.0 rh-perl530-perl libzstd-devel zlib-devel flex bison python-devel python3-devel
yum install -y devtoolset-10 devtoolset-11 llvm-toolset-7 rh-perl530-perl cmake3 zlib-devel ccache lcov python-devel python3-devel
yum install -y https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm
yum install -y git
- name: Prepare vcpkg
if: runner.os != 'Windows'
uses: friendlyanon/setup-vcpkg@v1
with: { committish: 7e3dcf74e37034eea358934a90a11d618520e139 }
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2022-07-28
override: true
- name: Build
run: |
alias cmake='cmake3'
. /opt/rh/devtoolset-10/enable
. /opt/rh/rh-perl530/enable
export LIBCLANG_PATH=/opt/rh/llvm-toolset-7/root/lib64/
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
. /opt/rh/llvm-toolset-7/enable
mkdir -p cpp/build
cd cpp/build
cmake3 -DCMAKE_BUILD_TYPE=Release -DTESTS=ON -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake ../
cmake3 --build . --parallel 3
- name: Test
run: |
export OMP_NUM_THREADS=1
cd build && CTEST_OUTPUT_ON_FAILURE=TRUE make test
- uses: actions/upload-artifact@v2
with:
name: ppc-air-node-centos-x64
path: ./cpp/build/bin/ppc-air-node
- uses: actions/upload-artifact@v2
with:
name: ppc-pro-node-centos-x64
path: ./cpp/build/bin/ppc-pro-node
- uses: actions/upload-artifact@v2
with:
name: ppc-gateway-service-centos-x64
path: ./cpp/build/bin/ppc-gateway-service
- uses: actions/upload-artifact@v2
with:
name: libppc-crypto-sdk-jni.so
path: ./cpp/ppc-crypto-c-sdk/bindings/java/src/main/resources/META-INF/native/libppc-crypto-sdk-jni.so
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "cpp/vcpkg"]
path = cpp/vcpkg
url = https://github.com/microsoft/vcpkg
21 changes: 21 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
### 1.0.0-rc1
(2024-08-21)

**新增**

#### 隐私计算组件

- **PSI**: 实现多种类型隐私求交集算法,包括CM2020, RA2018, ECDH-PSI, ECDH-Multi-PSI等
- **MPC**: 安全多方计算相关组件
- **MPCSQL**: 基于安全多方计算协议,支持联合分析查询任务
- **PIR**: 匿踪查询组件

#### 隐私计算互联互通

- ECDH PSI算法与隐语互联互通

#### 隐私建模组件

- 2+方的多方联合XGB组件(训练 + 离线预测)
- 2+方多方特征工程组件(特征分箱,WOE/IV计算等)
- 预处理组件
26 changes: 25 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,25 @@
# WeDPR-Component
# WeDPR

![](https://wedpr-lab.readthedocs.io/zh_CN/latest/_static/images/wedpr_logo.png)


[![CodeFactor](https://www.codefactor.io/repository/github/webankblockchain/wedpr-component/badge?s=a4c3fb6ffd39e7618378fe13b6bd06c5846cc103)](https://www.codefactor.io/repository/github/webankblockchain/wedpr-component)
[![contributors](https://img.shields.io/github/contributors/WeBankBlockchain/WeDPR)](https://github.com/WeBankBlockchain/WeDPR-Component/graphs/contributors)
[![GitHub activity](https://img.shields.io/github/commit-activity/m/WeBankBlockchain/WeDPR-Component)](https://github.com/WeBankBlockchain/WeDPR-Component/pulse)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)

微众银行多方大数据隐私计算平台[WeDPR](https://github.com/WeBankBlockchain/WeDPR)核心组件库,包括:

- 丰富的隐私计算算法组件,支持隐私求交集、匿踪查询、多方联合分析(隐私SQL)、数据预处理、隐私建模和预测等能力,以满足多样化的业务场景
- 统一网关:稳定的跨机构网络通信组件,支持基于Rip协议的路由转发协议


## 技术文档

- [文档](https://wedpr-lab.readthedocs.io/zh-cn/latest/)
- [代码](https://github.com/WeBankBlockchain/WeDPR-Component)


## License

WeDPR-Component的开源协议为Apache License 2.0, 详情参见[LICENSE](LICENSE)
Loading

0 comments on commit 34befa0

Please sign in to comment.