This repository has been archived by the owner on Jan 8, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
.appveyor.yml
62 lines (54 loc) · 2.5 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
61
62
# Rust needs at least Visual Studio 2013 Appveyor OS for MSVC targets.
image: Visual Studio 2015
environment:
GCP_PASSWD:
secure: /kPjA5Ff2c6ZDhU7y6TiUWiR4Jr4uXyLKWan35EXXTI=
branches:
only:
- master
## Install Script ##
install:
# Install janus.
- set PATH=C:\msys64\mingw64\bin;C:\msys64\usr\bin\;%PATH%
- 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')"
# https://github.com/rust-lang-nursery/rustup.rs/issues/1316#issuecomment-354156348
# Downgrade to use older, not-currently-broken version.
- appveyor DownloadFile https://static.rust-lang.org/rustup/archive/1.7.0/i686-pc-windows-gnu/rustup-init.exe -FileName rustup-init.exe
# Currently broken version.
# - appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe - rustup-init -yv --default-toolchain %channel% --default-host %target%
- rustup-init -yv --default-toolchain stable --default-host x86_64-pc-windows-msvc
- cmd: set PATH=%PATH%;%USERPROFILE%\.cargo\bin
- rustup update
- rustc -vV
- cargo -vV
- rustup component add rust-src
- for /f %%i in ('rustc --print sysroot') do set RUST_SRC_PATH=%%i\lib\rustlib\src\rust\src
- cmd: set RUST_BACKTRACE=1
- cmd: set RUSTFLAGS=-C target-feature=+crt-static
## Build Script ##
cache:
- '%USERPROFILE%\.cargo'
# Uses 'cargo build' to build. Alternatively, the project may call rustc directly or perform other
# build commands. Rust will automatically be placed in the PATH environment variable.
build_script:
- cargo build --all --verbose --release
- cp ./target/release/emerald-vault.exe ./target/release/emerald.exe
- 7z a emerald-cli-win-%VERSION%.zip ./target/release/emerald.exe
# Uses 'cargo test' to run tests and build. Alternatively, the project may call compiled programs
# directly or perform other testing commands. Rust will automatically be placed in the PATH
# environment variable.
test_script:
- cargo test --all --verbose %cargoflags%
artifacts:
- path: '*.zip'
name: emerald-cli
deploy_script:
- openssl aes-256-cbc -d -in gcloud-appveyor.json.enc -k %GCP_PASSWD% -out gcloud-appveyor.json -md sha256
- ps: >-
If ($env:APPVEYOR_REPO_BRANCH -eq 'master') {
janus.exe deploy -to="builds.etcdevteam.com/emerald-cli/$env:VERSION_BASE/" -files="./*.zip" -key="./gcloud-appveyor.json"
}
- rm gcloud-appveyor.json