diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 4bb2186..86fcc40 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -1,4 +1,4 @@ -name: Java-SDK GitHub Actions +name: SolcJ GitHub Actions on: push: pull_request: @@ -9,18 +9,42 @@ jobs: build: name: build runs-on: ${{ matrix.os }} + continue-on-error: true strategy: + fail-fast: false matrix: - os: [ubuntu-18.04, ubuntu-16.04, macos-latest] + os: [ubuntu-20.04, ubuntu-22.04, windows-2019, macos-12] steps: - uses: actions/checkout@v2 with: fetch-depth: 5 + - name: install Ubuntu dependencies + if: runner.os == 'Linux' + run: sudo apt update && sudo apt install -y git curl libssl-dev default-jdk build-essential - name: install macOS dependencies if: runner.os == 'macOS' run: brew install openssl@1.1 openjdk - - name: install Ubuntu dependencies - if: runner.os == 'Linux' - run: sudo apt-get update && sudo apt install -y git default-jdk + - name: run build test + if: runner.os == 'Windows' + run: ./gradlew.bat build + - name: run integration testing + if: runner.os != 'Windows' + run: /bin/bash .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:7 + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 5 + - name: install CentOS dependencies + run: yum install -y epel-release centos-release-scl which git openssl-devel openssl java java-devel - name: run integration testing run: /bin/bash .ci/ci_check.sh \ No newline at end of file diff --git a/.gitignore b/.gitignore index 7049bbb..de79884 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,10 @@ build dist bin out +gpg.gpg +gradle.properties +log4j.properties +log** + +## macOS +.DS_Store \ No newline at end of file diff --git a/build.gradle b/build.gradle index 97d9bc6..f0cd3c7 100644 --- a/build.gradle +++ b/build.gradle @@ -54,7 +54,7 @@ dependencies { archivesBaseName = 'solcJ' group = 'org.fisco-bcos' -version = '0.8.11.1' +version = '0.8.11.2-SNAPSHOT' // Additional attribute definition ext { diff --git a/src/main/java/org/fisco/solc/compiler/SolidityCompiler.java b/src/main/java/org/fisco/solc/compiler/SolidityCompiler.java index 2d5945d..0f509a9 100644 --- a/src/main/java/org/fisco/solc/compiler/SolidityCompiler.java +++ b/src/main/java/org/fisco/solc/compiler/SolidityCompiler.java @@ -45,7 +45,7 @@ private void initSolc(boolean sm) { */ public static Result compile(File source, boolean sm, boolean combinedJson, Option... options) throws IOException { - return getInstance().compileSrc(source, sm, true, combinedJson, options); + return getInstance().compileSrc(source, sm, false, combinedJson, options); } /** @@ -386,6 +386,9 @@ private List prepareCommandOptions( commandParts.add(option.getValue()); } } + for (Option option : getElementsOf(NameOnlyOption.class, options)) { + commandParts.add("--" + option.getName()); + } // new in solidity 0.5.0: using stdin requires an explicit "-". The following output // of 'solc' if no file is provided, e.g.,: solc --combined-json abi,bin,interface,metadata //