forked from ethereumproject/go-ethereum
-
Notifications
You must be signed in to change notification settings - Fork 1
/
appveyor.yml
60 lines (54 loc) · 2.81 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
platform: x64
clone_folder: c:\gopath\src\github.com\ethereumproject\go-ethereum
os: Visual Studio 2015
environment:
GOPATH: c:\gopath
GCP_PASSWD:
secure: erzLJz7qT0kCJa+jZG6Sf9wwkfLYO2UDLzydkKTdwqA=
install:
- set PATH=%GOPATH%\bin;c:\go\bin;C:\msys64\mingw64\bin;C:\msys64\usr\bin\;%PATH%
# Install janus.
- curl -sL https://raw.githubusercontent.com/ethereumproject/janus/master/get-windows.sh | bash
- set PATH=./janusbin;%PATH%
- ps: $env:VERSION_BASE = "$(janus.exe version -format='v%M.%m.x')"
- ps: $env:VERSION = "$(janus.exe version -format='TAG_OR_NIGHTLY')"
# Install schroedinger.
- go get github.com/etcdevteam/go-schroedinger/cmd/schroedinger/...
# Install Rust.
- appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe
- rustup-init -yv --default-toolchain stable --default-host x86_64-pc-windows-gnu
- set PATH=%PATH%;%USERPROFILE%\.cargo\bin
- rustup update
- cd c:\gopath\src\github.com\ethereumproject
- git clone https://github.com/ethereumproject/sputnikvm-ffi
- cd c:\gopath\src\github.com\ethereumproject\sputnikvm-ffi\c\ffi
- cargo build --release
- copy c:\gopath\src\github.com\ethereumproject\sputnikvm-ffi\c\ffi\target\release\sputnikvm_ffi.lib c:\gopath\src\github.com\ethereumproject\sputnikvm-ffi\c\sputnikvm.lib
- set CGO_LDFLAGS=-Wl,--allow-multiple-definition c:\gopath\src\github.com\ethereumproject\sputnikvm-ffi\c\sputnikvm.lib -lws2_32 -luserenv
- cd c:\gopath\src\github.com\ethereumproject\go-ethereum
- echo %VERSION_BASE% %VERSION%
- echo %PATH%
- echo %GOPATH%
- go version
- go env
- go get golang.org/x/sys/windows
build_script:
- go test -tags="sputnikvm deterministic" ./...
- schroedinger.exe -t 5 -f .\schroedinger-tests.txt
- go build -tags=sputnikvm -ldflags "-X main.Version=%VERSION%" github.com/ethereumproject/go-ethereum/cmd/geth
- ps: >-
.\geth.exe version | Where {$_ -match "^Version: "} | %{$actual=($_ -split "\s+")[1];If($actual -ne $env:VERSION){"Expected: `"$env:VERSION`", got: `"$ACTUAL`""; exit 1}}
- 7z a geth-classic-win64-%VERSION%.zip geth.exe
before_deploy:
# Set up GCP upload.
- ps: >-
If (($env:APPVEYOR_REPO_NAME -eq 'ethereumproject/go-ethereum') -and (($env:APPVEYOR_REPO_BRANCH -eq 'master') -or ($env:APPVEYOR_REPO_TAG -eq 'true'))) {
nuget install secure-file -ExcludeVersion
secure-file\tools\secure-file -decrypt gcloud-appveyor.json.enc -secret "$env:GCP_PASSWD" -out .gcloud.json
}
# Deploy on APPVEYOR_REPO_BRANCH=master or APPVEYOR_REPO_TAG=true
deploy_script:
- ps: >-
If (($env:APPVEYOR_REPO_NAME -eq 'ethereumproject/go-ethereum') -and (($env:APPVEYOR_REPO_BRANCH -eq 'master') -or ($env:APPVEYOR_REPO_TAG -eq 'true'))) {
janus.exe deploy -to="builds.etcdevteam.com/go-ethereum/$env:VERSION_BASE/" -files="./*.zip" -key="./.gcloud.json"
}