Merge pull request #9825 from ethereum/windowsCircleCITests

CircleCI Windows test run.
This commit is contained in:
chriseth 2020-09-17 16:21:37 +02:00 committed by GitHub
commit 7a5957512c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 62 additions and 0 deletions

View File

@ -1,3 +1,5 @@
$ErrorActionPreference = "Stop"
cd "$PSScriptRoot\.." cd "$PSScriptRoot\.."
if ("$Env:FORCE_RELEASE") { if ("$Env:FORCE_RELEASE") {
@ -9,5 +11,8 @@ mkdir build
cd build cd build
$boost_dir=(Resolve-Path $PSScriptRoot\..\deps\boost\lib\cmake\Boost-*) $boost_dir=(Resolve-Path $PSScriptRoot\..\deps\boost\lib\cmake\Boost-*)
..\deps\cmake\bin\cmake -G "Visual Studio 16 2019" -DBoost_DIR="$boost_dir\" -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -DCMAKE_INSTALL_PREFIX="$PSScriptRoot\..\upload" .. ..\deps\cmake\bin\cmake -G "Visual Studio 16 2019" -DBoost_DIR="$boost_dir\" -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -DCMAKE_INSTALL_PREFIX="$PSScriptRoot\..\upload" ..
if ( -not $? ) { throw "CMake configure failed." }
msbuild solidity.sln /p:Configuration=Release /m:5 /v:minimal msbuild solidity.sln /p:Configuration=Release /m:5 /v:minimal
if ( -not $? ) { throw "Build failed." }
..\deps\cmake\bin\cmake --build . -j 5 --target install --config Release ..\deps\cmake\bin\cmake --build . -j 5 --target install --config Release
if ( -not $? ) { throw "Install target failed." }

View File

@ -250,6 +250,16 @@ defaults:
requires: requires:
- b_ubu_ossfuzz - b_ubu_ossfuzz
- workflow_win: &workflow_win
<<: *workflow_trigger_on_tags
requires:
- b_win
- workflow_win_release: &workflow_win_release
<<: *workflow_trigger_on_tags
requires:
- b_win_release
# -------------------------------------------------------------------------- # --------------------------------------------------------------------------
# Notification Templates # Notification Templates
- gitter_notify_failure: &gitter_notify_failure - gitter_notify_failure: &gitter_notify_failure
@ -903,6 +913,9 @@ jobs:
- run: - run:
name: "Building solidity" name: "Building solidity"
command: .circleci/build_win.ps1 command: .circleci/build_win.ps1
- run:
name: "Run solc.exe to make sure build was successful."
command: .\build\solc\Release\solc.exe --version
- store_artifacts: *artifact_solc_windows - store_artifacts: *artifact_solc_windows
- persist_to_workspace: *artifacts_build_dir - persist_to_workspace: *artifacts_build_dir
@ -911,6 +924,24 @@ jobs:
environment: environment:
FORCE_RELEASE: ON FORCE_RELEASE: ON
t_win: &t_win
executor:
name: win/default
shell: powershell.exe
steps:
- checkout
- attach_workspace:
at: build
- run:
name: "Install evmone"
command: scripts/install_evmone.ps1
- run:
name: "Run soltest"
command: .circleci/soltest.ps1
- store_artifacts: *artifacts_test_results
t_win_release:
<<: *t_win
workflows: workflows:
version: 2 version: 2
@ -966,6 +997,8 @@ workflows:
# Windows build and tests # Windows build and tests
- b_win: *workflow_trigger_on_tags - b_win: *workflow_trigger_on_tags
- b_win_release: *workflow_trigger_on_tags - b_win_release: *workflow_trigger_on_tags
- t_win: *workflow_win
- t_win_release: *workflow_win_release
nightly: nightly:

12
.circleci/soltest.ps1 Executable file
View File

@ -0,0 +1,12 @@
$ErrorActionPreference = "Stop"
cd "$PSScriptRoot\.."
.\build\solc\Release\solc.exe --version
if ( -not $? ) { throw "Cannot execute solc --version." }
mkdir test_results
.\build\test\Release\soltest.exe --color_output=no --show_progress=yes --logger=JUNIT,error,test_results/result.xml -- --no-smt
if ( -not $? ) { throw "Unoptimized soltest run failed." }
.\build\test\Release\soltest.exe --color_output=no --show_progress=yes --logger=JUNIT,error,test_results/result_opt.xml -- --optimize --no-smt
if ( -not $? ) { throw "Optimized soltest run failed." }

View File

@ -1,3 +1,5 @@
$ErrorActionPreference = "Stop"
# Needed for Invoke-WebRequest to work via CI. # Needed for Invoke-WebRequest to work via CI.
$progressPreference = "silentlyContinue" $progressPreference = "silentlyContinue"
@ -12,4 +14,5 @@ tar -xf boost.zip
cd boost_1_74_0 cd boost_1_74_0
.\bootstrap.bat .\bootstrap.bat
.\b2 -j4 -d0 link=static runtime-link=static variant=release threading=multi address-model=64 --with-filesystem --with-system --with-program_options --with-test --prefix="$PSScriptRoot\..\deps\boost" install .\b2 -j4 -d0 link=static runtime-link=static variant=release threading=multi address-model=64 --with-filesystem --with-system --with-program_options --with-test --prefix="$PSScriptRoot\..\deps\boost" install
if ( -not $? ) { throw "Error building boost." }
cd .. cd ..

View File

@ -0,0 +1,9 @@
$ErrorActionPreference = "Stop"
# Needed for Invoke-WebRequest to work via CI.
$progressPreference = "silentlyContinue"
Invoke-WebRequest -URI "https://github.com/ethereum/evmone/releases/download/v0.5.0/evmone-0.5.0-windows-amd64.zip" -OutFile "evmone.zip"
tar -xf evmone.zip "bin/evmone.dll"
mkdir deps
mv bin/evmone.dll deps