forked from jprjr/turtlecoin
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
executable file
·127 lines (113 loc) · 4.23 KB
/
.travis.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
sudo: false
language: cpp
cache:
ccache: true
directories:
- /home/travis/toolchain
notifications:
webhooks:
urls:
- https://discordhooks.herokuapp.com/travis
on_success: always
on_failure: always
on_start: always
on_cancel: always
on_error: always
matrix:
include:
# Ubuntu, g++-8
- os: linux
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- libboost-all-dev
- libssl-dev
- g++-8
- gcc-8
env:
- MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
- LABEL="linux"
- _DEPLOYABLE="true"
- STRIP="strip"
# Ubuntu, g++-7
- os: linux
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- libboost-all-dev
- libssl-dev
- g++-7
- gcc-7
env:
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"
- LABEL="linux-g++-7"
- STRIP="strip"
# OSX, clang
- os: osx
osx_image: xcode10
compiler: clang
env:
- MATRIX_EVAL="CC=/usr/local/opt/llvm/bin/clang && CXX=/usr/local/opt/llvm/bin/clang++"
- LABEL="osx"
- _DEPLOYABLE="true"
- STRIP="strip"
# Arm (aarch64) cross compile
- os: linux
env:
- MATRIX_EVAL="CC=aarch64-linux-gnu-gcc && CXX=aarch64-linux-gnu-g++"
- LABEL="aarch64"
- _DEPLOYABLE="true"
- STRIP="aarch64-linux-gnu-strip"
before_install:
- eval $MATRIX_EVAL
install:
# Need to uninstall oclint to get newer gcc installed https://github.com/travis-ci/travis-ci/issues/8826
- if [[ "${LABEL:0:3}" == "osx" ]]; then brew cask uninstall --force oclint || true ; fi
# Need a newer version of llvm to link against to get std::filesystem / std::experimental::filesystem
- if [[ "${LABEL:0:3}" == "osx" ]]; then travis_retry brew install llvm || travis_retry brew upgrade llvm ; fi
# Need to make sure that we have openssl installed
- if [[ "${LABEL:0:3}" == "osx" ]]; then travis_retry brew install openssl || travis_retry brew upgrade openssl ; fi
- if [[ "${LABEL:0:3}" == "osx" ]]; then brew link --force openssl ; fi
- if [[ "${LABEL:0:3}" == "osx" ]]; then ln -s /usr/local/opt/openssl/include/openssl /usr/local/include ; fi
# Neeed to install ccache
- if [[ "${LABEL:0:3}" == "osx" ]]; then travis_retry brew install ccache ; fi
- if [[ "${LABEL:0:3}" == "osx" ]]; then export PATH="/usr/local/opt/ccache/libexec:$PATH" ; fi
script:
- eval $MATRIX_EVAL
# If we're cross compiling aarch64, make sure our build enivornment is setup
# we do this in the script stage because this happens after the repo is cloned
- if [[ "$LABEL" == "aarch64" ]]; then source scripts/prep-aarch64.sh ; fi
- mkdir build && cd build
- cmake -DARCH=default -DCMAKE_BUILD_TYPE=Release -DSTATIC=true ..
- make -j2
- if [[ "$LABEL" != "aarch64" ]]; then ./src/cryptotest ; fi
before_deploy:
- if [[ "${TRAVIS_TAG}" == "" ]]; then export TRAVIS_TAG=${TRAVIS_COMMIT} ; fi
- cd src
- TARGETS="BlogCoinDaemon blogcoin-miner BlogCoinWallet blogcoin-service BlogCoinWallet++ cryptotest wallet-api"
- ${STRIP} ${TARGETS}
- rm -rf BlogCoin-${TRAVIS_TAG}
- mkdir BlogCoin-${TRAVIS_TAG}
- cp ${TARGETS} BlogCoin-${TRAVIS_TAG}/
- cp ../../LICENSE BlogCoin-${TRAVIS_TAG}/
- tar cvfz BlogCoin-${TRAVIS_TAG}-${LABEL}.tar.gz BlogCoin-${TRAVIS_TAG}/
- rm -rf builds
- mkdir builds
- cp BlogCoin-${TRAVIS_TAG}-${LABEL}.tar.gz builds
deploy:
- provider: releases
api_key:
secure: iMIRE+iGreWGvMUyCdUWktvKKjkfaT55wKBY5kHj/xCUb/VDVImAa/3ldR2P+nPMN5MB4R+mWmY0oor6+30JTQlRofEV8NknHP9FLDGG2+DfVCoJ7Gh+15GtWKbsRbCBIFw5092PgI9en18ArLoDVcOGx0+uF3knwgnJKDynsI3FNkxr+D+gMrKhoZ5iZ7TDBBLax5RVjz36uSIdrzQyHns0bWUaK5p0dlovM0+Voo/XQXgppB30OCtzEexefY/GKEGnacMsJcnJs3tWbetbTVGtJ875l5O+9azQQtPOUDXyO6NBWhiYzOa29LCn3iIayHJzgfxcoReuYi8YW0yF+1ySuKHAEb8gzMjrlIGxVlvuckagyisj/clIl62WkezLB8VOgnERUgdqFsCcKej67X8pGCpchMSwApyYUrq17dLfR2f1rC56SkEUna9lmlRKusMe6K/nGHKTQ2jytgoMjDhOuqAIP0dY/An0o2Rh3j0gCqgaWjl1CrlU3ppJFdZeQdDhSQ+1q7Akrx3EL/vxLKpO1hCV1z5c6ZVc1P2XUMQmyOqZEkRzNWhMBFpAUeFax1yOy5bw7DbQlR+BV6jF5qmKNPCB1nJqDgqw/bV1ws++s2tuX/51OwpThBV7dWDlFC8PID6SnHWPHDW9jv+JhY0ePsFoogsKRcPkDXQp4iY=
file:
- BlogCoin-${TRAVIS_TAG}-${LABEL}.tar.gz
skip_cleanup: true
on:
repo: blognetwork/blogcoin
tags: true
condition: "$_DEPLOYABLE = true"