diff --git a/.ci/ci_check.sh b/.ci/ci_check.sh index 24a0c824..de2b110c 100755 --- a/.ci/ci_check.sh +++ b/.ci/ci_check.sh @@ -76,9 +76,12 @@ prepare_environment() build_node() { - curl -LO https://github.com/FISCO-BCOS/console/releases/download/v3.0.0/get_account.sh - curl -LO https://github.com/FISCO-BCOS/console/releases/download/v3.0.0/get_gm_account.sh - bash build_chain.sh -l 127.0.0.1:4 ${@} -e ./fisco-bcos + cp ./tools/get_account.sh . + cp ./tools/get_gm_account.sh . + mkdir -p ~/.fisco + cp ./tools/get_account.sh ~/.fisco/ + cp ./tools/get_gm_account.sh ~/.fisco/ + bash -x build_chain.sh -l 127.0.0.1:4 ${@} -e ./fisco-bcos ./nodes/127.0.0.1/fisco-bcos -v ./nodes/127.0.0.1/start_all.sh } diff --git a/.circleci/config.yml b/.circleci/config.yml index 14882f63..b38e8f8e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -19,6 +19,7 @@ jobs: - run: name: Compile command: | + export JAVA_HOME=$(dirname $(dirname $(readlink $(readlink $(which java)))) bash gradlew build - run: name: Integration Test diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 0b15ca70..e2fdacb6 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-20.04, ubuntu-22.04, windows-2019, macos-12] + os: [ubuntu-22.04, windows-2025, macos-latest] steps: - uses: actions/checkout@v2 with: @@ -37,32 +37,32 @@ jobs: if: runner.os != 'Windows' run: /bin/bash -x .ci/ci_check.sh - build-centos: - name: build-centos - runs-on: ${{ matrix.os }} - continue-on-error: true - strategy: - fail-fast: false - matrix: - os: [ ubuntu-20.04 ] - container: docker.io/centos:latest - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 5 - - name: install CentOS dependencies - run: | - cd /etc/yum.repos.d/ - sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* - sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* - yum update -y - yum install -y which git openssl-devel openssl wget - - name: Set up JDK 1.8 - uses: actions/setup-java@v3 - with: - distribution: 'zulu' - java-version: '8.0.382' - - name: run integration testing - run: /bin/bash -x .ci/ci_check.sh - - name: upload coverage - run: curl -LO https://codecov.io/bash && /bin/bash ./bash +# build-centos: +# name: build-centos +# runs-on: ${{ matrix.os }} +# continue-on-error: true +# strategy: +# fail-fast: false +# matrix: +# os: [ ubuntu-22.04 ] +# container: docker.io/centos:latest +# steps: +# - uses: actions/checkout@v2 +# with: +# fetch-depth: 5 +# - name: install CentOS dependencies +# run: | +# cd /etc/yum.repos.d/ +# sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* +# sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* +# yum update -y +# yum install -y which git openssl-devel openssl wget +# - name: Set up JDK 1.8 +# uses: actions/setup-java@v3 +# with: +# distribution: 'zulu' +# java-version: '8.0.382' +# - name: run integration testing +# run: /bin/bash -x .ci/ci_check.sh +# - name: upload coverage +# run: curl -LO https://codecov.io/bash && /bin/bash ./bash diff --git a/build.gradle b/build.gradle index e9bd4ad9..a19f9b84 100644 --- a/build.gradle +++ b/build.gradle @@ -16,8 +16,8 @@ targetCompatibility = 1.8 repositories { mavenCentral() maven { url "https://maven.aliyun.com/nexus/content/groups/public/" } - maven { url "https://oss.sonatype.org/service/local/staging/deploy/maven2" } - maven { url "https://oss.sonatype.org/content/repositories/snapshots" } + maven { url "https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/" } + maven { url "https://central.sonatype.com/repository/maven-snapshots/" } } googleJavaFormat { @@ -50,16 +50,17 @@ dependencies { exclude group: "org.slf4j" } implementation('commons-cli:commons-cli:1.5.0') - implementation('org.jline:jline:3.21.0') + implementation('org.jline:jline:3.30.6') implementation('io.bretty:console-table-builder:1.2') implementation('com.github.jsqlparser:jsqlparser:2.0') implementation('org.fisco-bcos.code-generator:bcos-code-generator:1.6.0') { exclude group: "org.fisco-bcos.java-sdk" exclude group: "org.slf4j" } - implementation ('com.fasterxml.jackson.core:jackson-databind:2.14.3'){ + implementation ('com.fasterxml.jackson.core:jackson-databind:2.20.1'){ force true } + implementation("com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.20.1") testImplementation('com.github.stefanbirkner:system-rules:1.19.0') testImplementation('junit:junit:4.13.2') } diff --git a/tools/get_account.sh b/tools/get_account.sh index 1b191171..33f52279 100755 --- a/tools/get_account.sh +++ b/tools/get_account.sh @@ -55,16 +55,23 @@ LOG_INFO() } check_env() { - [ ! -z "$(openssl version | grep 1.0.2)" ] || [ ! -z "$(openssl version | grep 1.1)" ] || [ ! -z "$(openssl version | grep '3.')" ] || [ ! -z "$(openssl version | grep reSSL)" ] || { + if ! command -v openssl >/dev/null 2>&1; then echo "please install openssl! use \"openssl version\" command to check." LOG_INFO " Ubuntu : sudo apt install -y openssl" LOG_INFO " CentOS : sudo yum install -y openssl" - LOG_INFO " macOS : brew install -y openssl" + LOG_INFO " macOS : brew install openssl" exit 1 - } - if [ ! -z "$(openssl version | grep reSSL)" ];then - export PATH="/usr/local/opt/openssl/bin:$PATH" fi + + if openssl version 2>/dev/null | grep -E -q '1\.0\.2|1\.1|^OpenSSL 3|reSSL'; then + return 0 + fi + + echo "please install openssl! use \"openssl version\" command to check." + LOG_INFO " Ubuntu : sudo apt install -y openssl" + LOG_INFO " CentOS : sudo yum install -y openssl" + LOG_INFO " macOS : brew install openssl" + exit 1 } calculate_address_pem()