mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add CircleCI support for ewasm test execution.
This commit is contained in:
parent
583bbbb5a4
commit
6e5f74068a
@ -112,6 +112,10 @@ defaults:
|
||||
- store_test_results: &store_test_results
|
||||
path: test_results/
|
||||
|
||||
- install_hera: &install_hera
|
||||
name: install_hera
|
||||
command: ./.circleci/install_hera.sh
|
||||
|
||||
- run_soltest: &run_soltest
|
||||
name: soltest
|
||||
command: ./.circleci/soltest.sh
|
||||
@ -157,6 +161,7 @@ defaults:
|
||||
- checkout
|
||||
- attach_workspace:
|
||||
at: build
|
||||
- run: *install_hera
|
||||
- run: *run_soltest_all
|
||||
- store_test_results: *store_test_results
|
||||
- store_artifacts: *artifacts_test_results
|
||||
|
@ -95,6 +95,18 @@ RUN set -ex; \
|
||||
ninja install/strip; \
|
||||
rm -rf /usr/src/evmone
|
||||
|
||||
# hera
|
||||
RUN set -ex; \
|
||||
cd /usr/src; \
|
||||
git clone --branch="v0.3.0" --recurse-submodules https://github.com/ewasm/hera.git; \
|
||||
cd hera; \
|
||||
mkdir build; \
|
||||
cd build; \
|
||||
cmake -G Ninja -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX="/usr" ..; \
|
||||
ninja; \
|
||||
ninja install/strip; \
|
||||
rm -rf /usr/src/hera
|
||||
|
||||
FROM base
|
||||
COPY --from=libraries /usr/lib /usr/lib
|
||||
COPY --from=libraries /usr/bin /usr/bin
|
||||
|
@ -87,6 +87,19 @@ RUN set -ex; \
|
||||
tar xzpf $TGZFILE -C /usr; \
|
||||
rm -f $TGZFILE;
|
||||
|
||||
# HERA
|
||||
ARG HERA_HASH="622663cb3bc1fa07213c6e1fe8070c5c259096e75039a46d014b2a3448b5cf44"
|
||||
ARG HERA_MAJOR="0"
|
||||
ARG HERA_MINOR="3"
|
||||
ARG HERA_MICRO="0"
|
||||
RUN set -ex; \
|
||||
HERA_VERSION="$HERA_MAJOR.$HERA_MINOR.$HERA_MICRO"; \
|
||||
TGZFILE="hera-$HERA_VERSION-linux-x86_64.tar.gz"; \
|
||||
wget https://github.com/ewasm/hera/releases/download/v$HERA_VERSION/$TGZFILE; \
|
||||
sha256sum $TGZFILE; \
|
||||
tar xzpf $TGZFILE -C /usr; \
|
||||
rm -f $TGZFILE;
|
||||
|
||||
FROM base
|
||||
COPY --from=libraries /usr/lib /usr/lib
|
||||
COPY --from=libraries /usr/bin /usr/bin
|
||||
|
@ -56,6 +56,18 @@ RUN set -ex; \
|
||||
ninja install/strip; \
|
||||
rm -rf /usr/src/evmone
|
||||
|
||||
# hera
|
||||
RUN set -ex; \
|
||||
cd /usr/src; \
|
||||
git clone --branch="v0.3.0" --recurse-submodules https://github.com/ewasm/hera.git; \
|
||||
cd hera; \
|
||||
mkdir build; \
|
||||
cd build; \
|
||||
cmake -G Ninja -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX="/usr" ..; \
|
||||
ninja; \
|
||||
ninja install/strip; \
|
||||
rm -rf /usr/src/hera
|
||||
|
||||
FROM base
|
||||
COPY --from=libraries /usr/lib /usr/lib
|
||||
COPY --from=libraries /usr/bin /usr/bin
|
||||
|
@ -58,6 +58,19 @@ RUN set -ex; \
|
||||
ninja install/strip; \
|
||||
rm -rf /usr/src/evmone
|
||||
|
||||
# hera
|
||||
RUN set -ex; \
|
||||
cd /usr/src; \
|
||||
git clone --branch="v0.3.0" --recurse-submodules https://github.com/ewasm/hera.git; \
|
||||
cd hera; \
|
||||
mkdir build; \
|
||||
cd build; \
|
||||
cmake -G Ninja -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX="/usr" ..; \
|
||||
ninja; \
|
||||
ninja install/strip; \
|
||||
rm -rf /usr/src/hera
|
||||
|
||||
|
||||
FROM base
|
||||
COPY --from=libraries /usr/lib /usr/lib
|
||||
COPY --from=libraries /usr/bin /usr/bin
|
||||
|
40
.circleci/install_hera.sh
Executable file
40
.circleci/install_hera.sh
Executable file
@ -0,0 +1,40 @@
|
||||
#! /bin/bash
|
||||
#------------------------------------------------------------------------------
|
||||
# Bash script that install hera ewasm evmc vm. Script will be removed once
|
||||
# hera is part of the docker images.
|
||||
#
|
||||
# The documentation for solidity is hosted at:
|
||||
#
|
||||
# https://solidity.readthedocs.org
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# This file is part of solidity.
|
||||
#
|
||||
# solidity is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# solidity is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with solidity. If not, see <http://www.gnu.org/licenses/>
|
||||
#
|
||||
# (c) 2016-2019 solidity contributors.
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
apt-get update
|
||||
apt-get upgrade -y
|
||||
|
||||
cd /usr/src || exit
|
||||
git clone --branch="v0.3.0" --recurse-submodules https://github.com/ewasm/hera.git
|
||||
cd hera || exit
|
||||
mkdir build
|
||||
cd build || exit
|
||||
cmake -G Ninja -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX="/usr" ..
|
||||
ninja
|
||||
ninja install/strip
|
||||
rm -rf /usr/src/hera
|
@ -55,5 +55,10 @@ then
|
||||
wget https://github.com/ethereum/evmone/releases/download/v0.4.0/evmone-0.4.0-darwin-x86_64.tar.gz
|
||||
tar xzpf evmone-0.4.0-darwin-x86_64.tar.gz -C /usr/local
|
||||
rm -f evmone-0.4.0-darwin-x86_64.tar.gz
|
||||
|
||||
# hera
|
||||
wget https://github.com/ewasm/hera/releases/download/v0.3.0/hera-0.3.0-darwin-x86_64.tar.gz
|
||||
tar xzpf hera-0.3.0-darwin-x86_64.tar.gz -C /usr/local
|
||||
rm -f hera-0.3.0-darwin-x86_64.tar.gz
|
||||
fi
|
||||
|
||||
|
@ -56,6 +56,17 @@ get_logfile_basename() {
|
||||
|
||||
BOOST_TEST_ARGS="--color_output=no --show_progress=yes --logger=JUNIT,error,test_results/`get_logfile_basename`.xml"
|
||||
SOLTEST_ARGS="--evm-version=$EVM $SOLTEST_FLAGS"
|
||||
|
||||
if [[ "$OSTYPE" == "darwin"* ]]
|
||||
then
|
||||
LIBHERA=/usr/local/lib/libhera.dylib
|
||||
else
|
||||
LIBHERA=/usr/lib/libhera.so
|
||||
fi
|
||||
|
||||
# run tests against hera ewasm evmc vm for versions == byzantium
|
||||
test "${EVM}" = "byzantium" && SOLTEST_ARGS="${SOLTEST_ARGS} --vm ${LIBHERA}"
|
||||
|
||||
test "${OPTIMIZE}" = "1" && SOLTEST_ARGS="${SOLTEST_ARGS} --optimize"
|
||||
test "${ABI_ENCODER_V2}" = "1" && SOLTEST_ARGS="${SOLTEST_ARGS} --abiencoderv2"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user