Skip to content

Commit

Permalink
Add Travis CI and Coverity automation.
Browse files Browse the repository at this point in the history
  • Loading branch information
gordonwang0 authored and Gordon Wang committed Apr 20, 2018
1 parent 67ba91d commit c9e98d2
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 0 deletions.
68 changes: 68 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
language: c

# Get Coverity certificate.
before_install:
- echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-

# Coverity configuration.
addons:
coverity_scan:
project:
name: "aws-iot-device-sdk-embedded-C"
description: "SDK for connecting to AWS IoT from a device using embedded C. "
notification_email: nobody@amazon.com
build_command_prepend: "cd tests/integration"
build_command: "make app"
branch_pattern: master

install:
# Remove placeholders.
- rm external_libs/CppUTest/*
- rm -rf external_libs/mbedTLS

# Get mbedtls.
- git clone https://github.com/ARMmbed/mbedtls.git external_libs/mbedTLS

# Get CppUTest.
- wget -qO- https://github.com/cpputest/cpputest/archive/v3.6.tar.gz | tar xvz -C external_libs/CppUTest --strip-components=1

script:
# Verify that the samples build.
- cd samples/linux/jobs_sample
- make
- cd ../shadow_sample
- make
- cd ../shadow_sample_console_echo
- make
- cd ../subscribe_publish_cpp_sample
- make
- cd ../subscribe_publish_library_sample
- make
- cd ../subscribe_publish_sample
- make

# Set the AWS IoT endpoint.
- cd ../../../tests/integration
- sed -i 's/^.*#define AWS_IOT_MQTT_HOST.*$/#define AWS_IOT_MQTT_HOST "'"$INTEGRATION_TEST_ENDPOINT"'"/' include/aws_iot_config.h

# Build the integration tests.
- make app

# Build the unit tests.
- cd ../../
- make build-cpputest
- make all_no_tests

# Execute unit tests.
- ./IotSdkC_tests

# Import credentials.
- echo -e $INTEGRATION_TEST_CLIENT_CERT > certs/cert.pem
- echo -e $INTEGRATION_TEST_ROOT_CA > certs/rootCA.crt
- echo -e $INTEGRATION_TEST_PRIVATE_KEY > certs/privkey.pem

# Execute integration tests.
- cd tests/integration
- ./integration_tests_mbedtls
- ./integration_tests_mbedtls_mt

8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@

[![Build Status](https://travis-ci.org/aws/aws-iot-device-sdk-embedded-C.svg?branch=master)](https://travis-ci.org/aws/aws-iot-device-sdk-embedded-C)

<a href="https://scan.coverity.com/projects/aws-iot-device-sdk-embedded-c">
<img alt="Coverity Scan Build Status"
src="https://scan.coverity.com/projects/15543/badge.svg"/>
</a>

## ***** NOTICE *****
This repository is moving to a new branching system. The master branch will now contain bug fixes/features that have been minimally tested to ensure nothing major is broken. The release branch will contain new releases for the SDK that have been tested thoroughly on all supported platforms. Please ensure that you are tracking the release branch for all production work.

Expand Down

0 comments on commit c9e98d2

Please sign in to comment.