Skip to content

Commit 1540968

Browse files
authored
fix ci (#87)
* add tests for grpc * fix ci * use fisco registry vcpkg
1 parent 0c62b3f commit 1540968

File tree

21 files changed

+101
-10
lines changed

21 files changed

+101
-10
lines changed

.github/workflows/cpp_full_node_workflow.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ jobs:
7474
bash -x cpp/tools/install_depends.sh -o macos
7575
mkdir -p cpp/build && cd cpp/build && cmake -DBUILD_STATIC=ON -DTESTS=ON -DCOVERAGE=ON -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake ../
7676
make -j3
77+
- name: Publish Error
78+
if: always()
79+
uses: actions/upload-artifact@v4
80+
with:
81+
name: gperftools-build-err.log
82+
path: /home/runner/work/WeDPR-Component/WeDPR-Component/cpp/deps/src/gperftools-stamp/gperftools-build-err.log
7783
- uses: actions/upload-artifact@v4
7884
if: runner.os == 'macOS'
7985
with:
@@ -171,6 +177,9 @@ jobs:
171177
du -sch /usr/local/share/vcpkg/buildtrees/grpc/src/*
172178
rm -rf /usr/local/share/vcpkg/buildtrees/grpc/src
173179
rm -rf /usr/local/share/vcpkg/buildtrees/grpc/*-dbg
180+
rm -rf /usr/local/share/vcpkg/buildtrees/openssl/src
181+
rm -rf /usr/local/share/vcpkg/buildtrees/openssl/*-dbg
182+
rm -rf /usr/local/share/vcpkg/buildtrees/*/*-dbg
174183
df -lh
175184
- name: Compile
176185
run: |

cpp/cmake/python.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ message("Python_Development_FOUND:${Python_Development_FOUND}")
99
message("Python_LIBRARIES:${Python_LIBRARIES}")
1010
message("Python_INCLUDE_DIRS:${Python_INCLUDE_DIRS}")
1111

12-
list(APPEND CMAKE_SWIG_FLAGS "-DPY3")
12+
list(APPEND CMAKE_SWIG_FLAGS "-D${Python_LIBRARIES}")
13+
message("## CMAKE_SWIG_FLAGS: ${CMAKE_SWIG_FLAGS}")
1314

1415
function(search_python_module)
1516
set(options NO_VERSION)

cpp/test-utils/TaskMock.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,8 @@
1919
*/
2020
#pragma once
2121
#include "ppc-framework/protocol/Task.h"
22-
#include "ppc-io/src/FileLineReader.h"
2322
#include <boost/test/unit_test.hpp>
2423

25-
using namespace ppc::io;
2624
using namespace ppc::protocol;
2725
namespace ppc::test
2826
{
@@ -91,4 +89,4 @@ inline void checkTask(Task::Ptr _task1, Task::Ptr _task2)
9189
checkParty(it.second, _task2->getPartyByID(it.first));
9290
}
9391
}
94-
} // namespace ppc::test
92+
} // namespace ppc::test

cpp/tools/install_depends.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,24 @@ install_ubuntu_depends()
111111
LOG_INFO "install depends for ubuntu success ..."
112112
}
113113

114+
install_iconv_depend()
115+
{
116+
LOG_INFO "download and install libiconv..."
117+
wget --no-check-certificate https://mirrors.tuna.tsinghua.edu.cn/gnu/libiconv/libiconv-1.16.tar.gz && tar -xvf libiconv-1.16.tar.gz
118+
119+
cd libiconv-1.16 && ./configure --with-pic && make -j4 && make install
120+
cd .. && rm -rf libiconv-1.16*
121+
df -lh
122+
LOG_INFO "download and install libiconv success..."
123+
}
124+
114125
install_macos_depends()
115126
{
116127
LOG_INFO "install depends for macos ..."
117128
brew install autoconf nasm lcov
129+
brew link libiconv
118130
install_gsasl_depend "macos"
131+
install_iconv_depend
119132
LOG_INFO "install depends for macos success ..."
120133
}
121134

cpp/vcpkg-configuration.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"bcos-utilities",
1010
"bcos-boostssl",
1111
"tarscpp",
12-
"libhdfs3"
12+
"libhdfs3",
13+
"tbb"
1314
]
1415
}
1516
]

cpp/vcpkg.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@
118118
},
119119
"tarscpp",
120120
"tbb",
121-
"libxml2"
121+
"libxml2",
122+
"libiconv"
122123
]
123124
},
124125
"sdk": {

cpp/wedpr-computing/ppc-psi/tests/bs-ecdh-psi/TestBsEcdhCache.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
*/
2020

2121
#include "ppc-io/src/DataResourceLoaderImpl.h"
22+
#include "ppc-io/src/FileLineReader.h"
2223
#include "ppc-psi/src/bs-ecdh-psi/BsEcdhPSIFactory.h"
2324
#include "ppc-psi/src/bs-ecdh-psi/core/BsEcdhCache.h"
2425
#include "test-utils/FakeFront.h"

cpp/wedpr-computing/ppc-psi/tests/cm2020-psi/FakeCM2020PSIFactory.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818
* @date 2022-12-19
1919
*/
2020
#pragma once
21-
2221
#include "ppc-crypto-core/src/hash/BLAKE2bHash.h"
2322
#include "ppc-crypto/src/ecc/Ed25519EccCrypto.h"
2423
#include "ppc-framework/crypto/CryptoBox.h"
2524
#include "ppc-io/src/DataResourceLoaderImpl.h"
25+
#include "ppc-io/src/FileLineReader.h"
2626
#include "ppc-tools/src/config/PPCConfig.h"
2727
#include "test-utils/FakeFront.h"
2828
#include <ppc-psi/src/cm2020-psi/CM2020PSIFactory.h>

cpp/wedpr-computing/ppc-psi/tests/cm2020-psi/TestCM2020Impl.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
*/
2020

2121
#include "FakeCM2020PSIFactory.h"
22+
#include "ppc-io/src/FileLineReader.h"
2223
#include "ppc-psi/src/cm2020-psi/CM2020PSIImpl.h"
2324
#include "protocol/src/JsonTaskImpl.h"
2425
#include "test-utils/FakeFront.h"
@@ -29,6 +30,7 @@
2930
#include <boost/test/unit_test.hpp>
3031

3132
using namespace ppc::psi;
33+
using namespace ppc::io;
3234
using namespace bcos;
3335
using namespace bcos::test;
3436
using namespace ppc::crypto;

cpp/wedpr-computing/ppc-psi/tests/labeled-psi/FakeLabeledPSIFactory.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@
2323
#include "ppc-crypto/src/ecc/Ed25519EccCrypto.h"
2424
#include "ppc-framework/crypto/CryptoBox.h"
2525
#include "ppc-io/src/DataResourceLoaderImpl.h"
26+
#include "ppc-io/src/FileLineReader.h"
2627
#include "ppc-tools/src/config/PPCConfig.h"
2728
#include "test-utils/FakeFront.h"
2829
#include <ppc-psi/src/labeled-psi/LabeledPSIFactory.h>
29-
3030
using namespace bcos;
3131
using namespace ppc::protocol;
3232
using namespace ppc::psi;

0 commit comments

Comments
 (0)