Add travis config
This commit is contained in:
19
.travis.yaml
Normal file
19
.travis.yaml
Normal 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)
|
||||
@@ -1,6 +1,8 @@
|
||||
# Alibaba Cloud C++ Software Development Kit
|
||||
[中文文档](./README_zh.md)
|
||||
|
||||
- [](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;
|
||||
}
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
# 阿里云开发者C++工具套件
|
||||
|
||||
- [](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
|
||||
|
||||
Reference in New Issue
Block a user