Skip to content

Commit

Permalink
<fix>(jni): update jni version to 3.7.1, update fisco-bcos-cpp-sdk to…
Browse files Browse the repository at this point in the history
… 3.12.1.
  • Loading branch information
kyonRay committed Dec 12, 2024
1 parent d816c8b commit ebd7e6f
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 28 deletions.
33 changes: 24 additions & 9 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macos-12 ]
os: [ macos-13 ]
# env:
# VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
steps:
Expand Down Expand Up @@ -134,32 +134,47 @@ jobs:
build_with_centos:
name: build_with_centos
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
container:
- centos-7.9
container:
image: docker.io/centos:7
volumes:
- /usr/local/share/vcpkg:/usr/local/share/vcpkg
# env:
- /node20217:/node20217:rw,rshared
- ${{ matrix.container == 'centos-7.9' && '/node20217:/__e/node20:ro,rshared' || ' ' }}
# env:
# VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
steps:
- uses: actions/checkout@v3
- name: install nodejs20glibc2.17
if: ${{ matrix.container == 'centos-7.9' }}
run: |
curl -LO https://unofficial-builds.nodejs.org/download/release/v20.9.0/node-v20.9.0-linux-x64-glibc-217.tar.xz
tar -xf node-v20.9.0-linux-x64-glibc-217.tar.xz --strip-components 1 -C /node20217
- uses: actions/checkout@v4
with:
fetch-depth: 5
- name: install rust language
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2021-06-17
toolchain: nightly-2022-07-28
override: true
- uses: actions/cache@v3
id: cache
id: deps_cache
with:
path: |
deps/
/usr/local/share/vcpkg/buildtrees
/usr/local/share/vcpkg/packages
key: vcpkg-centos-v1-notest-${{ runner.temp }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }}
/home/runner/.ccache
/Users/runner/.ccache/
key: centos-notest-all-${{ matrix.os }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/cpp_full_node_workflow.yml') }}
restore-keys: |
vcpkg-centos-v1-notest-${{ runner.temp }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }}
vcpkg-centos-v1-notest-${{ runner.temp }}-${{ github.base_ref }}-
vcpkg-centos-v1-notest-${{ runner.temp }}-
centos-notest-all-${{ matrix.os }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/cpp_full_node_workflow.yml') }}
centos-notest-all-${{ matrix.os }}-${{ github.base_ref }}-
centos-notest-all-${{ matrix.os }}-
- name: install CentOS dependencies
run: |
rpm -ivh https://cbs.centos.org/kojifiles/packages/centos-release-scl-rh/2/3.el7.centos/noarch/centos-release-scl-rh-2-3.el7.centos.noarch.rpm
Expand Down
1 change: 1 addition & 0 deletions bcos-c-sdk/bcos_sdk_c_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "bcos_sdk_c_error.h"
#include <bcos-utilities/Common.h>
#include <bcos-utilities/Error.h>
#include <bcos-utilities/BoostLog.h>

using namespace bcos;

Expand Down
2 changes: 1 addition & 1 deletion bindings/java/jni/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ dependencies {

archivesBaseName = 'bcos-sdk-jni'
group = 'org.fisco-bcos'
version = '3.7.0'
version = '3.7.1'

// Additional attribute definition
ext {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package org.fisco.bcos.sdk.jni.perf;

import org.fisco.bcos.sdk.jni.common.JniException;
import org.fisco.bcos.sdk.jni.utilities.keypair.JniKeyPair;
import org.fisco.bcos.sdk.jni.utilities.keypair.KeyPairJniObj;
import org.fisco.bcos.sdk.jni.utilities.tx.TransactionBuilderJniObj;
import org.fisco.bcos.sdk.jni.utilities.tx.TxPair;
Expand Down Expand Up @@ -78,9 +76,9 @@ public static void Usage() {
}

public static void main(String[] args) throws Throwable {
// if (args.length < 2) {
// Usage();
// }
// if (args.length < 2) {
// Usage();
// }

boolean smCrypto = false;
long durationMS = 1000000;
Expand All @@ -106,15 +104,7 @@ public static void main(String[] args) throws Throwable {
keypairWrapper.finalize();
TxPair signedTransaction =
TransactionBuilderJniObj.createSignedTransaction(
keypair,
groupID,
chainID,
"",
data,
"",
blockLimit,
0,
"");
keypair, groupID, chainID, "", data, "", blockLimit, 0, "");
String txHash = signedTransaction.getSignedTx();

nTotalC++;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ public static native TxPair createSignedTransaction(
throws JniException;

public static native TxPair createSignedTransaction(
long txBuilderService, JniKeyPair keyPair, String to, String data, String abi, int attribute)
long txBuilderService,
JniKeyPair keyPair,
String to,
String data,
String abi,
int attribute)
throws JniException;
}
2 changes: 1 addition & 1 deletion sample/rpc/repeat_connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void* thread_function(void* arg)
bcos_sdk_start(sdk);

bcos_rpc_get_block_number(sdk, (char*)"group0", NULL, on_recv_resp_callback, sdk);
usleep(1000);
sleep(1);

bcos_sdk_stop(sdk);
bcos_sdk_destroy(sdk);
Expand Down
4 changes: 2 additions & 2 deletions vcpkg-configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"registries": [
{
"kind": "git",
"repository": "https://gh-proxy.com/https://github.com/FISCO-BCOS/registry",
"baseline": "ede020c4c2538ca9cc6bd31f22ded572768184c5",
"repository": "https://github.com/FISCO-BCOS/registry",
"baseline": "cca5531387b451a89aec525174addac4cb8f1371",
"packages": [
"openssl",
"hsm-crypto",
Expand Down

0 comments on commit ebd7e6f

Please sign in to comment.