Skip to content

Commit

Permalink
<fix>(compiler): fix compiler use optimize by default. (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
kyonRay authored Dec 25, 2023
1 parent 97c5a64 commit a4d75f6
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 7 deletions.
34 changes: 29 additions & 5 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Java-SDK GitHub Actions
name: SolcJ GitHub Actions
on:
push:
pull_request:
Expand All @@ -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 [email protected] 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
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,10 @@ build
dist
bin
out
gpg.gpg
gradle.properties
log4j.properties
log**

## macOS
.DS_Store
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/org/fisco/solc/compiler/SolidityCompiler.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down Expand Up @@ -386,6 +386,9 @@ private List<String> 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
//
Expand Down

0 comments on commit a4d75f6

Please sign in to comment.