Skip to content

Fixed windows compile warning, added windows+VS14 CI #121

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jun 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 31 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- '!master'

env:
BUILDER_VERSION: v0.6.0
BUILDER_VERSION: v0.6.5
BUILDER_SOURCE: releases
BUILDER_HOST: https://d19elf31gohf1l.cloudfront.net
PACKAGE_NAME: aws-iot-device-sdk-cpp-v2
Expand All @@ -31,7 +31,7 @@ jobs:
echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u awslabs --password-stdin
export DOCKER_IMAGE=docker.pkg.github.com/awslabs/aws-crt-builder/aws-crt-${{ matrix.image }}:${{ env.BUILDER_VERSION }}
docker pull $DOCKER_IMAGE
docker run --env GITHUB_REF $DOCKER_IMAGE build -p ${{ env.PACKAGE_NAME }}
docker run --env GITHUB_REF $DOCKER_IMAGE build -p ${{ env.PACKAGE_NAME }}

al2:
runs-on: ubuntu-latest
Expand All @@ -42,8 +42,8 @@ jobs:
echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u awslabs --password-stdin
export DOCKER_IMAGE=docker.pkg.github.com/awslabs/aws-crt-builder/aws-crt-al2-x64:${{ env.BUILDER_VERSION }}
docker pull $DOCKER_IMAGE
docker run --env GITHUB_REF $DOCKER_IMAGE build -p ${{ env.PACKAGE_NAME }} al2-default-default-default-default-downstream
docker run --env GITHUB_REF $DOCKER_IMAGE build -p ${{ env.PACKAGE_NAME }} --spec=downstream

clang-compat:
runs-on: ubuntu-latest
strategy:
Expand All @@ -56,29 +56,50 @@ jobs:
echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u awslabs --password-stdin
export DOCKER_IMAGE=docker.pkg.github.com/awslabs/aws-crt-builder/aws-crt-${{ env.LINUX_BASE_IMAGE }}:${{ env.BUILDER_VERSION }}
docker pull $DOCKER_IMAGE
docker run --env GITHUB_REF $DOCKER_IMAGE build -p ${{ env.PACKAGE_NAME }} linux-clang-${{ matrix.version }}-linux-x64 --config Debug
docker run --env GITHUB_REF $DOCKER_IMAGE build -p ${{ env.PACKAGE_NAME }} --compiler=clang-${{ matrix.version }} --config Debug

gcc-compat:
runs-on: ubuntu-latest
strategy:
matrix:
version: [4.8, 5, 6, 7, 8]
version: [4.8, 5, 6, 7, 8]
steps:
# We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages
- name: Build ${{ env.PACKAGE_NAME }}
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u awslabs --password-stdin
export DOCKER_IMAGE=docker.pkg.github.com/awslabs/aws-crt-builder/aws-crt-${{ env.LINUX_BASE_IMAGE }}:${{ env.BUILDER_VERSION }}
docker pull $DOCKER_IMAGE
docker run --env GITHUB_REF $DOCKER_IMAGE build -p ${{ env.PACKAGE_NAME }} linux-gcc-${{ matrix.version }}-linux-x64
docker run --env GITHUB_REF $DOCKER_IMAGE build -p ${{ env.PACKAGE_NAME }} --compiler=gcc-${{ matrix.version }}

windows:
windows-vs16:
runs-on: windows-latest
steps:
- name: Build ${{ env.PACKAGE_NAME }} + consumers
run: |
md D:\a\work
cd D:\a\work
python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz', 'builder.pyz')"
python builder.pyz build -p ${{ env.PACKAGE_NAME }} default-downstream
python builder.pyz build -p ${{ env.PACKAGE_NAME }} --spec=downstream

windows-vs14:
runs-on: windows-latest
strategy:
matrix:
arch: [x86, x64]
steps:
- uses: ilammy/msvc-dev-cmd@v1
with:
toolset: 14.0
arch: ${{ matrix.arch }}
uwp: false
spectre: true
- name: Build ${{ env.PACKAGE_NAME }} + consumers
run: |
md D:\a\work
cd D:\a\work
python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
python builder.pyz build -p ${{ env.PACKAGE_NAME }} --spec=downstream

osx:
runs-on: macos-latest
Expand All @@ -87,6 +108,4 @@ jobs:
run: |
python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz', 'builder')"
chmod a+x builder
./builder build -p ${{ env.PACKAGE_NAME }} default-downstream


./builder build -p ${{ env.PACKAGE_NAME }} --spec=downstream
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ jobs:
steps:
- name: Checkout Sources
uses: actions/checkout@v1

