2018-06-25 11:29:12 +00:00
|
|
|
version: "{build}"
|
2019-05-15 11:44:03 +00:00
|
|
|
image: Visual Studio 2017
|
2018-06-25 11:29:12 +00:00
|
|
|
branches:
|
|
|
|
only:
|
|
|
|
- master
|
2018-08-13 15:42:26 +00:00
|
|
|
- /release\/.*/
|
2018-06-25 11:29:12 +00:00
|
|
|
- appveyor
|
|
|
|
- hunter
|
|
|
|
configuration:
|
|
|
|
- Release
|
|
|
|
environment:
|
|
|
|
matrix:
|
2019-05-15 11:44:03 +00:00
|
|
|
- VS: 2017
|
2019-06-25 08:36:32 +00:00
|
|
|
- VS: 2017-32bit
|
|
|
|
- VS: 2015
|
2018-08-22 16:03:55 +00:00
|
|
|
- GO: true
|
2018-06-25 12:58:25 +00:00
|
|
|
cache:
|
2019-05-06 09:23:12 +00:00
|
|
|
- C:\.hunter\_Base\Cache -> cmake\Hunter\init.cmake
|
2018-06-25 11:29:12 +00:00
|
|
|
|
2018-08-22 16:03:55 +00:00
|
|
|
before_build:
|
2019-05-15 11:44:03 +00:00
|
|
|
# Add ninja to PATH. This is done for VS2017 by vsdevcmd, but not for VS2015.
|
|
|
|
- set PATH=%PATH%;%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja
|
|
|
|
- if "%VS%" == "2017" (call "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\Common7\Tools\vsdevcmd" -arch=amd64)
|
2019-06-25 08:36:32 +00:00
|
|
|
- if "%VS%" == "2017-32bit" (call "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\Common7\Tools\vsdevcmd" -arch=x86)
|
2019-05-15 11:44:03 +00:00
|
|
|
- if "%VS%" == "2015" (call "%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\vcvarsall" x64)
|
2019-07-23 14:18:50 +00:00
|
|
|
- if defined VS cmake -S . -B build -G Ninja -Wno-dev -DTOOLCHAIN=cxx17-pic -DEVMC_TESTING=ON
|
2018-08-22 16:03:55 +00:00
|
|
|
|
|
|
|
build_script:
|
|
|
|
- ps: >-
|
2019-05-15 11:44:03 +00:00
|
|
|
if ($env:VS) {
|
2019-07-23 14:18:50 +00:00
|
|
|
cmake --build build --target package
|
2018-08-22 16:03:55 +00:00
|
|
|
}
|
|
|
|
elseif ($env:GO) {
|
|
|
|
$env:PATH = "C:\msys64\mingw64\bin;$env:PATH"
|
|
|
|
$env:GOPATH = "C:\Users\appveyor\go"
|
|
|
|
|
|
|
|
mkdir $env:GOPATH
|
|
|
|
gcc --version
|
|
|
|
go env
|
|
|
|
go get github.com/ethereum/go-ethereum/common
|
|
|
|
|
|
|
|
copy include/evmc/evmc.h bindings/go/evmc
|
|
|
|
copy include/evmc/helpers.h bindings/go/evmc
|
|
|
|
copy include/evmc/loader.h bindings/go/evmc
|
|
|
|
copy lib/loader/loader.c bindings/go/evmc
|
2018-06-25 11:29:12 +00:00
|
|
|
|
2018-08-22 16:03:55 +00:00
|
|
|
go build ./bindings/go/evmc
|
2019-03-12 12:53:07 +00:00
|
|
|
go generate ./bindings/go/evmc
|
2019-03-12 13:30:04 +00:00
|
|
|
go test -v ./bindings/go/evmc
|
2018-08-22 16:03:55 +00:00
|
|
|
}
|
2018-06-25 11:29:12 +00:00
|
|
|
|
2018-08-22 16:03:55 +00:00
|
|
|
after_build:
|
|
|
|
- ps: >-
|
2019-05-15 11:44:03 +00:00
|
|
|
if ($env:VS) {
|
|
|
|
cd build
|
2019-04-02 12:27:18 +00:00
|
|
|
ctest -C $env:CONFIGURATION -j4 --schedule-random --output-on-failure
|
2018-08-22 16:03:55 +00:00
|
|
|
}
|
2019-07-23 14:18:50 +00:00
|
|
|
|
|
|
|
artifacts:
|
|
|
|
- path: build\evmc-*.*
|
|
|
|
name: package
|