Additional fixes for vcpkg installation

This commit is contained in:
Ewerton Scaboro da Silva 2019-05-17 18:35:16 +00:00
Родитель e31dc83ebf
Коммит bce0fc0c9c
7 изменённых файлов: 92 добавлений и 6 удалений

Просмотреть файл

@ -66,9 +66,24 @@ if(NOT ${use_installed_dependencies})
endif()
endif()
set_platform_files(${SHARED_UTIL_FOLDER})
else()
if (NOT azure_macro_utils_cFOUND)
find_package(azure_macro_utils_c REQUIRED CONFIG)
endif ()
if (NOT umock_cFOUND)
find_package(umock_c REQUIRED CONFIG)
endif ()
if (NOT azure_c_shared_utilityFOUND)
find_package(azure_c_shared_utility REQUIRED CONFIG)
endif ()
include(${azure_c_shared_utility_DIR}/azure_c_shared_utilityConfig.cmake)
include(${azure_c_shared_utility_DIR}/azure_c_shared_utilityFunctions.cmake)
include(${azure_c_shared_utility_DIR}/azure_iot_build_rules.cmake)
endif()
set_platform_files(${SHARED_UTIL_FOLDER})
set(run_e2e_tests ${original_run_e2e_tests})
set(run_unittests ${original_run_unittests})
@ -90,7 +105,7 @@ set(source_h_files
#the following "set" statetement exports across the project a global variable called COMMON_INC_FOLDER that expands to whatever needs to included when using COMMON library
set(MQTT_INC_FOLDER ${CMAKE_CURRENT_LIST_DIR}/inc CACHE INTERNAL "this is what needs to be included if using sharedLib lib" FORCE)
set(MQTT_SRC_FOLDER ${CMAKE_CURRENT_LIST_DIR}/src CACHE INTERNAL "this is what needs to be included when doing include sources" FORCE)
include_directories(${MQTT_INC_FOLDER} ${SHARED_UTIL_INC_FOLDER} ${MACRO_UTILS_INC_FOLDER})
include_directories(${MQTT_INC_FOLDER} ${SHARED_UTIL_INC_FOLDER} ${UMOCK_C_INC_FOLDER} ${MACRO_UTILS_INC_FOLDER})
get_directory_property(hasParent PARENT_DIRECTORY)
if (hasParent)

Просмотреть файл

@ -264,6 +264,41 @@ jobs:
- script: sudo rm -rf $(Agent.BuildDirectory)/*
displayName: 'cleanup'
condition: always()
- job: linux_install_deps
variables:
_PREVIEW_VSTS_DOCKER_IMAGE: "aziotbld/c-debian"
pool: aziotbld-lin01
displayName: 'linux_install_deps'
steps:
- script: |
if [ -f "jenkins/linux_install_deps.sh" ]
then
sudo chmod 755 jenkins/linux_install_deps.sh
sudo -E ./jenkins/linux_install_deps.sh
sudo jenkins/linux_install_deps.sh
fi
displayName: 'build'
env:
IOTHUB_CONNECTION_STRING: $(IOTHUB-CONNECTION-STRING)
IOTHUB_EVENTHUB_CONNECTION_STRING: $(IOTHUB-EVENTHUB-CONNECTION-STRING)
IOTHUB_E2E_X509_CERT_BASE64: $(IOTHUB-E2E-X509-CERT-BASE64)
IOTHUB_E2E_X509_PRIVATE_KEY_BASE64: $(IOTHUB-E2E-X509-PRIVATE-KEY-BASE64)
IOTHUB_E2E_X509_THUMBPRINT: $(IOTHUB-E2E-X509-THUMBPRINT)
IOTHUB_POLICY_KEY: $(IOTHUB-POLICY-KEY)
IOTHUB_PARTITION_COUNT: $(IOTHUB-PARTITION-COUNT)
STORAGE_ACCOUNT_CONNECTION_STRING: $(STORAGE-ACCOUNT-CONNECTION-STRING)
IOT_DPS_CONNECTION_STRING: $(IOT-DPS-CONNECTION-STRING)
IOT_DPS_ID_SCOPE: $(IOT-DPS-ID-SCOPE)
IOTHUB_CA_ROOT_CERT: $(IOTHUB-CA-ROOT-CERT)
IOTHUB_CA_ROOT_CERT_KEY: $(IOTHUB-CA-ROOT-CERT-KEY)
IOT_DPS_GLOBAL_ENDPOINT: $(IOT-DPS-GLOBAL-ENDPOINT)
IOTHUB_DEVICE_CONN_STRING_INVALIDCERT: $(IOTHUB-DEVICE-CONN-STRING-INVALIDCERT)
IOTHUB_CONN_STRING_INVALIDCERT: $(IOTHUB-CONN-STRING-INVALIDCERT)
DPS_GLOBALDEVICEENDPOINT_INVALIDCERT: $(DPS-GLOBALDEVICEENDPOINT-INVALIDCERT)
PROVISIONING_CONNECTION_STRING_INVALIDCERT: $(PROVISIONING-CONNECTION-STRING-INVALIDCERT)
- script: sudo rm -rf $(Agent.BuildDirectory)/*
displayName: 'cleanup'
condition: always()
- job: debian
variables:
_PREVIEW_VSTS_DOCKER_IMAGE: "aziotbld/c-debian"

2
deps/azure-macro-utils-c поставляемый

@ -1 +1 @@
Subproject commit b981b9a91ddb63ef5dc0c0bde9a636b93c5cf7a0
Subproject commit 38729b4b7ac3ea8b7d71e394782b861ecb25193e

2
deps/c-utility поставляемый

@ -1 +1 @@
Subproject commit 1ce85ea5bf78784da91ff81d20700ca1be90ca7c
Subproject commit f0642196af85aeb4f2717d9cc11176290f321fb8

2
deps/testrunnerswitcher поставляемый

@ -1 +1 @@
Subproject commit a5e1543387c41c58e3bf8a439b18e755b7e5c904
Subproject commit 338cd4319931622da015f0767ac35fd04472199b

2
deps/umock-c поставляемый

@ -1 +1 @@
Subproject commit 4fddb18c10b075e8d69511630b31375e72586a45
Subproject commit 92772d9d8317a37dd0b656e95877ffb03bc67e92

36
jenkins/linux_install_deps.sh Executable file
Просмотреть файл

@ -0,0 +1,36 @@
#!/bin/bash
# Copyright (c) Microsoft. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
set -e
# Print version
cat /etc/*release | grep VERSION*
gcc --version
# Set the default cores
CORES=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || sysctl -n hw.ncpu)
build_root=$(cd "$(dirname "$0")/.." && pwd)
clone_root=$(cd "$(dirname "$0")/../.." && pwd)
cd $build_root
echo "Build Root $build_root"
sdk_build_folder=$build_root"/cmake/install_deps"
# Build the SDK
rm -rf $sdk_build_folder
mkdir -p $sdk_build_folder
pushd $sdk_build_folder
cmake $build_root
make install --jobs=$CORES
popd
# Now use the deps
rm -rf $sdk_build_folder
mkdir -p $sdk_build_folder
pushd $sdk_build_folder
cmake $build_root -Duse_installed_dependencies=ON
make --jobs=$CORES
popd