blob: cdb79d1aa28f58a6b4c6dbc2d805465a62f16bc5 [file] [log] [blame]
Gilles Peskined80cf542021-11-17 21:13:01 +01001# Declare python as our language. This way we get our chosen Python version,
2# and pip is available. Gcc and clang are available anyway.
3language: python
4python: 3.5
Manuel Pégourié-Gonnardc84d7fb2015-08-04 15:59:34 +02005sudo: false
Manuel Pégourié-Gonnard2c998002015-08-04 18:06:02 +02006cache: ccache
Simon Butcher3459c742018-11-22 10:14:03 +00007
Gilles Peskined0f543a2020-04-21 22:18:58 +02008jobs:
9 include:
Gilles Peskine10cb1602020-04-26 21:26:42 +020010 - name: basic checks and reference configurations
Gilles Peskineb49a4572020-04-23 23:45:55 +020011 addons:
12 apt:
13 packages:
Gilles Peskinea5ced5b2020-04-25 23:36:00 +020014 - gnutls-bin
Gilles Peskineb49a4572020-04-23 23:45:55 +020015 - doxygen
16 - graphviz
Gilles Peskinef2f39dd2020-04-25 22:30:31 +020017 - gcc-arm-none-eabi
18 - libnewlib-arm-none-eabi
Manuel Pégourié-Gonnardefd14bf2020-08-18 10:31:36 +020019 - gcc-arm-linux-gnueabi
Manuel Pégourié-Gonnardae505ee2021-07-06 09:44:59 +020020 - libc6-dev-armel-cross
Gilles Peskined0f543a2020-04-21 22:18:58 +020021 script:
Gilles Peskine3c7ffd72020-04-21 22:23:35 +020022 - tests/scripts/all.sh -k 'check_*'
Gilles Peskinea2d3ec22020-04-25 21:31:04 +020023 - tests/scripts/all.sh -k test_default_out_of_box
Gilles Peskinede7f1e02021-04-22 11:55:48 +020024 - tests/scripts/all.sh -k test_ref_configs
Manuel Pégourié-Gonnardefd14bf2020-08-18 10:31:36 +020025 - tests/scripts/all.sh -k build_arm_linux_gnueabi_gcc_arm5vte build_arm_none_eabi_gcc_m0plus
Gilles Peskined0f543a2020-04-21 22:18:58 +020026
Gilles Peskinea2d3ec22020-04-25 21:31:04 +020027 - name: full configuration
Gilles Peskine187db002022-11-23 14:30:00 +010028 os: linux
29 dist: focal
30 addons:
31 apt:
32 packages:
33 - clang-10
34 - gnutls-bin
Gilles Peskined0f543a2020-04-21 22:18:58 +020035 script:
Gilles Peskine187db002022-11-23 14:30:00 +010036 # Do a manual build+test sequence rather than using all.sh,
37 # because there's no all.sh component that does what we want,
38 # which is a build with Clang >= 10 and ASan, running all the SSL
39 # testing.
40 # - The clang executable in the default PATH is Clang 7 on
41 # Travis's focal instances, but we want Clang >= 10.
42 # - Running all the SSL testing requires a specific set of
43 # OpenSSL and GnuTLS versions and we don't want to bother
44 # with those on Travis.
45 # So we explicitly select clang-10 as the compiler, and we
46 # have ad hoc restrictions on SSL testing based on what is
47 # passing at the time of writing. We will remove these limitations
48 # gradually.
49 - make generated_files
50 - make CC=clang-10 CFLAGS='-Werror -Wall -Wextra -fsanitize=address,undefined -fno-sanitize-recover=all -O2' LDFLAGS='-Werror -Wall -Wextra -fsanitize=address,undefined -fno-sanitize-recover=all'
51 - make test
52 - programs/test/selftest
53 - tests/scripts/test_psa_constant_names.py
54 - tests/ssl-opt.sh
Pengyu Lv9e7bb2a2023-02-23 15:24:47 +080055 # Modern OpenSSL does not support null ciphers.
Pengyu Lvf01ac3a2023-02-22 10:07:16 +080056 - tests/compat.sh -p OpenSSL -e 'NULL'
Gilles Peskine187db002022-11-23 14:30:00 +010057 - tests/scripts/travis-log-failure.sh
58 # GnuTLS supports CAMELLIA but compat.sh doesn't properly enable it.
59 - tests/compat.sh -p GnuTLS -e 'CAMELLIA'
60 - tests/scripts/travis-log-failure.sh
61 - tests/context-info.sh
Gilles Peskined0f543a2020-04-21 22:18:58 +020062
Gilles Peskine04025102020-04-25 23:25:10 +020063 - name: Windows
64 os: windows
Gilles Peskined80cf542021-11-17 21:13:01 +010065 # The language 'python' is currently unsupported on the
66 # Windows Build Environment. And 'generic' causes the job to get stuck
67 # on "Booting virtual machine".
68 language: c
Gilles Peskineb97a0442020-04-26 14:09:09 +020069 before_install:
70 - choco install python --version=3.5.4
71 env:
Gilles Peskinede7f1e02021-04-22 11:55:48 +020072 # Add the directory where the Choco packages go
Gilles Peskineb97a0442020-04-26 14:09:09 +020073 - PATH=/c/Python35:/c/Python35/Scripts:$PATH
Gilles Peskinedd386692021-11-18 17:35:01 +010074 - PYTHON=python.exe
Gilles Peskine04025102020-04-25 23:25:10 +020075 script:
Gilles Peskinede7f1e02021-04-22 11:55:48 +020076 - type perl; perl --version
Gilles Peskineb97a0442020-04-26 14:09:09 +020077 - type python; python --version
Gilles Peskinede7f1e02021-04-22 11:55:48 +020078 - scripts/make_generated_files.bat
Gilles Peskineb97a0442020-04-26 14:09:09 +020079 # Logs appear out of sequence on Windows. Give time to catch up.
80 - sleep 5
Gilles Peskine23d249a2020-04-26 13:12:55 +020081 - scripts/windows_msbuild.bat v141 # Visual Studio 2017
Gilles Peskine04025102020-04-25 23:25:10 +020082
Jerry Yu32f977e2023-01-11 22:48:51 +080083 - name: full configuration on arm64
84 os: linux
85 dist: focal
86 arch: arm64
87 addons:
88 apt:
89 packages:
90 - gcc
91 script:
Jerry Yuaa18c4b2023-02-24 11:18:41 +080092 # Do a manual build+test sequence rather than using all.sh, because
93 # there's no all.sh component that does what we want. We should set
94 # CFLAGS for arm64 host CC.
Jerry Yu32f977e2023-01-11 22:48:51 +080095 - scripts/config.py full
96 - scripts/config.py unset MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT
97 - scripts/config.py unset MBEDTLS_SHA512_USE_A64_CRYPTO_ONLY
98 - scripts/config.py unset MBEDTLS_SHA256_USE_A64_CRYPTO_IF_PRESENT
99 - scripts/config.py unset MBEDTLS_SHA256_USE_A64_CRYPTO_ONLY
100 - make generated_files
101 - make CFLAGS='-march=armv8-a+crypto -O3 -Werror -fsanitize=address,undefined -fno-sanitize-recover=all' LDFLAGS='-Werror -fsanitize=address,undefined -fno-sanitize-recover=all'
102 - make test
103 - programs/test/selftest
104 - tests/scripts/test_psa_constant_names.py
105 # Modern OpenSSL does not support fixed ECDH or null ciphers.
Jerry Yu837e9cf2023-02-08 10:57:23 +0800106 - tests/compat.sh -p OpenSSL -e 'NULL\|ECDH_'
Jerry Yu32f977e2023-01-11 22:48:51 +0800107 - tests/scripts/travis-log-failure.sh
108 - tests/context-info.sh
109
110 - name: full configuration(GnuTLS compat tests) on arm64
111 os: linux
112 dist: focal
113 arch: arm64
114 addons:
115 apt:
116 packages:
Jerry Yu97b31d82023-02-21 14:52:33 +0800117 - clang
Jerry Yu32f977e2023-01-11 22:48:51 +0800118 - gnutls-bin
119 script:
Jerry Yuaa18c4b2023-02-24 11:18:41 +0800120 # Do a manual build+test sequence rather than using all.sh, because
121 # there's no all.sh component that does what we want. We should set
122 # CFLAGS for arm64 host CC.
Jerry Yu32f977e2023-01-11 22:48:51 +0800123 - scripts/config.py full
124 - scripts/config.py unset MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT
125 - scripts/config.py unset MBEDTLS_SHA512_USE_A64_CRYPTO_ONLY
126 - scripts/config.py unset MBEDTLS_SHA256_USE_A64_CRYPTO_IF_PRESENT
127 - scripts/config.py unset MBEDTLS_SHA256_USE_A64_CRYPTO_ONLY
128 - make generated_files
Jerry Yu97b31d82023-02-21 14:52:33 +0800129 - make CC=clang CFLAGS='-march=armv8-a+crypto -O3 -Werror -fsanitize=address,undefined -fno-sanitize-recover=all' LDFLAGS='-Werror -fsanitize=address,undefined -fno-sanitize-recover=all'
Jerry Yu32f977e2023-01-11 22:48:51 +0800130 # GnuTLS supports CAMELLIA but compat.sh doesn't properly enable it.
131 - tests/compat.sh -p GnuTLS -e 'CAMELLIA'
132 - tests/scripts/travis-log-failure.sh
133 - tests/context-info.sh
134
Janos Follath831a65f2016-03-21 09:22:58 +0000135after_failure:
Simon Butcher6eaf3652016-04-10 15:11:27 +0100136- tests/scripts/travis-log-failure.sh
Gilles Peskined0f543a2020-04-21 22:18:58 +0200137
Paul Bakker05c37742014-05-02 16:19:04 +0200138env:
139 global:
Manuel Pégourié-Gonnardc8530df2019-02-27 10:46:56 +0100140 - SEED=1
Paul Elliottb73ed132022-05-04 12:43:08 +0100141 - secure: "JECCru6HASpKZ0OLfHh8f/KXhKkdrCwjquZghd/qbA4ksxsWImjR7KEPERcaPndXEilzhDbKwuFvJiQX2duVgTGoq745YGhLZIjzo1i8tySkceCVd48P8WceYGz+F/bmY7r+m6fFNuxDSoGGSVeA4Lnjvmm8PFUP45YodDV9no4="
Paul Bakker05c37742014-05-02 16:19:04 +0200142
Gilles Peskined9d5c782021-11-17 19:29:38 +0100143install:
Gilles Peskinedd386692021-11-18 17:35:01 +0100144 - $PYTHON scripts/min_requirements.py
Gilles Peskined9d5c782021-11-17 19:29:38 +0100145
Paul Bakker05c37742014-05-02 16:19:04 +0200146addons:
Gilles Peskinea5ced5b2020-04-25 23:36:00 +0200147 apt:
148 packages:
149 - gnutls-bin
Paul Bakker05c37742014-05-02 16:19:04 +0200150 coverity_scan:
151 project:
Paul Elliott63d3deb2022-05-06 14:06:09 +0100152 name: "ARMmbed/mbedtls"
Vikas Katariya2bcf51a2019-09-10 17:36:23 +0100153 notification_email: support-mbedtls@arm.com
Paul Bakker05c37742014-05-02 16:19:04 +0200154 build_command_prepend:
Paul Bakker05c37742014-05-02 16:19:04 +0200155 build_command: make
Paul Bakkerdb34e6d2015-04-14 14:59:47 +0200156 branch_pattern: coverity_scan