forked from hyperledger/fabric-private-chaincode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
88 lines (80 loc) · 3.13 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
# Copyright IBM Corp. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
dist: bionic
language: go
go:
- 1.14.1
sudo: required
services:
docker
addons:
apt:
packages:
- protobuf-compiler
- python-protobuf
go_import_path: github.com/hyperledger-labs/fabric-private-chaincode
env:
global:
# SGX config
- SGX_MODE=SIM
- SGX_SDK=/opt/intel/sgxsdk
# SGX SSL
- OPENSSL_VERSION=1.1.0j
- SGXSSL_VERSION=v2.4.1
- SGX_SSL=/opt/intel/sgxssl
# NANOPB
- NANOPB_VERSION=0.3.9.2
- NANOPB_PATH=${HOME}/nanopb
# FABRIC
- FABRIC_VERSION=2.1.1
- FABRIC_PATH=$GOPATH/src/github.com/hyperledger/fabric
# FPC
- FPC_PATH=$GOPATH/src/github.com/hyperledger-labs/fabric-private-chaincode
# SGX
- PATH=$PATH:$SGX_SDK/bin:$SGX_SDK/bin/x64
- PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$SGX_SDK/pkgconfig
- LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SGX_SDK/sdk_libs
- SGX_REPO=https://download.01.org/intel-sgx/linux-2.6/ubuntu18.04-server
- SGX_LIB_COMMON=libsgx-enclave-common_2.6.100.51363-bionic1_amd64.deb
- SGX_SDK_BIN=sgx_linux_x64_sdk_2.6.100.51363.bin
# new protobuf
- PROTO_VERSION=3.11.4
- PROTO_ZIP=protoc-${PROTO_VERSION}-linux-x86_64.zip
- PROTO_REPO=https://github.com/google/protobuf/releases/download
- PROTO_DIR=/usr/local/proto3
- PROTOC_CMD=${PROTO_DIR}/bin/protoc
before_install:
# git settings
- git config --global user.email "fpc_tester@fpc"
- git config --global user.name "fpc_tester"
# SGX SDK
- mkdir -p /opt/intel && mkdir -p /etc/init
- pushd /opt/intel; wget ${SGX_REPO}/${SGX_LIB_COMMON}
- sudo dpkg -i ${SGX_LIB_COMMON}
- wget ${SGX_REPO}/${SGX_SDK_BIN}
- chmod +x ${SGX_SDK_BIN}
- sudo sh -c "echo 'yes' | ./${SGX_SDK_BIN}"; popd
# SGX SSL
- pushd $HOME; git clone --branch ${SGXSSL_VERSION} https://github.com/intel/intel-sgx-ssl.git
- OPENSSL_MAJOR_VERSION=$(echo ${OPENSSL_VERSION} | sed 's/\([^0-9.]\)*//g'); wget https://www.openssl.org/source/old/${OPENSSL_MAJOR_VERSION}/openssl-${OPENSSL_VERSION}.tar.gz; mv openssl-${OPENSSL_VERSION}.tar.gz intel-sgx-ssl/openssl_source
- cd intel-sgx-ssl/Linux; make SGX_MODE=SIM DESTDIR=$SGX_SSL all test
- cd intel-sgx-ssl/Linux; make install; popd
# NANOPB
- git clone https://github.com/nanopb/nanopb.git ${NANOPB_PATH}
- pushd ${NANOPB_PATH} && git checkout nanopb-${NANOPB_VERSION} && cd generator/proto && make && popd
# Newer Protobuf
- wget ${PROTO_REPO}/v${PROTO_VERSION}/${PROTO_ZIP}; sudo unzip ${PROTO_ZIP} -d ${PROTO_DIR}
# Fabric
- git clone https://github.com/hyperledger/fabric.git $FABRIC_PATH
- pushd $FABRIC_PATH; git checkout v${FABRIC_VERSION}; popd;
script:
# * test directly on host
# - make all clobber
# NOTE: disabled as it will reach the 50 min limits. Testing inside dev container
# hopefully/presumably should hopefully be a super-set of the host build/test
#
# * test that it also runs properly in dev container
- make -C utils/docker run DOCKER_DEV_OPTIONAL_CMD='make all clobber'
# Note: travis of couse does an implicit clobber but adding it here makes sure
# it works properly, also to make sure below is clean-slate