Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimal changes to use the same version of emscripten on Travis and Circleci. #4486

Merged
merged 2 commits into from
Nov 21, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
name: Save Boost build
key: *boost-cache-key
paths:
- boost_1_57_0
- boost_1_67_0
- store_artifacts:
path: build/libsolc/soljson.js
destination: soljson.js
Expand Down
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ matrix:
before_install:
- nvm install 8
- nvm use 8
- docker pull trzeci/emscripten:sdk-tag-1.35.4-64bit
- docker pull trzeci/emscripten:sdk-tag-1.37.21-64bit
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So does it needs an emscripten update then?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes - only updating both emscripten and boost currently works - updating either one alone still results in errors that we don't have a solution for so far. However, this only updates the emscripten version on travis to the same version used on circleci and does not update any further than that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, in that case I'm not sure we should merge without running some benchmarks. It is kind of weird, because on circle 1.37.21 compiles with both versions of boost, while on travis 1.37.21 needs the boost upgrade.

Well, we could use the circle output to benchmark against he nightlies, since both versions were created.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think on circle everything is compiled in docker containers, whereas on travis parts are built in a docker container and parts are not - my conjecture would be that that's causing the differences. I'd have to recheck, though.

env:
- SOLC_EMSCRIPTEN=On
- SOLC_INSTALL_DEPS_TRAVIS=Off
Expand Down Expand Up @@ -153,7 +153,7 @@ git:
cache:
ccache: true
directories:
- boost_1_57_0
- boost_1_67_0
- $HOME/.local

install:
Expand Down
2 changes: 1 addition & 1 deletion scripts/build_emscripten.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ set -e

if [[ "$OSTYPE" != "darwin"* ]]; then
./scripts/travis-emscripten/install_deps.sh
docker run -v $(pwd):/root/project -w /root/project trzeci/emscripten:sdk-tag-1.35.4-64bit ./scripts/travis-emscripten/build_emscripten.sh
docker run -v $(pwd):/root/project -w /root/project trzeci/emscripten:sdk-tag-1.37.21-64bit ./scripts/travis-emscripten/build_emscripten.sh
fi
27 changes: 9 additions & 18 deletions scripts/travis-emscripten/build_emscripten.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,14 @@ else
echo 'NODE_JS=["nodejs", "--stack_size=8192"]' > ~/.emscripten
fi


# Boost
echo -en 'travis_fold:start:compiling_boost\\r'
cd "$WORKSPACE"/boost_1_57_0
cd "$WORKSPACE"/boost_1_67_0
# if b2 exists, it is a fresh checkout, otherwise it comes from the cache
# and is already compiled
test -e b2 && (
sed -i 's|using gcc ;|using gcc : : em++ ;|g' ./project-config.jam
sed -i 's|$(archiver\[1\])|emar|g' ./tools/build/src/tools/gcc.jam
sed -i 's|$(ranlib\[1\])|emranlib|g' ./tools/build/src/tools/gcc.jam
./b2 link=static variant=release threading=single runtime-link=static \
system regex filesystem unit_test_framework program_options
./b2 toolset=emscripten link=static variant=release threading=single runtime-link=static \
system regex filesystem unit_test_framework program_options cxxflags="-Wno-unused-local-typedef -Wno-variadic-macros -Wno-c99-extensions -Wno-all"
find . -name 'libboost*.a' -exec cp {} . \;
rm -rf b2 libs doc tools more bin.v2 status
)
Expand All @@ -89,17 +85,12 @@ cmake \
-DBoost_FOUND=1 \
-DBoost_USE_STATIC_LIBS=1 \
-DBoost_USE_STATIC_RUNTIME=1 \
-DBoost_INCLUDE_DIR="$WORKSPACE"/boost_1_57_0/ \
-DBoost_FILESYSTEM_LIBRARY="$WORKSPACE"/boost_1_57_0/libboost_filesystem.a \
-DBoost_FILESYSTEM_LIBRARIES="$WORKSPACE"/boost_1_57_0/libboost_filesystem.a \
-DBoost_PROGRAM_OPTIONS_LIBRARY="$WORKSPACE"/boost_1_57_0/libboost_program_options.a \
-DBoost_PROGRAM_OPTIONS_LIBRARIES="$WORKSPACE"/boost_1_57_0/libboost_program_options.a \
-DBoost_REGEX_LIBRARY="$WORKSPACE"/boost_1_57_0/libboost_regex.a \
-DBoost_REGEX_LIBRARIES="$WORKSPACE"/boost_1_57_0/libboost_regex.a \
-DBoost_SYSTEM_LIBRARY="$WORKSPACE"/boost_1_57_0/libboost_system.a \
-DBoost_SYSTEM_LIBRARIES="$WORKSPACE"/boost_1_57_0/libboost_system.a \
-DBoost_UNIT_TEST_FRAMEWORK_LIBRARY="$WORKSPACE"/boost_1_57_0/libboost_unit_test_framework.a \
-DBoost_UNIT_TEST_FRAMEWORK_LIBRARIES="$WORKSPACE"/boost_1_57_0/libboost_unit_test_framework.a \
-DBoost_INCLUDE_DIR="$WORKSPACE"/boost_1_67_0/ \
-DBoost_FILESYSTEM_LIBRARY_RELEASE="$WORKSPACE"/boost_1_67_0/libboost_filesystem.a \
-DBoost_PROGRAM_OPTIONS_LIBRARY_RELEASE="$WORKSPACE"/boost_1_67_0/libboost_program_options.a \
-DBoost_REGEX_LIBRARY_RELEASE="$WORKSPACE"/boost_1_67_0/libboost_regex.a \
-DBoost_SYSTEM_LIBRARY_RELEASE="$WORKSPACE"/boost_1_67_0/libboost_system.a \
-DBoost_UNIT_TEST_FRAMEWORK_LIBRARY_RELEASE="$WORKSPACE"/boost_1_67_0/libboost_unit_test_framework.a \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@christianparpart can you review this file?

-DTESTS=0 \
..
make -j 4
Expand Down
18 changes: 13 additions & 5 deletions scripts/travis-emscripten/install_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,19 @@
set -ev

echo -en 'travis_fold:start:installing_dependencies\\r'
test -e boost_1_57_0 -a -e boost_1_57_0/boost || (
wget 'https://sourceforge.net/projects/boost/files/boost/1.57.0/boost_1_57_0.tar.gz/download'\
-O - | tar xz
cd boost_1_57_0
./bootstrap.sh --with-toolset=gcc --with-libraries=thread,system,regex,date_time,chrono,filesystem,program_options,random
test -e boost_1_67_0 -a -e boost_1_67_0/boost || (
rm -rf boost_1_67_0
rm -f boost.tar.xz
wget -q 'https://sourceforge.net/projects/boost/files/boost/1.67.0/boost_1_67_0.tar.gz/download'\
-O boost.tar.xz
test "$(shasum boost.tar.xz)" = "77e73c9fd7bf85b14067767b9e8fdc39b49ee0f2 boost.tar.xz"
tar -xzf boost.tar.xz
rm boost.tar.xz
cd boost_1_67_0
./bootstrap.sh
wget -q 'https://raw.githubusercontent.com/tee3/boost-build-emscripten/master/emscripten.jam'
test "$(shasum emscripten.jam)" = "a7e13fc2c1e53b0e079ef440622f879aa6da3049 emscripten.jam"
echo "using emscripten : : em++ ;" >> project-config.jam
)
cd ..
echo -en 'travis_fold:end:installing_dependencies\\r'