Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1d4f565

Browse files
authored
Merge pull request argotorg#5416 from ethereum/develop
Merge develop into release for 0.5.0
2 parents 59dbf8f + 91b6b8a commit 1d4f565

File tree

1,974 files changed

+46207
-28258
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,974 files changed

+46207
-28258
lines changed

.circleci/config.yml

Lines changed: 332 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,332 @@
1+
defaults:
2+
# The default for tags is to not run, so we have to explicitly match a filter.
3+
- build_on_tags: &build_on_tags
4+
filters:
5+
tags:
6+
only: /.*/
7+
- setup_prerelease_commit_hash: &setup_prerelease_commit_hash
8+
name: Store commit hash and prerelease
9+
command: |
10+
if [ "$CIRCLE_BRANCH" = release -o -n "$CIRCLE_TAG" ]; then echo -n > prerelease.txt; else date -u +"nightly.%Y.%-m.%-d" > prerelease.txt; fi
11+
echo -n "$CIRCLE_SHA1" > commit_hash.txt
12+
- run_build: &run_build
13+
name: Build
14+
command: |
15+
mkdir -p build
16+
cd build
17+
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo $CMAKE_OPTIONS
18+
make -j4
19+
- run_tests: &run_tests
20+
name: Tests
21+
command: scripts/tests.sh --junit_report test_results
22+
- solc_artifact: &solc_artifact
23+
path: build/solc/solc
24+
destination: solc
25+
- all_artifacts: &all_artifacts
26+
root: build
27+
paths:
28+
- solc/solc
29+
- test/soltest
30+
- test/tools/solfuzzer
31+
32+
version: 2
33+
jobs:
34+
build_emscripten:
35+
docker:
36+
- image: trzeci/emscripten:sdk-tag-1.37.21-64bit
37+
environment:
38+
TERM: xterm
39+
steps:
40+
- checkout
41+
- restore_cache:
42+
name: Restore Boost build
43+
key: &boost-cache-key emscripten-boost-{{ checksum "scripts/travis-emscripten/install_deps.sh" }}{{ checksum "scripts/travis-emscripten/build_emscripten.sh" }}
44+
- run:
45+
name: Bootstrap Boost
46+
command: |
47+
scripts/travis-emscripten/install_deps.sh
48+
- run:
49+
name: Build
50+
command: |
51+
scripts/travis-emscripten/build_emscripten.sh
52+
- save_cache:
53+
name: Save Boost build
54+
key: *boost-cache-key
55+
paths:
56+
- boost_1_57_0
57+
- store_artifacts:
58+
path: build/libsolc/soljson.js
59+
destination: soljson.js
60+
- run: mkdir -p workspace
61+
- run: cp build/libsolc/soljson.js workspace/soljson.js
62+
- run: scripts/get_version.sh > workspace/version.txt
63+
- persist_to_workspace:
64+
root: workspace
65+
paths:
66+
- soljson.js
67+
- version.txt
68+
test_emscripten_solcjs:
69+
docker:
70+
- image: trzeci/emscripten:sdk-tag-1.37.21-64bit
71+
environment:
72+
TERM: xterm
73+
steps:
74+
- checkout
75+
- attach_workspace:
76+
at: /tmp/workspace
77+
- run:
78+
name: Install external tests deps
79+
command: |
80+
apt-get -qq update
81+
apt-get -qy install netcat curl
82+
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.4/install.sh | NVM_DIR=/usr/local/nvm bash
83+
export NVM_DIR="/usr/local/nvm"
84+
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
85+
nvm --version
86+
nvm install 8
87+
node --version
88+
npm --version
89+
- run:
90+
name: Test solcjs
91+
command: |
92+
. /usr/local/nvm/nvm.sh
93+
test/solcjsTests.sh /tmp/workspace/soljson.js $(cat /tmp/workspace/version.txt)
94+
test_emscripten_external:
95+
docker:
96+
- image: trzeci/emscripten:sdk-tag-1.37.21-64bit
97+
environment:
98+
TERM: xterm
99+
steps:
100+
- checkout
101+
- attach_workspace:
102+
at: /tmp/workspace
103+
- run:
104+
name: Install external tests deps
105+
command: |
106+
apt-get -qq update
107+
apt-get -qy install netcat curl
108+
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.4/install.sh | NVM_DIR=/usr/local/nvm bash
109+
export NVM_DIR="/usr/local/nvm"
110+
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
111+
nvm --version
112+
nvm install 8
113+
node --version
114+
npm --version
115+
- run:
116+
name: External tests
117+
command: |
118+
. /usr/local/nvm/nvm.sh
119+
test/externalTests.sh /tmp/workspace/soljson.js || test/externalTests.sh /tmp/workspace/soljson.js
120+
build_x86_linux:
121+
docker:
122+
- image: buildpack-deps:artful
123+
environment:
124+
TERM: xterm
125+
CMAKE_OPTIONS: -DCOVERAGE=OFF
126+
steps:
127+
- checkout
128+
- run:
129+
name: Install build dependencies
130+
command: |
131+
apt-get -qq update
132+
apt-get -qy install cmake libboost-regex-dev libboost-filesystem-dev libboost-test-dev libboost-system-dev libboost-program-options-dev libz3-dev
133+
./scripts/install_obsolete_jsoncpp_1_7_4.sh
134+
- run: *setup_prerelease_commit_hash
135+
- run: *run_build
136+
- store_artifacts: *solc_artifact
137+
- persist_to_workspace:
138+
root: build
139+
paths:
140+
- "*"
141+
142+
build_x86_clang7:
143+
docker:
144+
- image: buildpack-deps:cosmic
145+
environment:
146+
TERM: xterm
147+
CC: /usr/bin/clang-7
148+
CXX: /usr/bin/clang++-7
149+
steps:
150+
- checkout
151+
- run:
152+
name: Install build dependencies
153+
command: |
154+
apt-get -qq update
155+
apt-get -qy install clang-7 cmake libboost-regex-dev libboost-filesystem-dev libboost-test-dev libboost-system-dev libboost-program-options-dev libz3-dev
156+
./scripts/install_obsolete_jsoncpp_1_7_4.sh
157+
- run: *setup_prerelease_commit_hash
158+
- run: *run_build
159+
- store_artifacts: *solc_artifact
160+
- persist_to_workspace:
161+
root: build
162+
paths:
163+
- "*"
164+
165+
build_x86_mac:
166+
macos:
167+
xcode: "10.0.0"
168+
environment:
169+
TERM: xterm
170+
steps:
171+
- checkout
172+
- run:
173+
name: Install build dependencies
174+
command: |
175+
brew update
176+
brew upgrade
177+
brew unlink python
178+
brew install z3
179+
brew install boost
180+
brew install cmake
181+
brew install wget
182+
./scripts/install_obsolete_jsoncpp_1_7_4.sh
183+
- run: *setup_prerelease_commit_hash
184+
- run: *run_build
185+
- store_artifacts: *solc_artifact
186+
- persist_to_workspace: *all_artifacts
187+
188+
test_check_spelling:
189+
docker:
190+
- image: circleci/python:3.6
191+
environment:
192+
TERM: xterm
193+
steps:
194+
- checkout
195+
- attach_workspace:
196+
at: build
197+
- run:
198+
name: Install dependencies
199+
command: |
200+
pip install --user codespell
201+
- run:
202+
name: Check spelling
203+
command: ~/.local/bin/codespell -S "*.enc,.git" -I ./scripts/codespell_whitelist.txt
204+
205+
test_check_style:
206+
docker:
207+
- image: buildpack-deps:artful
208+
steps:
209+
- checkout
210+
- run:
211+
name: Check for trailing whitespace
212+
command: ./scripts/check_style.sh
213+
214+
test_buglist:
215+
docker:
216+
- image: circleci/node
217+
environment:
218+
TERM: xterm
219+
steps:
220+
- checkout
221+
- run:
222+
name: JS deps
223+
command: |
224+
npm install download
225+
npm install JSONPath
226+
npm install mktemp
227+
- run:
228+
name: Test buglist
229+
command: ./test/buglistTests.js
230+
231+
test_x86_linux:
232+
docker:
233+
- image: buildpack-deps:artful
234+
environment:
235+
TERM: xterm
236+
steps:
237+
- checkout
238+
- attach_workspace:
239+
at: build
240+
- run:
241+
name: Install dependencies
242+
command: |
243+
apt-get -qq update
244+
apt-get -qy install libz3-dev libleveldb1v5 python-pip
245+
pip install codecov
246+
- run: mkdir -p test_results
247+
- run:
248+
name: Test type checker
249+
command: build/test/soltest -t 'syntaxTest*' -- --no-ipc --testpath test
250+
- run:
251+
name: Coverage of type checker
252+
command: codecov --flags syntax --gcov-root build
253+
- run: *run_tests
254+
- run:
255+
name: Coverage of all
256+
command: codecov --flags all --gcov-root build
257+
- store_test_results:
258+
path: test_results/
259+
- store_artifacts:
260+
path: test_results/
261+
destination: test_results/
262+
263+
test_x86_mac:
264+
macos:
265+
xcode: "10.0.0"
266+
environment:
267+
TERM: xterm
268+
steps:
269+
- checkout
270+
- attach_workspace:
271+
at: build
272+
- run:
273+
name: Install dependencies
274+
command: |
275+
brew update
276+
brew upgrade
277+
brew unlink python
278+
brew install z3
279+
- run: mkdir -p test_results
280+
- run: *run_tests
281+
- store_test_results:
282+
path: test_results/
283+
- store_artifacts:
284+
path: test_results/
285+
destination: test_results/
286+
287+
docs:
288+
docker:
289+
- image: buildpack-deps:artful
290+
steps:
291+
- checkout
292+
- run:
293+
name: Install build dependencies
294+
command: |
295+
apt-get -qq update
296+
apt-get -qy install python-sphinx python-pip
297+
- run: *setup_prerelease_commit_hash
298+
- run:
299+
name: Build documentation
300+
command: ./scripts/docs.sh
301+
- store_artifacts:
302+
path: docs/_build/html/
303+
destination: docs-html
304+
305+
workflows:
306+
version: 2
307+
build_all:
308+
jobs:
309+
- test_check_spelling: *build_on_tags
310+
- test_check_style: *build_on_tags
311+
- test_buglist: *build_on_tags
312+
- build_emscripten: *build_on_tags
313+
- test_emscripten_solcjs:
314+
<<: *build_on_tags
315+
requires:
316+
- build_emscripten
317+
- test_emscripten_external:
318+
<<: *build_on_tags
319+
requires:
320+
- build_emscripten
321+
- build_x86_linux: *build_on_tags
322+
- build_x86_clang7: *build_on_tags
323+
- build_x86_mac: *build_on_tags
324+
- test_x86_linux:
325+
<<: *build_on_tags
326+
requires:
327+
- build_x86_linux
328+
- test_x86_mac:
329+
<<: *build_on_tags
330+
requires:
331+
- build_x86_mac
332+
- docs: *build_on_tags

.dockerignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# out-of-tree builds usually go here. This helps improving performance of uploading
2+
# the build context to the docker image build server
3+
/build
4+
5+
# in-tree builds
6+
/deps

.editorconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ trim_trailing_whitespace = true
88

99
[*.{cpp,h}]
1010
indent_style = tab
11+
indent_size = 4
1112

1213
[*.{py,rst,sh,yml}]
1314
indent_style = space
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
name: Bug Report
3+
about: Bug reports about the Solidity Compiler.
4+
---
5+
6+
<!--## Prerequisites
7+
8+
- First, many thanks for taking part in the community. We really appreciate that.
9+
- We realize there is a lot of information requested here. We ask only that you do your best to provide as much information as possible so we can better help you.
10+
- Support questions are better asked in one of the following locations:
11+
- [Solidity chat](https://gitter.im/ethereum/solidity)
12+
- [Stack Overflow](https://ethereum.stackexchange.com/)
13+
- Ensure the issue isn't already reported.
14+
- The issue should be reproducible with the latest solidity version; however, this isn't a hard requirement and being reproducible with an older version is sufficient.
15+
-->
16+
17+
## Description
18+
19+
<!--Please shortly describe the bug you have found, and what you expect instead.-->
20+
21+
## Environment
22+
23+
- Compiler version:
24+
- Framework/IDE (e.g. Truffle or Remix):
25+
- EVM execution environment / backend / blockchain client:
26+
- Operating system:
27+
28+
## Steps to Reproduce
29+
30+
<!--
31+
Please provide a *minimal* source code example to trigger the bug you have found.
32+
Please also mention any command line flags that are necessary for triggering the bug.
33+
Provide as much information as necessary to reproduce the bug.
34+
35+
```
36+
// Some *minimal* Solidity source code to reproduce the bug.
37+
// ...
38+
```
39+
-->

0 commit comments

Comments
 (0)