-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e244b38
commit e6f6e37
Showing
2 changed files
with
76 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,9 +63,7 @@ jobs: | |
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 ../ || cat *.log || cat /Users/runner/work/WeDPR-Component/WeDPR-Component/vcpkg/buildtrees/libhdfs3/config-x64-osx-dbg-err.log | ||
make -j3 | ||
- name: Build for macos | ||
mkdir -p cpp/build && cd cpp/build && cmake -DTESTS=ON -DCOVERAGE=ON -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake ../ | ||
if: runner.os == 'macOS' | ||
run: | | ||
bash cpp/tools/install_depends.sh -o macos | ||
|
@@ -117,22 +115,22 @@ jobs: | |
- name: Build for windows | ||
if: runner.os == 'Windows' | ||
run: | | ||
mkdir -p cpp/build && cd cpp/build && cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_BUILD_TYPE=Release -DTESTS=OFF -DBUILD_SDK=ON -DVCPKG_TARGET_TRIPLET=x64-windows-static -DCMAKE_TOOLCHAIN_FILE=c:/vcpkg/scripts/buildsystems/vcpkg.cmake .. && MSBuild /version && MSBuild wedpr-component.sln /p:Configuration=Release /p:Platform=x64 || cat *.log | ||
mkdir -p cpp/build && cd cpp/build && cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_BUILD_TYPE=Release -DTESTS=OFF -DBUILD_SDK=ON -DVCPKG_TARGET_TRIPLET=x64-windows-static -DCMAKE_TOOLCHAIN_FILE=c:/vcpkg/scripts/buildsystems/vcpkg.cmake .. && MSBuild /version && MSBuild wedpr-component.sln /p:Configuration=Release /p:Platform=x64 | ||
- 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 ../ || cat *.log | ||
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: | | ||
brew install lcov | ||
bash cpp/tools/install_depends.sh -o macos | ||
mkdir -p cpp/build && cd cpp/build && cmake -DTESTS=ON -DCOVERAGE=OFF -DBUILD_SDK=ON -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake ../ || cat *.log | ||
mkdir -p cpp/build && cd cpp/build && cmake -DTESTS=ON -DCOVERAGE=OFF -DBUILD_SDK=ON -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake ../ | ||
make -j3 | ||
- name: Test | ||
if: runner.os == 'macOS' | ||
|
@@ -153,6 +151,75 @@ jobs: | |
name: libppc-crypto-sdk-jni.dll | ||
path: D:\a\WeDPR-Component\cpp\wedpr-component-sdk\bindings\java\src\main\resources\META-INF\native\Release\ppc-crypto-sdk-jni.dll | ||
|
||
build_wedpr_toolkit: | ||
name: build wedpr toolkit | ||
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/ | ||
${{ env.VCPKG_ROOT }} | ||
${{ env.VCPKG_ROOT }}/.git | ||
${{ env.VCPKG_ROOT }}/buildtrees | ||
${{ env.VCPKG_ROOT }}/packages | ||
${{ env.VCPKG_ROOT }}/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: Add MSbuild to PATH | ||
if: runner.os == 'Windows' | ||
uses: microsoft/[email protected] | ||
- name: Build for windows | ||
if: runner.os == 'Windows' | ||
run: | | ||
mkdir -p cpp/build && cd cpp/build && cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_BUILD_TYPE=Release -DTESTS=OFF -DBUILD_WEDPR_TOOLKIT=ON -DVCPKG_TARGET_TRIPLET=x64-windows-static -DCMAKE_TOOLCHAIN_FILE=c:/vcpkg/scripts/buildsystems/vcpkg.cmake .. && MSBuild /version && MSBuild wedpr-component.sln /p:Configuration=Release /p:Platform=x64 | ||
- 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 -DBUILD_WEDPR_TOOLKIT=ON -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake ../ | ||
make -j3 | ||
- name: Build for macos | ||
if: runner.os == 'macOS' | ||
run: | | ||
brew install lcov | ||
bash cpp/tools/install_depends.sh -o macos | ||
mkdir -p cpp/build && cd cpp/build && cmake -DBUILD_WEDPR_TOOLKIT=ON -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake ../ | ||
make -j3 | ||
- uses: actions/upload-artifact@v4 | ||
if: runner.os == 'macos' | ||
with: | ||
name: libwedpr_java_transport_jni.dylib | ||
path: ./cpp/wedpr-transport/sdk-wrapper/java/bindings/src/main/resources/META-INF/native/libwedpr_java_transport_jni.dylib | ||
- uses: actions/upload-artifact@v4 | ||
if: runner.os == 'Windows' | ||
with: | ||
name: libwedpr_java_transport_jni.dll | ||
path: D:\a\WeDPR-Component\cpp\wedpr-transport\sdk-wrapper\java\bindings\src\main\resources\META-INF\native\Release\libwedpr_java_transport_jni.dll | ||
|
||
|
||
build_centos: | ||
name: build_centos full node | ||
|
@@ -210,8 +277,8 @@ jobs: | |
. /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 ../ || cat *.log | ||
cmake3 --build . --parallel 3 || cat *.log | ||
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 | ||
|
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