Merge pull request #1642 from VoR0220/implementBuildScript

implement a build script
This commit is contained in:
RJ Catalano
2017-02-02 19:13:59 -06:00
committed by GitHub
3 changed files with 27 additions and 7 deletions
+1 -5
View File
@@ -148,11 +148,7 @@ install:
- echo -n "$TRAVIS_COMMIT" > commit_hash.txt - echo -n "$TRAVIS_COMMIT" > commit_hash.txt
before_script: before_script:
- test $TRAVIS_EMSCRIPTEN != On || ./scripts/build_emscripten.sh - test $TRAVIS_EMSCRIPTEN != On || ./scripts/build_emscripten.sh
- test $TRAVIS_RELEASE != On || (mkdir -p build - test $TRAVIS_RELEASE != On || (./scripts/build.sh $TRAVIS_BUILD_TYPE
&& cd build
&& cmake .. -DCMAKE_BUILD_TYPE=$TRAVIS_BUILD_TYPE
&& make -j2
&& cd ..
&& ./scripts/release.sh $ZIP_SUFFIX && ./scripts/release.sh $ZIP_SUFFIX
&& ./scripts/create_source_tarball.sh ) && ./scripts/create_source_tarball.sh )
script: script:
+9 -2
View File
@@ -198,7 +198,14 @@ Building Solidity is quite similar on Linux, macOS and other Unices:
cd build cd build
cmake .. && make 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 .. code:: bash
@@ -251,4 +258,4 @@ Example:
3. a breaking change is introduced - version is bumped to 0.5.0 3. a breaking change is introduced - version is bumped to 0.5.0
4. the 0.5.0 release is made 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
View File
@@ -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