blob: f411ec38a4c9cc4d76e4c29f9adb71d7ff654031 [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
Andrzej Kurek548894f2023-07-05 08:50:25 -040035 env:
36 # Platform tests have an allocation that returns null
37 - ASAN_OPTIONS="allocator_may_return_null=1"
38 - MSAN_OPTIONS="allocator_may_return_null=1"
Gilles Peskined0f543a2020-04-21 22:18:58 +020039 script:
Gilles Peskine187db002022-11-23 14:30:00 +010040 # Do a manual build+test sequence rather than using all.sh,
41 # because there's no all.sh component that does what we want,
42 # which is a build with Clang >= 10 and ASan, running all the SSL
43 # testing.
44 # - The clang executable in the default PATH is Clang 7 on
45 # Travis's focal instances, but we want Clang >= 10.
46 # - Running all the SSL testing requires a specific set of
47 # OpenSSL and GnuTLS versions and we don't want to bother
48 # with those on Travis.
49 # So we explicitly select clang-10 as the compiler, and we
50 # have ad hoc restrictions on SSL testing based on what is
51 # passing at the time of writing. We will remove these limitations
52 # gradually.
53 - make generated_files
54 - 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'
55 - make test
56 - programs/test/selftest
57 - tests/scripts/test_psa_constant_names.py
58 - tests/ssl-opt.sh
Pengyu Lv9e7bb2a2023-02-23 15:24:47 +080059 # Modern OpenSSL does not support null ciphers.
Pengyu Lvf01ac3a2023-02-22 10:07:16 +080060 - tests/compat.sh -p OpenSSL -e 'NULL'
Gilles Peskine187db002022-11-23 14:30:00 +010061 - tests/scripts/travis-log-failure.sh
62 # GnuTLS supports CAMELLIA but compat.sh doesn't properly enable it.
63 - tests/compat.sh -p GnuTLS -e 'CAMELLIA'
64 - tests/scripts/travis-log-failure.sh
65 - tests/context-info.sh
Gilles Peskined0f543a2020-04-21 22:18:58 +020066
Gilles Peskine04025102020-04-25 23:25:10 +020067 - name: Windows
68 os: windows
Gilles Peskined80cf542021-11-17 21:13:01 +010069 # The language 'python' is currently unsupported on the
70 # Windows Build Environment. And 'generic' causes the job to get stuck
71 # on "Booting virtual machine".
72 language: c
Gilles Peskineb97a0442020-04-26 14:09:09 +020073 before_install:
74 - choco install python --version=3.5.4
75 env:
Gilles Peskinede7f1e02021-04-22 11:55:48 +020076 # Add the directory where the Choco packages go
Gilles Peskineb97a0442020-04-26 14:09:09 +020077 - PATH=/c/Python35:/c/Python35/Scripts:$PATH
Gilles Peskinedd386692021-11-18 17:35:01 +010078 - PYTHON=python.exe
Gilles Peskine04025102020-04-25 23:25:10 +020079 script:
Gilles Peskinede7f1e02021-04-22 11:55:48 +020080 - type perl; perl --version
Gilles Peskineb97a0442020-04-26 14:09:09 +020081 - type python; python --version
Gilles Peskinede7f1e02021-04-22 11:55:48 +020082 - scripts/make_generated_files.bat
Gilles Peskineb97a0442020-04-26 14:09:09 +020083 # Logs appear out of sequence on Windows. Give time to catch up.
84 - sleep 5
Gilles Peskine23d249a2020-04-26 13:12:55 +020085 - scripts/windows_msbuild.bat v141 # Visual Studio 2017
Gilles Peskine21551762023-03-15 23:20:26 +010086 - visualc/VS2013/x64/Release/selftest.exe
Gilles Peskine04025102020-04-25 23:25:10 +020087
Jerry Yu32f977e2023-01-11 22:48:51 +080088 - name: full configuration on arm64
89 os: linux
90 dist: focal
91 arch: arm64
92 addons:
93 apt:
94 packages:
95 - gcc
Andrzej Kurek548894f2023-07-05 08:50:25 -040096 env:
97 # Platform tests have an allocation that returns null
98 - ASAN_OPTIONS="allocator_may_return_null=1"
99 - MSAN_OPTIONS="allocator_may_return_null=1"
Jerry Yu32f977e2023-01-11 22:48:51 +0800100 script:
Jerry Yu55b3ed72023-03-13 10:46:01 +0800101 # Do a manual build+test sequence rather than using all.sh.
102 #
103 # On Arm64 host of Travis CI, the time of `test_full_cmake_*` exceeds
104 # limitation of Travis CI. Base on `test_full_cmake_*`, we removed
105 # `ssl-opt.sh` and GnuTLS compat.sh here to meet the time limitation.
Jerry Yu32f977e2023-01-11 22:48:51 +0800106 - scripts/config.py full
Jerry Yu32f977e2023-01-11 22:48:51 +0800107 - make generated_files
Jerry Yuad0b2f72023-03-03 15:58:49 +0800108 - make CFLAGS='-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 +0800109 - make test
110 - programs/test/selftest
111 - tests/scripts/test_psa_constant_names.py
112 # Modern OpenSSL does not support fixed ECDH or null ciphers.
Jerry Yu837e9cf2023-02-08 10:57:23 +0800113 - tests/compat.sh -p OpenSSL -e 'NULL\|ECDH_'
Jerry Yu32f977e2023-01-11 22:48:51 +0800114 - tests/scripts/travis-log-failure.sh
115 - tests/context-info.sh
116
117 - name: full configuration(GnuTLS compat tests) on arm64
118 os: linux
119 dist: focal
120 arch: arm64
121 addons:
122 apt:
123 packages:
Jerry Yu97b31d82023-02-21 14:52:33 +0800124 - clang
Jerry Yu32f977e2023-01-11 22:48:51 +0800125 - gnutls-bin
Andrzej Kurek548894f2023-07-05 08:50:25 -0400126 env:
127 # Platform tests have an allocation that returns null
128 - ASAN_OPTIONS="allocator_may_return_null=1"
129 - MSAN_OPTIONS="allocator_may_return_null=1"
Jerry Yu32f977e2023-01-11 22:48:51 +0800130 script:
Jerry Yu55b3ed72023-03-13 10:46:01 +0800131 # Do a manual build+test sequence rather than using all.sh.
132 #
133 # On Arm64 host of Travis CI, the time of `test_full_cmake_*` exceeds
134 # limitation of Travis CI. Base on `test_full_cmake_*`, we removed
135 # `ssl-opt.sh` and OpenSSl compat.sh here to meet the time limitation.
Jerry Yu32f977e2023-01-11 22:48:51 +0800136 - scripts/config.py full
Jerry Yu32f977e2023-01-11 22:48:51 +0800137 - make generated_files
Jerry Yuad0b2f72023-03-03 15:58:49 +0800138 - make CC=clang CFLAGS='-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 +0800139 # GnuTLS supports CAMELLIA but compat.sh doesn't properly enable it.
140 - tests/compat.sh -p GnuTLS -e 'CAMELLIA'
141 - tests/scripts/travis-log-failure.sh
142 - tests/context-info.sh
143
Jerry Yud767cc42023-03-31 15:03:55 +0800144 - name: Arm64 accelerators tests on arm64 host
145 os: linux
146 dist: focal
147 arch: arm64
148 addons:
149 apt:
150 packages:
151 - gcc
152 script:
153 # Do a manual build+test sequence rather than using all.sh.
154 #
155 # This is arm64 host only test for no runtime detection case. Internal
156 # and Open CI do not include Arm64 host, and they check if components
157 # are be tested. As result, it will always fail on `pre-test-check` in
158 # them.
159 - scripts/config.py unset MBEDTLS_AESNI_C
160 - scripts/config.py unset MBEDTLS_PADLOCK_C
161 - scripts/config.py set MBEDTLS_AESCE_C
Jerry Yu36606232023-04-19 10:44:29 +0800162 - scripts/config.py set MBEDTLS_AES_USE_HARDWARE_ONLY
Jerry Yud767cc42023-03-31 15:03:55 +0800163 - make generated_files
164 - make
Jerry Yu2700ef62023-08-03 17:13:52 +0800165 - programs/test/selftest aes | grep "using AESCE"
Jerry Yud767cc42023-03-31 15:03:55 +0800166 - tests/context-info.sh
167
Janos Follath831a65f2016-03-21 09:22:58 +0000168after_failure:
Simon Butcher6eaf3652016-04-10 15:11:27 +0100169- tests/scripts/travis-log-failure.sh
Gilles Peskined0f543a2020-04-21 22:18:58 +0200170
Paul Bakker05c37742014-05-02 16:19:04 +0200171env:
172 global:
Manuel Pégourié-Gonnardc8530df2019-02-27 10:46:56 +0100173 - SEED=1
Paul Elliott240240d2023-08-30 17:59:42 +0100174 - secure: "GF/Fde5fkm15T/RNykrjrPV5Uh1KJ70cP308igL6Xkk3eJmqkkmWCe9JqRH12J3TeWw2fu9PYPHt6iFSg6jasgqysfUyg+W03knRT5QNn3h5eHgt36cQJiJr6t3whPrRaiM6U9omE0evm+c0cAwlkA3GGSMw8Z+na4EnKI6OFCo="
Paul Bakker05c37742014-05-02 16:19:04 +0200175
Gilles Peskined9d5c782021-11-17 19:29:38 +0100176install:
Gilles Peskinedd386692021-11-18 17:35:01 +0100177 - $PYTHON scripts/min_requirements.py
Gilles Peskined9d5c782021-11-17 19:29:38 +0100178
Paul Bakker05c37742014-05-02 16:19:04 +0200179addons:
Gilles Peskinea5ced5b2020-04-25 23:36:00 +0200180 apt:
181 packages:
182 - gnutls-bin
Paul Bakker05c37742014-05-02 16:19:04 +0200183 coverity_scan:
184 project:
Paul Elliott63d3deb2022-05-06 14:06:09 +0100185 name: "ARMmbed/mbedtls"
Vikas Katariya2bcf51a2019-09-10 17:36:23 +0100186 notification_email: support-mbedtls@arm.com
Paul Bakker05c37742014-05-02 16:19:04 +0200187 build_command_prepend:
Paul Bakker05c37742014-05-02 16:19:04 +0200188 build_command: make
Paul Bakkerdb34e6d2015-04-14 14:59:47 +0200189 branch_pattern: coverity_scan