Skip to content

Commit e2ef4c2

Browse files
committed
CI: gcc4.4 mbedtls test for older mbedtls versions
- Newer(3.6.x) mbedtls versions does not test builds on GCC versions as old as 4.4 - We keep this test for older mbedtls version (2.28.x)
1 parent 6b09ac0 commit e2ef4c2

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,10 @@ jobs:
123123
export CXX="clang++"
124124
fi
125125
echo "Using CC: $CC and CXX: $CXX"
126-
126+
127127
mkdir -p build
128128
cd build
129-
129+
130130
if [[ "${{ matrix.compiler }}" == "gcc" ]]; then
131131
# Skip building the tests for Mac with GCC
132132
# https://github.com/awslabs/aws-crt-cpp/issues/605
@@ -246,7 +246,7 @@ jobs:
246246
run: |
247247
mkdir build
248248
cd build
249-
cmake .. -DBUILD_TEST=ON -DENABLE_AWS_SDK_IN_TESTS=OFF -DUSE_OPENSSL=OFF -DUSE_MBEDTLS=ON
249+
cmake .. -DBUILD_TEST=ON -DENABLE_AWS_SDK_IN_TESTS=OFF -DUSE_OPENSSL=OFF -DUSE_MBEDTLS=ON -DBUILD_OLD_MBEDTLS_VERSION=ON
250250
make -j
251251
252252
- name: Configure AWS Credentials

CMake/Dependencies/libmbedtls-CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ project(libmbedtls-download NONE)
44

55
include(ExternalProject)
66

7+
if (BUILD_OLD_MBEDTLS_VERSION)
8+
SET(MBEDTLS_GIT_TAG "v2.28.8")
9+
else()
10+
SET(MBEDTLS_GIT_TAG "v3.6.3")
11+
endif()
12+
713
if (BUILD_STATIC_LIBS)
814
set(BUILD_SHARED 0)
915
else()
@@ -21,7 +27,7 @@ message(STATUS "C flags here are ${CMAKE_C_FLAGS}")
2127
ExternalProject_Add(
2228
project_libmbedtls
2329
GIT_REPOSITORY https://github.com/ARMmbed/mbedtls.git
24-
GIT_TAG v3.6.3
30+
GIT_TAG ${MBEDTLS_GIT_TAG}
2531
GIT_PROGRESS TRUE
2632
GIT_SHALLOW TRUE
2733
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/build

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ option(ENABLE_KVS_THREADPOOL "Enable support for KVS thread pool in signaling" O
2222
option(INSTRUMENTED_ALLOCATORS "Enable memory instrumentation" OFF)
2323
option(ENABLE_AWS_SDK_IN_TESTS "Enable support for compiling AWS SDKs for tests" ON)
2424
option(ENABLE_STATS_CALCULATION_CONTROL "Enable support for runtime control of ice agent stat calculations." OFF)
25+
option(BUILD_OLD_MBEDTLS_VERSION "Use MbedTLS version 2.28.8." OFF)
2526

2627
# Developer Flags
2728
option(BUILD_TEST "Build the testing tree." OFF)
@@ -182,6 +183,7 @@ if(BUILD_DEPENDENCIES)
182183
elseif(USE_MBEDTLS)
183184
set(BUILD_ARGS -DBUILD_STATIC_LIBS=${BUILD_STATIC_LIBS}
184185
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
186+
-DBUILD_OLD_MBEDTLS_VERSION=${BUILD_OLD_MBEDTLS_VERSION}
185187
"-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} -std=c99")
186188
build_dependency(mbedtls ${BUILD_ARGS})
187189
endif()
@@ -446,7 +448,7 @@ target_link_libraries(
446448
kvsWebrtcSignalingClient
447449
PUBLIC
448450
kvsCommonLws
449-
${LIBWEBSOCKETS_LIBRARIES}
451+
${LIBWEBSOCKETS_LIBRARIES}
450452
PRIVATE kvspicUtils
451453
kvspicState
452454
${CMAKE_THREAD_LIBS_INIT}

0 commit comments

Comments
 (0)