Update json-rpc-interface.md #4396
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and test skaled | |
on: | |
push: | |
branches-ignore: | |
- 'master' | |
- 'beta' | |
- 'stable' | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build: | |
runs-on: self-hosted | |
env: | |
ACTIONS_ALLOW_UNSECURE_COMMANDS: true | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
NO_ULIMIT_CHECK: 1 | |
ccache_compress: 'true' | |
ccache_compresslevel: 9 | |
steps: | |
- name: Cancel Previous Runs | |
uses: styfle/cancel-workflow-action@0.9.1 | |
with: | |
access_token: ${{ github.token }} | |
- name: Extract repo name | |
run: echo ::set-env name=REPOSITORY_NAME::$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}') | |
shell: bash | |
env: | |
ACTIONS_ALLOW_UNSECURE_COMMANDS: true | |
- name: checkout | |
uses: actions/checkout@v2 | |
- name: Cache apt packages | |
uses: actions/cache@v2 | |
with: | |
path: | | |
/var/cache/apt/archives | |
key: ${{ runner.os }}-apt-cache | |
ttl: 1000000 # purge cache every 1000000 seconds (10 days). This is to pull updated packages | |
- name: update apt | |
run: | | |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test || true | |
sudo apt-get update || true | |
- name: install packages | |
run: | | |
sudo apt-get -y remove libzmq* || true | |
sudo apt-get -y install software-properties-common gcc-9 g++-9 || true | |
- name: Use g++-9 and gcov-9 by default | |
run: | | |
echo "Updating all needed alternatives" | |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 9 | |
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 9 | |
sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-9 9 | |
sudo update-alternatives --install /usr/bin/gcov-dump gcov-dump /usr/bin/gcov-dump-9 9 | |
sudo update-alternatives --install /usr/bin/gcov-tool gcov-tool /usr/bin/gcov-tool-9 9 | |
echo "Checking alternative for gcc" | |
which gcc | |
gcc --version | |
echo "Checking alternative for g++" | |
which g++ | |
g++ --version | |
echo "Checking alternative for gcov" | |
which gcov | |
gcov --version | |
echo "Checking alternative for gcov-dump" | |
which gcov-dump | |
gcov-dump --version | |
echo "Checking alternative for gcov-tool" | |
which gcov-tool | |
gcov-tool --version | |
- name: Get newest lcov | |
run: | | |
# sudo apt-get install libcapture-tiny-perl | |
echo "Removing previous lcov version..." | |
sudo apt-get remove lcov || true | |
echo "Installing newest lcov version..." | |
rm -rf newer_lcov || true | |
mkdir newer_lcov | |
cd newer_lcov | |
git clone https://github.com/linux-test-project/lcov --recursive --recurse-submodules | |
cd lcov | |
git checkout 92e2121 | |
sudo make install | |
cd .. | |
cd .. | |
echo "Checking installed lcov version..." | |
which lcov | |
lcov --version | |
- name: Submodule update | |
run: | | |
rm -rf ./libconsensus || true | |
ls -1 | |
git submodule update --init --recursive | |
- name: Prepare ccache timestamp | |
id: ccache_cache_timestamp | |
shell: cmake -P {0} | |
run: | | |
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC) | |
message("::set-output name=timestamp::${current_date}") | |
- name: Ccache cache files | |
uses: actions/cache@v1.1.0 | |
with: | |
path: .ccache | |
key: ${ { matrix.config.name } }-ccache-${ { steps.ccache_cache_timestamp.outputs.timestamp } } | |
restore-keys: | | |
${ { matrix.config.name } }-ccache- | |
- name: Update gcc-9 | |
run: | | |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 9 | |
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 9 | |
- name: Configure ccache cache size, zero ccache counters and print ccache stats before start | |
run: | | |
ccache --max-size=15G | |
ccache -z | |
ccache --show-stats | |
- name: Build dependencies | |
run: | | |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | |
export CC=gcc-9 | |
export CXX=g++-9 | |
export TARGET=all | |
export CMAKE_BUILD_TYPE=Debug | |
export CODE_COVERAGE=ON | |
cd deps | |
#######################################./clean.sh | |
rm -f ./libwebsockets-from-git.tar.gz | |
./build.sh DEBUG=1 PARALLEL_COUNT=$(nproc) | |
cd .. | |
- name: Configure all | |
run: | | |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | |
export CC=gcc-9 | |
export CXX=g++-9 | |
export TARGET=all | |
export CMAKE_BUILD_TYPE=Debug | |
export CODE_COVERAGE=ON | |
mkdir -p build | |
cd build | |
# -DCMAKE_C_FLAGS=-O3 -DCMAKE_CXX_FLAGS=-O3 | |
cmake -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -DCOVERAGE=$CODE_COVERAGE .. | |
cd .. | |
- name: Print ccache stats for deps | |
run: | | |
ccache --show-stats | |
- name: Build all | |
run: | | |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | |
export CC=gcc-9 | |
export CXX=g++-9 | |
export TARGET=all | |
export CMAKE_BUILD_TYPE=Debug | |
export CODE_COVERAGE=ON | |
cd build | |
make testeth -j$(nproc) | |
cd .. | |
- name: Print ccache stats after full build | |
run : | | |
ccache --show-stats | |
# first run with verbosity 1. If test fails, rerun with verbosity 4 | |
# we specifically run each test for easier log review | |
- name: Testeth verbosity 1 | |
run : | | |
mkdir -p /tmp/tests/ | |
sudo rm -rf /tmp/tests/* | |
cd build/test | |
export NO_NTP_CHECK=1 | |
export NO_ULIMIT_CHECK=1 | |
function run_test() { ./testeth --report_level=detailed -t "$1" -- --express && touch "/tmp/tests/${1}Passed"; } | |
run_test TransitionTests | |
run_test TransactionTests | |
run_test VMTests | |
run_test LevelDBTests | |
run_test CoreLibTests | |
run_test RlpTests | |
run_test SharedSpaceTests | |
run_test EthashTests | |
run_test SealEngineTests | |
run_test DifficultyTests | |
run_test BlockSuite | |
run_test BlockChainMainNetworkSuite | |
run_test BlockChainFrontierSuite | |
run_test BlockQueueSuite | |
run_test ClientBase | |
run_test EstimateGas | |
run_test getHistoricNodesData | |
run_test ExtVmSuite | |
run_test GasPricer | |
run_test BasicTests | |
run_test InstanceMonitorSuite | |
run_test PrecompiledTests | |
run_test SkaleHostSuite | |
run_test StateUnitTests | |
run_test libethereum | |
run_test TransactionQueueSuite | |
run_test LegacyVMSuite | |
run_test SkaleInterpreterSuite | |
run_test SnapshotSigningTestSuite | |
run_test SkUtils | |
run_test BlockChainTestSuite | |
run_test TestHelperSuite | |
run_test LevelDBHashBase | |
run_test memDB | |
run_test OverlayDBTests | |
run_test AccountHolderTest | |
run_test ClientTests | |
run_test JsonRpcSuite | |
run_test SingleConsensusTests | |
run_test ConsensusTests | |
sudo ./testeth -t BtrfsTestSuite -- --all && touch /tmp/tests/BtrfsTestSuitePassed | |
sudo ./testeth -t HashSnapshotTestSuite -- --all && touch /tmp/tests/HashSnapshotTestSuitePassed | |
sudo ./testeth -t ClientSnapshotsSuite -- --all && touch /tmp/tests/ClientSnapshotsSuitePassed | |
cd .. | |
- name: Testeth verbosity 4 | |
run : | | |
# Since a tests failed, we are rerunning the failed test with higher verbosity | |
cd build/test | |
export NO_NTP_CHECK=1 | |
export NO_ULIMIT_CHECK=1 | |
function rerun_test() { ls "/tmp/tests/${1}Passed" 2>/dev/null || ./testeth --report_level=detailed -t "$1" -- --express --verbosity 4; } | |
rerun_test TransitionTests | |
rerun_test TransactionTests | |
rerun_test VMTests | |
rerun_test LevelDBTests | |
rerun_test CoreLibTests | |
rerun_test RlpTests | |
rerun_test SharedSpaceTests | |
rerun_test EthashTests | |
rerun_test SealEngineTests | |
rerun_test DifficultyTests | |
rerun_test BlockSuite | |
rerun_test BlockChainMainNetworkSuite | |
rerun_test BlockChainFrontierSuite | |
rerun_test BlockQueueSuite | |
rerun_test ClientBase | |
rerun_test EstimateGas | |
rerun_test getHistoricNodesData | |
rerun_test ExtVmSuite | |
rerun_test GasPricer | |
rerun_test BasicTests | |
rerun_test InstanceMonitorSuite | |
rerun_test PrecompiledTests | |
rerun_test SkaleHostSuite | |
rerun_test StateUnitTests | |
rerun_test libethereum | |
rerun_test TransactionQueueSuite | |
rerun_test LegacyVMSuite | |
rerun_test SkaleInterpreterSuite | |
rerun_test SnapshotSigningTestSuite | |
rerun_test SkUtils | |
rerun_test BlockChainTestSuite | |
rerun_test TestHelperSuite | |
rerun_test LevelDBHashBase | |
rerun_test memDB | |
rerun_test OverlayDBTests | |
rerun_test AccountHolderTest | |
rerun_test ClientTests | |
rerun_test JsonRpcSuite | |
rerun_test SingleConsensusTests | |
rerun_test ConsensusTests | |
ls /tmp/tests/BtrfsTestSuitePassed || sudo NO_ULIMIT_CHECK=1 NO_NTP_CHECK=1 ./testeth -t BtrfsTestSuite -- --all --verbosity 4 | |
ls /tmp/tests/HashSnapshotTestSuitePassed || sudo NO_ULIMIT_CHECK=1 NO_NTP_CHECK=1 ./testeth -t HashSnapshotTestSuite -- --all --verbosity 4 | |
ls /tmp/tests/ClientSnapshotsSuitePassed || sudo NO_ULIMIT_CHECK=1 NO_NTP_CHECK=1 ./testeth -t ClientSnapshotsSuite -- --all --verbosity 4 | |
cd .. | |
- name: Configure all as historic | |
run: | | |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | |
export CC=gcc-9 | |
export CXX=g++-9 | |
export TARGET=all | |
export CMAKE_BUILD_TYPE=Debug | |
export CODE_COVERAGE=ON | |
mkdir -p build_historic | |
cd build_historic | |
# -DCMAKE_C_FLAGS=-O3 -DCMAKE_CXX_FLAGS=-O3 | |
cmake -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -DCOVERAGE=$CODE_COVERAGE -DHISTORIC_STATE=1 .. | |
cd .. | |
- name: Build all historic | |
run: | | |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | |
export CC=gcc-9 | |
export CXX=g++-9 | |
export TARGET=all | |
export CMAKE_BUILD_TYPE=Debug | |
export CODE_COVERAGE=ON | |
cd build_historic | |
make testeth -j$(nproc) | |
cd .. | |
- name: Print ccache stats after full historic build | |
run : | | |
ccache --show-stats | |
- name: Testeth historic | |
run : | | |
cd build_historic/test | |
export NO_NTP_CHECK=1 | |
export NO_ULIMIT_CHECK=1 | |
./testeth -t JsonRpcSuite -- --express --verbosity 4 |