mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-25 17:55:42 +01:00
Merge pull request #3247 from gilles-peskine-arm/travis-rationalize-2.16
Backport 2.16: Rationalize Travis builds
This commit is contained in:
commit
0f593416e0
72
.travis.yml
72
.travis.yml
@ -1,48 +1,64 @@
|
|||||||
language: c
|
language: c
|
||||||
compiler:
|
compiler: gcc
|
||||||
- clang
|
|
||||||
- gcc
|
|
||||||
sudo: false
|
sudo: false
|
||||||
cache: ccache
|
cache: ccache
|
||||||
|
|
||||||
# blocklist
|
jobs:
|
||||||
branches:
|
include:
|
||||||
except:
|
- name: basic checks and reference configurations
|
||||||
- development-psa
|
addons:
|
||||||
- coverity_scan
|
apt:
|
||||||
|
packages:
|
||||||
|
- gnutls-bin
|
||||||
|
- doxygen
|
||||||
|
- graphviz
|
||||||
|
- gcc-arm-none-eabi
|
||||||
|
- libnewlib-arm-none-eabi
|
||||||
|
language: python # Needed to get pip for Python 3
|
||||||
|
python: 3.5 # version from Ubuntu 16.04
|
||||||
|
install:
|
||||||
|
- pip install pylint==2.4.4
|
||||||
|
script:
|
||||||
|
- tests/scripts/all.sh -k 'check_*'
|
||||||
|
- tests/scripts/all.sh -k test_default_out_of_box
|
||||||
|
- tests/scripts/test-ref-configs.pl
|
||||||
|
- tests/scripts/all.sh -k build_arm_none_eabi_gcc_arm5vte build_arm_none_eabi_gcc_m0plus
|
||||||
|
|
||||||
|
- name: full configuration
|
||||||
|
script:
|
||||||
|
- tests/scripts/all.sh -k test_full_cmake_gcc_asan
|
||||||
|
|
||||||
|
- name: check compilation guards
|
||||||
|
script:
|
||||||
|
- tests/scripts/all.sh -k 'test_depends_*' 'build_key_exchanges'
|
||||||
|
|
||||||
|
- name: macOS
|
||||||
|
os: osx
|
||||||
|
compiler: clang
|
||||||
|
script:
|
||||||
|
- tests/scripts/all.sh -k test_default_out_of_box
|
||||||
|
|
||||||
|
- name: Windows
|
||||||
|
os: windows
|
||||||
|
script:
|
||||||
|
- scripts/windows_msbuild.bat v141 # Visual Studio 2017
|
||||||
|
|
||||||
script:
|
|
||||||
- tests/scripts/recursion.pl library/*.c
|
|
||||||
- tests/scripts/check-generated-files.sh
|
|
||||||
- tests/scripts/check-doxy-blocks.pl
|
|
||||||
- tests/scripts/check-names.sh
|
|
||||||
- tests/scripts/check-files.py
|
|
||||||
- tests/scripts/doxygen.sh
|
|
||||||
- cmake -D CMAKE_BUILD_TYPE:String="Check" .
|
|
||||||
- make
|
|
||||||
- make test
|
|
||||||
- programs/test/selftest
|
|
||||||
- OSSL_NO_DTLS=1 tests/compat.sh
|
|
||||||
- tests/ssl-opt.sh -e '\(DTLS\|SCSV\).*openssl'
|
|
||||||
- tests/scripts/test-ref-configs.pl
|
|
||||||
- tests/scripts/curves.pl
|
|
||||||
- tests/scripts/key-exchanges.pl
|
|
||||||
after_failure:
|
after_failure:
|
||||||
- tests/scripts/travis-log-failure.sh
|
- tests/scripts/travis-log-failure.sh
|
||||||
|
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
- SEED=1
|
- SEED=1
|
||||||
- secure: "barHldniAfXyoWOD/vcO+E6/Xm4fmcaUoC9BeKW+LwsHqlDMLvugaJnmLXkSpkbYhVL61Hzf3bo0KPJn88AFc5Rkf8oYHPjH4adMnVXkf3B9ghHCgznqHsAH3choo6tnPxaFgOwOYmLGb382nQxfE5lUdvnM/W/psQjWt66A1+k="
|
- secure: "FrI5d2s+ckckC17T66c8jm2jV6i2DkBPU5nyWzwbedjmEBeocREfQLd/x8yKpPzLDz7ghOvr+/GQvsPPn0dVkGlNzm3Q+hGHc/ujnASuUtGrcuMM+0ALnJ3k4rFr9xEvjJeWb4SmhJO5UCAZYvTItW4k7+bj9L+R6lt3TzQbXzg="
|
||||||
|
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
- doxygen
|
- gnutls-bin
|
||||||
- graphviz
|
|
||||||
coverity_scan:
|
coverity_scan:
|
||||||
project:
|
project:
|
||||||
name: "ARMmbed/mbedtls"
|
name: "ARMmbed/mbedtls"
|
||||||
notification_email: simon.butcher@arm.com
|
notification_email: support-mbedtls@arm.com
|
||||||
build_command_prepend:
|
build_command_prepend:
|
||||||
build_command: make
|
build_command: make
|
||||||
branch_pattern: coverity_scan
|
branch_pattern: coverity_scan
|
||||||
|
20
scripts/windows_msbuild.bat
Normal file
20
scripts/windows_msbuild.bat
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
@rem Build and test Mbed TLS with Visual Studio using msbuild.
|
||||||
|
@rem Usage: windows_msbuild [RETARGET]
|
||||||
|
@rem RETARGET: version of Visual Studio to emulate
|
||||||
|
@rem https://docs.microsoft.com/en-us/cpp/build/how-to-modify-the-target-framework-and-platform-toolset
|
||||||
|
|
||||||
|
@rem These parameters are hard-coded for now.
|
||||||
|
set "arch=x64" & @rem "x86" or "x64"
|
||||||
|
set "cfg=Release" & @rem "Debug" or "Release"
|
||||||
|
set "vcvarsall=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat"
|
||||||
|
|
||||||
|
if not "%~1"=="" set "retarget=,PlatformToolset=%1"
|
||||||
|
|
||||||
|
@rem If the %USERPROFILE%\Source directory exists, then running
|
||||||
|
@rem vcvarsall.bat will silently change the directory to that directory.
|
||||||
|
@rem Setting the VSCMD_START_DIR environment variable causes it to change
|
||||||
|
@rem to that directory instead.
|
||||||
|
set "VSCMD_START_DIR=%~dp0\..\visualc\VS2010"
|
||||||
|
|
||||||
|
"%vcvarsall%" x64 && ^
|
||||||
|
msbuild /t:Rebuild /p:Configuration=%cfg%%retarget% /m mbedTLS.sln
|
@ -131,6 +131,7 @@ pre_initialize_variables () {
|
|||||||
: ${OUT_OF_SOURCE_DIR:=./mbedtls_out_of_source_build}
|
: ${OUT_OF_SOURCE_DIR:=./mbedtls_out_of_source_build}
|
||||||
: ${ARMC5_BIN_DIR:=/usr/bin}
|
: ${ARMC5_BIN_DIR:=/usr/bin}
|
||||||
: ${ARMC6_BIN_DIR:=/usr/bin}
|
: ${ARMC6_BIN_DIR:=/usr/bin}
|
||||||
|
: ${ARM_NONE_EABI_GCC_PREFIX:=arm-none-eabi-}
|
||||||
|
|
||||||
# if MAKEFLAGS is not set add the -j option to speed up invocations of make
|
# if MAKEFLAGS is not set add the -j option to speed up invocations of make
|
||||||
if [ -z "${MAKEFLAGS+set}" ]; then
|
if [ -z "${MAKEFLAGS+set}" ]; then
|
||||||
@ -192,6 +193,9 @@ General options:
|
|||||||
-f|--force Force the tests to overwrite any modified files.
|
-f|--force Force the tests to overwrite any modified files.
|
||||||
-k|--keep-going Run all tests and report errors at the end.
|
-k|--keep-going Run all tests and report errors at the end.
|
||||||
-m|--memory Additional optional memory tests.
|
-m|--memory Additional optional memory tests.
|
||||||
|
--arm-none-eabi-gcc-prefix=<string>
|
||||||
|
Prefix for a cross-compiler for arm-none-eabi
|
||||||
|
(default: "${ARM_NONE_EABI_GCC_PREFIX}")
|
||||||
--armcc Run ARM Compiler builds (on by default).
|
--armcc Run ARM Compiler builds (on by default).
|
||||||
--except Exclude the COMPONENTs listed on the command line,
|
--except Exclude the COMPONENTs listed on the command line,
|
||||||
instead of running only those.
|
instead of running only those.
|
||||||
@ -276,9 +280,13 @@ armc6_build_test()
|
|||||||
{
|
{
|
||||||
FLAGS="$1"
|
FLAGS="$1"
|
||||||
|
|
||||||
msg "build: ARM Compiler 6 ($FLAGS), make"
|
msg "build: ARM Compiler 6 ($FLAGS)"
|
||||||
ARM_TOOL_VARIANT="ult" CC="$ARMC6_CC" AR="$ARMC6_AR" CFLAGS="$FLAGS" \
|
ARM_TOOL_VARIANT="ult" CC="$ARMC6_CC" AR="$ARMC6_AR" CFLAGS="$FLAGS" \
|
||||||
WARNING_CFLAGS='-xc -std=c99' make lib
|
WARNING_CFLAGS='-xc -std=c99' make lib
|
||||||
|
|
||||||
|
msg "size: ARM Compiler 6 ($FLAGS)"
|
||||||
|
"$ARMC6_FROMELF" -z library/*.o
|
||||||
|
|
||||||
make clean
|
make clean
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -312,6 +320,7 @@ pre_parse_command_line () {
|
|||||||
|
|
||||||
while [ $# -gt 0 ]; do
|
while [ $# -gt 0 ]; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
--arm-none-eabi-gcc-prefix) shift; ARM_NONE_EABI_GCC_PREFIX="$1";;
|
||||||
--armcc) no_armcc=;;
|
--armcc) no_armcc=;;
|
||||||
--armc5-bin-dir) shift; ARMC5_BIN_DIR="$1";;
|
--armc5-bin-dir) shift; ARMC5_BIN_DIR="$1";;
|
||||||
--armc6-bin-dir) shift; ARMC6_BIN_DIR="$1";;
|
--armc6-bin-dir) shift; ARMC6_BIN_DIR="$1";;
|
||||||
@ -511,7 +520,7 @@ pre_check_tools () {
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
case " $RUN_COMPONENTS " in
|
case " $RUN_COMPONENTS " in
|
||||||
*_arm_none_eabi_gcc[_\ ]*) check_tools "arm-none-eabi-gcc";;
|
*_arm_none_eabi_gcc[_\ ]*) check_tools "${ARM_NONE_EABI_GCC_PREFIX}gcc";;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case " $RUN_COMPONENTS " in
|
case " $RUN_COMPONENTS " in
|
||||||
@ -526,9 +535,12 @@ pre_check_tools () {
|
|||||||
*_armcc*)
|
*_armcc*)
|
||||||
ARMC5_CC="$ARMC5_BIN_DIR/armcc"
|
ARMC5_CC="$ARMC5_BIN_DIR/armcc"
|
||||||
ARMC5_AR="$ARMC5_BIN_DIR/armar"
|
ARMC5_AR="$ARMC5_BIN_DIR/armar"
|
||||||
|
ARMC5_FROMELF="$ARMC5_BIN_DIR/fromelf"
|
||||||
ARMC6_CC="$ARMC6_BIN_DIR/armclang"
|
ARMC6_CC="$ARMC6_BIN_DIR/armclang"
|
||||||
ARMC6_AR="$ARMC6_BIN_DIR/armar"
|
ARMC6_AR="$ARMC6_BIN_DIR/armar"
|
||||||
check_tools "$ARMC5_CC" "$ARMC5_AR" "$ARMC6_CC" "$ARMC6_AR";;
|
ARMC6_FROMELF="$ARMC6_BIN_DIR/fromelf"
|
||||||
|
check_tools "$ARMC5_CC" "$ARMC5_AR" "$ARMC5_FROMELF" \
|
||||||
|
"$ARMC6_CC" "$ARMC6_AR" "$ARMC6_FROMELF";;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
msg "info: output_env.sh"
|
msg "info: output_env.sh"
|
||||||
@ -618,7 +630,7 @@ component_test_default_out_of_box () {
|
|||||||
make test
|
make test
|
||||||
|
|
||||||
msg "selftest: make, default config (out-of-box)" # ~10s
|
msg "selftest: make, default config (out-of-box)" # ~10s
|
||||||
programs/test/selftest
|
if_build_succeeded programs/test/selftest
|
||||||
}
|
}
|
||||||
|
|
||||||
component_test_default_cmake_gcc_asan () {
|
component_test_default_cmake_gcc_asan () {
|
||||||
@ -629,6 +641,9 @@ component_test_default_cmake_gcc_asan () {
|
|||||||
msg "test: main suites (inc. selftests) (ASan build)" # ~ 50s
|
msg "test: main suites (inc. selftests) (ASan build)" # ~ 50s
|
||||||
make test
|
make test
|
||||||
|
|
||||||
|
msg "test: selftest (ASan build)" # ~ 10s
|
||||||
|
if_build_succeeded programs/test/selftest
|
||||||
|
|
||||||
msg "test: ssl-opt.sh (ASan build)" # ~ 1 min
|
msg "test: ssl-opt.sh (ASan build)" # ~ 1 min
|
||||||
if_build_succeeded tests/ssl-opt.sh
|
if_build_succeeded tests/ssl-opt.sh
|
||||||
|
|
||||||
@ -645,6 +660,9 @@ component_test_full_cmake_gcc_asan () {
|
|||||||
msg "test: main suites (inc. selftests) (full config, ASan build)"
|
msg "test: main suites (inc. selftests) (full config, ASan build)"
|
||||||
make test
|
make test
|
||||||
|
|
||||||
|
msg "test: selftest (ASan build)" # ~ 10s
|
||||||
|
if_build_succeeded programs/test/selftest
|
||||||
|
|
||||||
msg "test: ssl-opt.sh (full config, ASan build)"
|
msg "test: ssl-opt.sh (full config, ASan build)"
|
||||||
if_build_succeeded tests/ssl-opt.sh
|
if_build_succeeded tests/ssl-opt.sh
|
||||||
|
|
||||||
@ -1238,45 +1256,63 @@ component_test_no_64bit_multiplication () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
component_build_arm_none_eabi_gcc () {
|
component_build_arm_none_eabi_gcc () {
|
||||||
msg "build: arm-none-eabi-gcc, make" # ~ 10s
|
msg "build: ${ARM_NONE_EABI_GCC_PREFIX}gcc -O1" # ~ 10s
|
||||||
scripts/config.pl baremetal
|
scripts/config.pl baremetal
|
||||||
make CC=arm-none-eabi-gcc AR=arm-none-eabi-ar LD=arm-none-eabi-ld CFLAGS='-Werror -Wall -Wextra' lib
|
make CC="${ARM_NONE_EABI_GCC_PREFIX}gcc" AR="${ARM_NONE_EABI_GCC_PREFIX}ar" LD="${ARM_NONE_EABI_GCC_PREFIX}ld" CFLAGS='-Werror -Wall -Wextra -O1' lib
|
||||||
|
|
||||||
|
msg "size: ${ARM_NONE_EABI_GCC_PREFIX}gcc -O1"
|
||||||
|
${ARM_NONE_EABI_GCC_PREFIX}size library/*.o
|
||||||
}
|
}
|
||||||
|
|
||||||
component_build_arm_none_eabi_gcc_arm5vte () {
|
component_build_arm_none_eabi_gcc_arm5vte () {
|
||||||
msg "build: arm-none-eabi-gcc -march=arm5vte, make" # ~ 10s
|
msg "build: ${ARM_NONE_EABI_GCC_PREFIX}gcc -march=arm5vte" # ~ 10s
|
||||||
scripts/config.pl baremetal
|
scripts/config.pl baremetal
|
||||||
# Build for a target platform that's close to what Debian uses
|
# Build for a target platform that's close to what Debian uses
|
||||||
# for its "armel" distribution (https://wiki.debian.org/ArmEabiPort).
|
# for its "armel" distribution (https://wiki.debian.org/ArmEabiPort).
|
||||||
# See https://github.com/ARMmbed/mbedtls/pull/2169 and comments.
|
# See https://github.com/ARMmbed/mbedtls/pull/2169 and comments.
|
||||||
# It would be better to build with arm-linux-gnueabi-gcc but
|
# It would be better to build with arm-linux-gnueabi-gcc but
|
||||||
# we don't have that on our CI at this time.
|
# we don't have that on our CI at this time.
|
||||||
make CC=arm-none-eabi-gcc AR=arm-none-eabi-ar CFLAGS='-Werror -Wall -Wextra -march=armv5te -O1' LDFLAGS='-march=armv5te' SHELL='sh -x' lib
|
make CC="${ARM_NONE_EABI_GCC_PREFIX}gcc" AR="${ARM_NONE_EABI_GCC_PREFIX}ar" CFLAGS='-Werror -Wall -Wextra -march=armv5te -O1' LDFLAGS='-march=armv5te' SHELL='sh -x' lib
|
||||||
|
|
||||||
|
msg "size: ${ARM_NONE_EABI_GCC_PREFIX}gcc -march=armv5te -O1"
|
||||||
|
${ARM_NONE_EABI_GCC_PREFIX}size library/*.o
|
||||||
|
}
|
||||||
|
|
||||||
|
component_build_arm_none_eabi_gcc_m0plus () {
|
||||||
|
msg "build: ${ARM_NONE_EABI_GCC_PREFIX}gcc -mthumb -mcpu=cortex-m0plus" # ~ 10s
|
||||||
|
scripts/config.pl baremetal
|
||||||
|
make CC="${ARM_NONE_EABI_GCC_PREFIX}gcc" AR="${ARM_NONE_EABI_GCC_PREFIX}ar" LD="${ARM_NONE_EABI_GCC_PREFIX}ld" CFLAGS='-Werror -Wall -Wextra -mthumb -mcpu=cortex-m0plus -Os' lib
|
||||||
|
|
||||||
|
msg "size: ${ARM_NONE_EABI_GCC_PREFIX}gcc -mthumb -mcpu=cortex-m0plus -Os"
|
||||||
|
${ARM_NONE_EABI_GCC_PREFIX}size library/*.o
|
||||||
}
|
}
|
||||||
|
|
||||||
component_build_arm_none_eabi_gcc_no_udbl_division () {
|
component_build_arm_none_eabi_gcc_no_udbl_division () {
|
||||||
msg "build: arm-none-eabi-gcc -DMBEDTLS_NO_UDBL_DIVISION, make" # ~ 10s
|
msg "build: ${ARM_NONE_EABI_GCC_PREFIX} -DMBEDTLS_NO_UDBL_DIVISION, make" # ~ 10s
|
||||||
scripts/config.pl baremetal
|
scripts/config.pl baremetal
|
||||||
scripts/config.pl set MBEDTLS_NO_UDBL_DIVISION
|
scripts/config.pl set MBEDTLS_NO_UDBL_DIVISION
|
||||||
make CC=arm-none-eabi-gcc AR=arm-none-eabi-ar LD=arm-none-eabi-ld CFLAGS='-Werror -Wall -Wextra' lib
|
make CC="${ARM_NONE_EABI_GCC_PREFIX}gcc" AR="${ARM_NONE_EABI_GCC_PREFIX}ar" LD="${ARM_NONE_EABI_GCC_PREFIX}ld" CFLAGS='-Werror -Wall -Wextra' lib
|
||||||
echo "Checking that software 64-bit division is not required"
|
echo "Checking that software 64-bit division is not required"
|
||||||
if_build_succeeded not grep __aeabi_uldiv library/*.o
|
if_build_succeeded not grep __aeabi_uldiv library/*.o
|
||||||
}
|
}
|
||||||
|
|
||||||
component_build_arm_none_eabi_gcc_no_64bit_multiplication () {
|
component_build_arm_none_eabi_gcc_no_64bit_multiplication () {
|
||||||
msg "build: arm-none-eabi-gcc MBEDTLS_NO_64BIT_MULTIPLICATION, make" # ~ 10s
|
msg "build: ${ARM_NONE_EABI_GCC_PREFIX} MBEDTLS_NO_64BIT_MULTIPLICATION, make" # ~ 10s
|
||||||
scripts/config.pl baremetal
|
scripts/config.pl baremetal
|
||||||
scripts/config.pl set MBEDTLS_NO_64BIT_MULTIPLICATION
|
scripts/config.pl set MBEDTLS_NO_64BIT_MULTIPLICATION
|
||||||
make CC=arm-none-eabi-gcc AR=arm-none-eabi-ar LD=arm-none-eabi-ld CFLAGS='-Werror -O1 -march=armv6-m -mthumb' lib
|
make CC="${ARM_NONE_EABI_GCC_PREFIX}gcc" AR="${ARM_NONE_EABI_GCC_PREFIX}ar" LD="${ARM_NONE_EABI_GCC_PREFIX}ld" CFLAGS='-Werror -O1 -march=armv6-m -mthumb' lib
|
||||||
echo "Checking that software 64-bit multiplication is not required"
|
echo "Checking that software 64-bit multiplication is not required"
|
||||||
if_build_succeeded not grep __aeabi_lmul library/*.o
|
if_build_succeeded not grep __aeabi_lmul library/*.o
|
||||||
}
|
}
|
||||||
|
|
||||||
component_build_armcc () {
|
component_build_armcc () {
|
||||||
msg "build: ARM Compiler 5, make"
|
msg "build: ARM Compiler 5"
|
||||||
scripts/config.pl baremetal
|
scripts/config.pl baremetal
|
||||||
|
|
||||||
make CC="$ARMC5_CC" AR="$ARMC5_AR" WARNING_CFLAGS='--strict --c99' lib
|
make CC="$ARMC5_CC" AR="$ARMC5_AR" WARNING_CFLAGS='--strict --c99' lib
|
||||||
|
|
||||||
|
msg "size: ARM Compiler 5"
|
||||||
|
"$ARMC5_FROMELF" -z library/*.o
|
||||||
|
|
||||||
make clean
|
make clean
|
||||||
|
|
||||||
# ARM Compiler 6 - Target ARMv7-A
|
# ARM Compiler 6 - Target ARMv7-A
|
||||||
|
@ -103,7 +103,7 @@ class LineIssueTracker(FileIssueTracker):
|
|||||||
|
|
||||||
def is_windows_file(filepath):
|
def is_windows_file(filepath):
|
||||||
_root, ext = os.path.splitext(filepath)
|
_root, ext = os.path.splitext(filepath)
|
||||||
return ext in ('.dsp', '.sln', '.vcxproj')
|
return ext in ('.bat', '.dsp', '.sln', '.vcxproj')
|
||||||
|
|
||||||
|
|
||||||
class PermissionIssueTracker(FileIssueTracker):
|
class PermissionIssueTracker(FileIssueTracker):
|
||||||
@ -223,6 +223,7 @@ class IntegrityChecker:
|
|||||||
self.logger = None
|
self.logger = None
|
||||||
self.setup_logger(log_file)
|
self.setup_logger(log_file)
|
||||||
self.extensions_to_check = (
|
self.extensions_to_check = (
|
||||||
|
".bat",
|
||||||
".c",
|
".c",
|
||||||
".data",
|
".data",
|
||||||
".dsp",
|
".dsp",
|
||||||
|
Loading…
Reference in New Issue
Block a user