- name: clang-format lint
uses: DoozyX/[email protected]
with:
# List of extensions to check
extensions: c,h
extensions: cpp,h
6 changes: 6 additions & 0 deletions identity/source/IotIdentityClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ namespace Aws
const OnSubscribeToCreateCertificateFromCsrAcceptedResponse &handler,
const OnSubscribeComplete &onSubAck)
{
(void)request;
auto onSubscribeComplete = [handler, onSubAck](
Aws::Crt::Mqtt::MqttConnection &,
uint16_t,
Expand Down Expand Up @@ -97,6 +98,7 @@ namespace Aws
const OnSubscribeToCreateKeysAndCertificateRejectedResponse &handler,
const OnSubscribeComplete &onSubAck)
{
(void)request;
auto onSubscribeComplete = [handler, onSubAck](
Aws::Crt::Mqtt::MqttConnection &,
uint16_t,
Expand Down Expand Up @@ -148,6 +150,7 @@ namespace Aws
const OnSubscribeToRegisterThingAcceptedResponse &handler,
const OnSubscribeComplete &onSubAck)
{
(void)request;
auto onSubscribeComplete = [handler, onSubAck](
Aws::Crt::Mqtt::MqttConnection &,
uint16_t,
Expand Down Expand Up @@ -199,6 +202,7 @@ namespace Aws
const OnSubscribeToRegisterThingRejectedResponse &handler,
const OnSubscribeComplete &onSubAck)
{
(void)request;
auto onSubscribeComplete = [handler, onSubAck](
Aws::Crt::Mqtt::MqttConnection &,
uint16_t,
Expand Down Expand Up @@ -250,6 +254,7 @@ namespace Aws
const OnSubscribeToCreateKeysAndCertificateAcceptedResponse &handler,
const OnSubscribeComplete &onSubAck)
{
(void)request;
auto onSubscribeComplete = [handler, onSubAck](
Aws::Crt::Mqtt::MqttConnection &,
uint16_t,
Expand Down Expand Up @@ -301,6 +306,7 @@ namespace Aws
const OnSubscribeToCreateCertificateFromCsrRejectedResponse &handler,
const OnSubscribeComplete &onSubAck)
{
(void)request;
auto onSubscribeComplete = [handler, onSubAck](
Aws::Crt::Mqtt::MqttConnection &,
uint16_t,
Expand Down
10 changes: 10 additions & 0 deletions jobs/source/IotJobsClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ namespace Aws
const OnSubscribeToUpdateJobExecutionAcceptedResponse &handler,
const OnSubscribeComplete &onSubAck)
{
(void)request;
auto onSubscribeComplete = [handler, onSubAck](
Aws::Crt::Mqtt::MqttConnection &,
uint16_t,
Expand Down Expand Up @@ -104,6 +105,7 @@ namespace Aws
const OnSubscribeToGetPendingJobExecutionsRejectedResponse &handler,
const OnSubscribeComplete &onSubAck)
{
(void)request;
auto onSubscribeComplete = [handler, onSubAck](
Aws::Crt::Mqtt::MqttConnection &,
uint16_t,
Expand Down Expand Up @@ -155,6 +157,7 @@ namespace Aws
const OnSubscribeToDescribeJobExecutionAcceptedResponse &handler,
const OnSubscribeComplete &onSubAck)
{
(void)request;
auto onSubscribeComplete = [handler, onSubAck](
Aws::Crt::Mqtt::MqttConnection &,
uint16_t,
Expand Down Expand Up @@ -206,6 +209,7 @@ namespace Aws
const OnSubscribeToDescribeJobExecutionRejectedResponse &handler,
const OnSubscribeComplete &onSubAck)
{
(void)request;
auto onSubscribeComplete = [handler, onSubAck](
Aws::Crt::Mqtt::MqttConnection &,
uint16_t,
Expand Down Expand Up @@ -257,6 +261,7 @@ namespace Aws
const OnSubscribeToUpdateJobExecutionRejectedResponse &handler,
const OnSubscribeComplete &onSubAck)
{
(void)request;
auto onSubscribeComplete = [handler, onSubAck](
Aws::Crt::Mqtt::MqttConnection &,
uint16_t,
Expand Down Expand Up @@ -308,6 +313,7 @@ namespace Aws
const OnSubscribeToJobExecutionsChangedEventsResponse &handler,
const OnSubscribeComplete &onSubAck)
{
(void)request;
auto onSubscribeComplete = [handler, onSubAck](
Aws::Crt::Mqtt::MqttConnection &,
uint16_t,
Expand Down Expand Up @@ -357,6 +363,7 @@ namespace Aws
const OnSubscribeToStartNextPendingJobExecutionRejectedResponse &handler,
const OnSubscribeComplete &onSubAck)
{
(void)request;
auto onSubscribeComplete = [handler, onSubAck](
Aws::Crt::Mqtt::MqttConnection &,
uint16_t,
Expand Down Expand Up @@ -408,6 +415,7 @@ namespace Aws
const OnSubscribeToNextJobExecutionChangedEventsResponse &handler,
const OnSubscribeComplete &onSubAck)
{
(void)request;
auto onSubscribeComplete = [handler, onSubAck](
Aws::Crt::Mqtt::MqttConnection &,
uint16_t,
Expand Down Expand Up @@ -457,6 +465,7 @@ namespace Aws
const OnSubscribeToGetPendingJobExecutionsAcceptedResponse &handler,
const OnSubscribeComplete &onSubAck)
{
(void)request;
auto onSubscribeComplete = [handler, onSubAck](
Aws::Crt::Mqtt::MqttConnection &,
uint16_t,
Expand Down Expand Up @@ -508,6 +517,7 @@ namespace Aws
const OnSubscribeToStartNextPendingJobExecutionAcceptedResponse &handler,
const OnSubscribeComplete &onSubAck)
{
(void)request;
auto onSubscribeComplete = [handler, onSubAck](
Aws::Crt::Mqtt::MqttConnection &,
uint16_t,
Expand Down
1 change: 0 additions & 1 deletion samples/identity/fleet_provisioning/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
#include <condition_variable>
#include <fstream>
#include <iostream>
#include <iostream>
#include <mutex>
#include <sstream>
#include <streambuf>
Expand Down
8 changes: 4 additions & 4 deletions shadow/cmake/IotShadow-cpp-config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ include(CMakeFindDependencyMacro)
find_dependency(aws-crt-cpp)

if (BUILD_SHARED_LIBS)
include(${CMAKE_CURRENT_LIST_DIR}/shared/@[email protected])
else ()
include(${CMAKE_CURRENT_LIST_DIR}/static/@[email protected])
endif()
include(${CMAKE_CURRENT_LIST_DIR}/shared/@[email protected])
else()
include(${CMAKE_CURRENT_LIST_DIR}/static/@[email protected])
endif()
8 changes: 8 additions & 0 deletions shadow/source/IotShadowClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ namespace Aws
const OnSubscribeToUpdateShadowRejectedResponse &handler,
const OnSubscribeComplete &onSubAck)
{
(void)request;
auto onSubscribeComplete = [handler, onSubAck](
Aws::Crt::Mqtt::MqttConnection &,
uint16_t,
Expand Down Expand Up @@ -101,6 +102,7 @@ namespace Aws
const OnSubscribeToDeleteShadowRejectedResponse &handler,
const OnSubscribeComplete &onSubAck)
{
(void)request;
auto onSubscribeComplete = [handler, onSubAck](
Aws::Crt::Mqtt::MqttConnection &,
uint16_t,
Expand Down Expand Up @@ -152,6 +154,7 @@ namespace Aws
const OnSubscribeToGetShadowAcceptedResponse &handler,
const OnSubscribeComplete &onSubAck)
{
(void)request;
auto onSubscribeComplete = [handler, onSubAck](
Aws::Crt::Mqtt::MqttConnection &,
uint16_t,
Expand Down Expand Up @@ -203,6 +206,7 @@ namespace Aws
const OnSubscribeToShadowUpdatedEventsResponse &handler,
const OnSubscribeComplete &onSubAck)
{
(void)request;
auto onSubscribeComplete = [handler, onSubAck](
Aws::Crt::Mqtt::MqttConnection &,
uint16_t,
Expand Down Expand Up @@ -254,6 +258,7 @@ namespace Aws
const OnSubscribeToShadowDeltaUpdatedEventsResponse &handler,
const OnSubscribeComplete &onSubAck)
{
(void)request;
auto onSubscribeComplete = [handler, onSubAck](
Aws::Crt::Mqtt::MqttConnection &,
uint16_t,
Expand Down Expand Up @@ -305,6 +310,7 @@ namespace Aws
const OnSubscribeToDeleteShadowAcceptedResponse &handler,
const OnSubscribeComplete &onSubAck)
{
(void)request;
auto onSubscribeComplete = [handler, onSubAck](
Aws::Crt::Mqtt::MqttConnection &,
uint16_t,
Expand Down Expand Up @@ -356,6 +362,7 @@ namespace Aws
const OnSubscribeToGetShadowRejectedResponse &handler,
const OnSubscribeComplete &onSubAck)
{
(void)request;
auto onSubscribeComplete = [handler, onSubAck](
Aws::Crt::Mqtt::MqttConnection &,
uint16_t,
Expand Down Expand Up @@ -407,6 +414,7 @@ namespace Aws
const OnSubscribeToUpdateShadowAcceptedResponse &handler,
const OnSubscribeComplete &onSubAck)
{
(void)request;
auto onSubscribeComplete = [handler, onSubAck](
Aws::Crt::Mqtt::MqttConnection &,
uint16_t,
Expand Down