mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
commit
9714bcf6eb
19
appveyor.yml
19
appveyor.yml
@ -34,6 +34,10 @@ configuration:
|
|||||||
# We can re-enable it when we find a way to mitigate the unreliability
|
# We can re-enable it when we find a way to mitigate the unreliability
|
||||||
# issues. Have automated builds be reliable is the more important thing.
|
# issues. Have automated builds be reliable is the more important thing.
|
||||||
#cache: build
|
#cache: build
|
||||||
|
#
|
||||||
|
# In case we'd need a RDP detail to login into appveyor
|
||||||
|
#init:
|
||||||
|
# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
|
||||||
install:
|
install:
|
||||||
- git submodule update --init --recursive
|
- git submodule update --init --recursive
|
||||||
- scripts/install_deps.bat
|
- scripts/install_deps.bat
|
||||||
@ -47,12 +51,15 @@ build_script:
|
|||||||
- cd %APPVEYOR_BUILD_FOLDER%
|
- cd %APPVEYOR_BUILD_FOLDER%
|
||||||
- scripts\release.bat %CONFIGURATION%
|
- scripts\release.bat %CONFIGURATION%
|
||||||
|
|
||||||
#test_script:
|
test_script:
|
||||||
# - cd %APPVEYOR_BUILD_FOLDER%\build\test\%CONFIGURATION%
|
- cd %APPVEYOR_BUILD_FOLDER%
|
||||||
# - copy "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\redist\x86\Microsoft.VC140.CRT\msvc*.dll" .
|
- cd deps\install\x64\eth
|
||||||
# - start eth.exe --test -d %TMP%\eth_for_soltest
|
- ps: $ethProc = Start-Process eth.exe --test
|
||||||
# - soltest.exe -- --ipc %TMP%\eth_for_soltest\geth.ipc
|
- ps: Start-Sleep -s 100
|
||||||
# - pkill eth
|
- cd %APPVEYOR_BUILD_FOLDER%\build\test\%CONFIGURATION%
|
||||||
|
- copy "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\redist\x86\Microsoft.VC140.CRT\msvc*.dll" .
|
||||||
|
- soltest.exe -- --ipcpath \\.\pipe\geth.ipc
|
||||||
|
- ps: Stop-Process -Id $ethProc.Id
|
||||||
|
|
||||||
artifacts:
|
artifacts:
|
||||||
- path: solidity-windows.zip
|
- path: solidity-windows.zip
|
||||||
|
@ -59,3 +59,4 @@ REM Copyright (c) 2016 solidity contributors.
|
|||||||
REM ---------------------------------------------------------------------------
|
REM ---------------------------------------------------------------------------
|
||||||
|
|
||||||
cmake -P deps\install_deps.cmake
|
cmake -P deps\install_deps.cmake
|
||||||
|
cmake -P scripts\install_eth.cmake
|
||||||
|
76
scripts/install_eth.cmake
Normal file
76
scripts/install_eth.cmake
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Cmake script for installing pre-requisite package eth for solidity.
|
||||||
|
#
|
||||||
|
# The aim of this script is to simply download and unpack eth binaries to the deps folder.
|
||||||
|
#
|
||||||
|
# The documentation for solidity is hosted at:
|
||||||
|
#
|
||||||
|
# http://solidity.readthedocs.io/
|
||||||
|
#
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# 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 solidity contributors.
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
function(download URL DST_FILE STATUS)
|
||||||
|
set(TMP_FILE "${DST_FILE}.part")
|
||||||
|
|
||||||
|
get_filename_component(FILE_NAME ${DST_FILE} NAME)
|
||||||
|
if (NOT EXISTS ${DST_FILE})
|
||||||
|
message("Downloading ${FILE_NAME}")
|
||||||
|
file(DOWNLOAD ${URL} ${TMP_FILE} SHOW_PROGRESS STATUS DOWNLOAD_STATUS)
|
||||||
|
list(GET DOWNLOAD_STATUS 0 STATUS_CODE)
|
||||||
|
if (STATUS_CODE EQUAL 0)
|
||||||
|
file(RENAME ${TMP_FILE} ${DST_FILE})
|
||||||
|
else()
|
||||||
|
file(REMOVE ${TMP_FILE})
|
||||||
|
list(GET DOWNLOAD_STATUS 1 ERROR_MSG)
|
||||||
|
|
||||||
|
message("ERROR! Downloading '${FILE_NAME}' failed.")
|
||||||
|
message(STATUS "URL: ${URL}")
|
||||||
|
message(STATUS "Error: ${STATUS_CODE} ${ERROR_MSG}")
|
||||||
|
set(STATUS FALSE PARENT_SCOPE)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
message("Using cached ${FILE_NAME}")
|
||||||
|
endif()
|
||||||
|
set(STATUS TRUE PARENT_SCOPE)
|
||||||
|
endfunction(download)
|
||||||
|
|
||||||
|
function(download_and_unpack PACKAGE_URL DST_DIR)
|
||||||
|
get_filename_component(FILE_NAME ${PACKAGE_URL} NAME)
|
||||||
|
|
||||||
|
set(DST_FILE "${CACHE_DIR}/${FILE_NAME}")
|
||||||
|
set(TMP_FILE "${DST_FILE}.part")
|
||||||
|
|
||||||
|
file(MAKE_DIRECTORY ${CACHE_DIR})
|
||||||
|
file(MAKE_DIRECTORY ${DST_DIR})
|
||||||
|
|
||||||
|
download(${PACKAGE_URL} ${DST_FILE} STATUS)
|
||||||
|
|
||||||
|
if (STATUS)
|
||||||
|
message("Unpacking ${FILE_NAME} to ${DST_DIR}")
|
||||||
|
execute_process(COMMAND ${CMAKE_COMMAND} -E tar -xf ${DST_FILE}
|
||||||
|
WORKING_DIRECTORY ${DST_DIR})
|
||||||
|
endif()
|
||||||
|
endfunction(download_and_unpack)
|
||||||
|
|
||||||
|
get_filename_component(ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}/.." ABSOLUTE)
|
||||||
|
set(CACHE_DIR "${ROOT_DIR}/deps/cache")
|
||||||
|
set(INSTALL_DIR "${ROOT_DIR}/deps/install/x64/eth")
|
||||||
|
download_and_unpack("https://github.com/bobsummerwill/cpp-ethereum/releases/download/develop-v1.3.0.401/cpp-ethereum-develop-windows.zip" ${INSTALL_DIR})
|
@ -46,7 +46,7 @@ IPCSocket::IPCSocket(string const& _path): m_path(_path)
|
|||||||
NULL); // no template file
|
NULL); // no template file
|
||||||
|
|
||||||
if (m_socket == INVALID_HANDLE_VALUE)
|
if (m_socket == INVALID_HANDLE_VALUE)
|
||||||
BOOST_FAIL("Error creating IPC socket object");
|
BOOST_FAIL("Error creating IPC socket object!");
|
||||||
|
|
||||||
#else
|
#else
|
||||||
if (_path.length() >= sizeof(sockaddr_un::sun_path))
|
if (_path.length() >= sizeof(sockaddr_un::sun_path))
|
||||||
@ -251,7 +251,7 @@ void RPCSession::test_mineBlocks(int _number)
|
|||||||
|
|
||||||
unsigned sleepTime = m_sleepTime;
|
unsigned sleepTime = m_sleepTime;
|
||||||
size_t polls = 0;
|
size_t polls = 0;
|
||||||
for (; polls < 10 && !mined; ++polls)
|
for (; polls < 14 && !mined; ++polls)
|
||||||
{
|
{
|
||||||
std::this_thread::sleep_for(chrono::milliseconds(sleepTime));
|
std::this_thread::sleep_for(chrono::milliseconds(sleepTime));
|
||||||
if (fromBigEndian<u256>(fromHex(rpcCall("eth_blockNumber").asString())) >= startBlock + _number)
|
if (fromBigEndian<u256>(fromHex(rpcCall("eth_blockNumber").asString())) >= startBlock + _number)
|
||||||
@ -270,7 +270,8 @@ void RPCSession::test_mineBlocks(int _number)
|
|||||||
if (m_successfulMineRuns > 5)
|
if (m_successfulMineRuns > 5)
|
||||||
{
|
{
|
||||||
m_successfulMineRuns = 0;
|
m_successfulMineRuns = 0;
|
||||||
m_sleepTime--;
|
if (m_sleepTime > 2)
|
||||||
|
m_sleepTime--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user