forked from ethereumproject/go-ethereum
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
55 lines (49 loc) · 2.22 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
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 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 ./...
- go build -tags=sputnikvm -ldflags "-X main.Version=%VERSION%" ./cmd/geth
- 7z a geth-classic-win64-%VERSION%.zip geth.exe
artifacts:
- path: '*.zip'
name: geth
before_deploy:
# Set up GCP upload.
- nuget install secure-file -ExcludeVersion
- secure-file\tools\secure-file -decrypt gcloud-appveyor.json.enc -secret %GCP_PASSWD% -out .gcloud.json
# Deploy on APPVEYOR_REPO_BRANCH=master or APPVEYOR_REPO_TAG=true
deploy_script:
- ps: >-
If (($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"
}