Add travis config

This commit is contained in:
Jackson Tian
2019-01-10 11:21:07 +08:00
parent bc0df2dcec
commit 6e65f364a1
3 changed files with 28 additions and 5 deletions

19
.travis.yaml Normal file
View File

@@ -0,0 +1,19 @@
sudo: require
language: cpp
compiler: gcc
before_install:
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- sudo apt-get update -qq
install:
- sudo apt-get install -qq g++-5
- sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-5 90
script:
- ./build.sh
- ./travis_qmake_gcc_cpp11_gcov
- ./get_code_cov.sh
after_success:
- bash <(curl -s https://codecov.io/bash)

View File

@@ -1,6 +1,8 @@
# Alibaba Cloud C++ Software Development Kit
[中文文档](./README_zh.md)
- [![Build Status](https://travis-ci.org/aliyun/aliyun-openapi-cpp-sdk.svg?branch=master)](https://travis-ci.org/aliyun/aliyun-openapi-cpp-sdk)
The Alibaba Cloud C++ Software Development Kit (SDK) allows you to access Alibaba Cloud services such as Elastic Compute Service (ECS), Server Load Balancer (SLB), and CloudMonitor. You can access Alibaba Cloud services without the need to handle API related tasks, such as signing and constructing your requests.
This document introduces how to obtain and call Alibaba Cloud C++ SDK.
@@ -64,18 +66,18 @@ int main(int argc, char** argv)
request.setPageSize(10);
auto outcome = client.describeInstances(request);
if (!outcome.isSuccess())
if (!outcome.isSuccess())
{
// Handle exceptions
std::cout << outcome.error().errorCode() << std::endl;
AlibabaCloud::ShutdownSdk();
return -1;
}
std::cout << "totalCount: " << outcome.result().getTotalCount() << std::endl;
// Close the SDK
AlibabaCloud::ShutdownSdk();
return 0;
}
```
```

View File

@@ -1,5 +1,7 @@
# 阿里云开发者C++工具套件
- [![Build Status](https://travis-ci.org/aliyun/aliyun-openapi-cpp-sdk.svg?branch=master)](https://travis-ci.org/aliyun/aliyun-openapi-cpp-sdk)
欢迎使用阿里云开发者工具套件SDK
适用于阿里云的 C++ SDK 提供了一组现代化的 C++C++ 11 或更高版本)接口,让您不用复杂编程即可访问云服务器、云监控等多个阿里云服务。
@@ -100,14 +102,14 @@ int main(int argc, char** argv)
request.setPageSize(10);
auto outcome = client.describeInstances(request);
if (!outcome.isSuccess())
if (!outcome.isSuccess())
{
// 异常处理
std::cout << outcome.error().errorCode() << std::endl;
AlibabaCloud::ShutdownSdk();
return -1;
}
std::cout << "totalCount: " << outcome.result().getTotalCount() << std::endl;
// 关闭 SDK