diff options
author | RJ Catalano <rj@monax.io> | 2017-02-03 09:13:59 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-03 09:13:59 +0800 |
commit | ab54cd100ec11e82f6e7c3405356fbc48fd2ed8c (patch) | |
tree | 4fa8048b22f8289cedb84e4281228113875920dd | |
parent | 5ce79609a42d3361122833047d497c07c8c36980 (diff) | |
parent | 60e884b0a39a5f116291ae03e98b228847831f2d (diff) | |
download | dexon-solidity-ab54cd100ec11e82f6e7c3405356fbc48fd2ed8c.tar.gz dexon-solidity-ab54cd100ec11e82f6e7c3405356fbc48fd2ed8c.tar.zst dexon-solidity-ab54cd100ec11e82f6e7c3405356fbc48fd2ed8c.zip |
Merge pull request #1642 from VoR0220/implementBuildScript
implement a build script
-rw-r--r-- | .travis.yml | 6 | ||||
-rw-r--r-- | docs/installing-solidity.rst | 11 | ||||
-rwxr-xr-x | scripts/build.sh | 17 |
3 files changed, 27 insertions, 7 deletions
diff --git a/.travis.yml b/.travis.yml index 017f1a61..d4b37f20 100644 --- a/.travis.yml +++ b/.travis.yml @@ -148,11 +148,7 @@ install: - echo -n "$TRAVIS_COMMIT" > commit_hash.txt before_script: - test $TRAVIS_EMSCRIPTEN != On || ./scripts/build_emscripten.sh - - test $TRAVIS_RELEASE != On || (mkdir -p build - && cd build - && cmake .. -DCMAKE_BUILD_TYPE=$TRAVIS_BUILD_TYPE - && make -j2 - && cd .. + - test $TRAVIS_RELEASE != On || (./scripts/build.sh $TRAVIS_BUILD_TYPE && ./scripts/release.sh $ZIP_SUFFIX && ./scripts/create_source_tarball.sh ) script: diff --git a/docs/installing-solidity.rst b/docs/installing-solidity.rst index 66e8038f..44a2d45f 100644 --- a/docs/installing-solidity.rst +++ b/docs/installing-solidity.rst @@ -198,7 +198,14 @@ Building Solidity is quite similar on Linux, macOS and other Unices: cd build cmake .. && make -And even on Windows: +or even easier: + +.. code:: bash + + #note: this will install binaries solc and soltest at usr/local/bin + ./scripts/build.sh + +And even for Windows: .. code:: bash @@ -251,4 +258,4 @@ Example: 3. a breaking change is introduced - version is bumped to 0.5.0 4. the 0.5.0 release is made -This behaviour works well with the version pragma. +This behaviour works well with the version pragma.
\ No newline at end of file diff --git a/scripts/build.sh b/scripts/build.sh new file mode 100755 index 00000000..e056ae4a --- /dev/null +++ b/scripts/build.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +if [ -z "$1" ]; then + BUILD_TYPE=Release +else + BUILD_TYPE="$1" +fi + +cd $(dirname "$0") +mkdir -p build +cd build +cmake .. -DCMAKE_BUILD_TYPE="$BUILD_TYPE" +make -j2 + +if [ -z $CI ]; then + install solc/solc /usr/local/bin && install test/soltest /usr/local/bin +fi
\ No newline at end of file |