Skip to content

Commit

Permalink
implement a build script
Browse files Browse the repository at this point in the history
Signed-off-by: RJ Catalano <[email protected]>
  • Loading branch information
RJ Catalano committed Feb 3, 2017
1 parent 5ce7960 commit f50caa9
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 7 deletions.
6 changes: 1 addition & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 8 additions & 2 deletions docs/installing-solidity.rst
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,13 @@ Building Solidity is quite similar on Linux, macOS and other Unices:
cd build
cmake .. && make
And even on Windows:
or even easier:

.. code:: bash
./scripts/build.sh
And even for Windows:

.. code:: bash
Expand Down Expand Up @@ -251,4 +257,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.
17 changes: 17 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit f50caa9

Please sign in to comment.