Gilles Peskine | d80cf54 | 2021-11-17 21:13:01 +0100 | [diff] [blame] | 1 | # Declare python as our language. This way we get our chosen Python version, |
| 2 | # and pip is available. Gcc and clang are available anyway. |
| 3 | language: python |
| 4 | python: 3.5 |
Manuel Pégourié-Gonnard | c84d7fb | 2015-08-04 15:59:34 +0200 | [diff] [blame] | 5 | sudo: false |
Manuel Pégourié-Gonnard | 2c99800 | 2015-08-04 18:06:02 +0200 | [diff] [blame] | 6 | cache: ccache |
Simon Butcher | 3459c74 | 2018-11-22 10:14:03 +0000 | [diff] [blame] | 7 | |
Gilles Peskine | d0f543a | 2020-04-21 22:18:58 +0200 | [diff] [blame] | 8 | jobs: |
| 9 | include: |
Gilles Peskine | 10cb160 | 2020-04-26 21:26:42 +0200 | [diff] [blame] | 10 | - name: basic checks and reference configurations |
Gilles Peskine | b49a457 | 2020-04-23 23:45:55 +0200 | [diff] [blame] | 11 | addons: |
| 12 | apt: |
| 13 | packages: |
Gilles Peskine | a5ced5b | 2020-04-25 23:36:00 +0200 | [diff] [blame] | 14 | - gnutls-bin |
Gilles Peskine | b49a457 | 2020-04-23 23:45:55 +0200 | [diff] [blame] | 15 | - doxygen |
| 16 | - graphviz |
Gilles Peskine | f2f39dd | 2020-04-25 22:30:31 +0200 | [diff] [blame] | 17 | - gcc-arm-none-eabi |
| 18 | - libnewlib-arm-none-eabi |
Manuel Pégourié-Gonnard | efd14bf | 2020-08-18 10:31:36 +0200 | [diff] [blame] | 19 | - gcc-arm-linux-gnueabi |
Manuel Pégourié-Gonnard | ae505ee | 2021-07-06 09:44:59 +0200 | [diff] [blame] | 20 | - libc6-dev-armel-cross |
Gilles Peskine | d0f543a | 2020-04-21 22:18:58 +0200 | [diff] [blame] | 21 | script: |
Gilles Peskine | 3c7ffd7 | 2020-04-21 22:23:35 +0200 | [diff] [blame] | 22 | - tests/scripts/all.sh -k 'check_*' |
Gilles Peskine | a2d3ec2 | 2020-04-25 21:31:04 +0200 | [diff] [blame] | 23 | - tests/scripts/all.sh -k test_default_out_of_box |
Gilles Peskine | de7f1e0 | 2021-04-22 11:55:48 +0200 | [diff] [blame] | 24 | - tests/scripts/all.sh -k test_ref_configs |
Manuel Pégourié-Gonnard | efd14bf | 2020-08-18 10:31:36 +0200 | [diff] [blame] | 25 | - tests/scripts/all.sh -k build_arm_linux_gnueabi_gcc_arm5vte build_arm_none_eabi_gcc_m0plus |
Gilles Peskine | d0f543a | 2020-04-21 22:18:58 +0200 | [diff] [blame] | 26 | |
Gilles Peskine | a2d3ec2 | 2020-04-25 21:31:04 +0200 | [diff] [blame] | 27 | - name: full configuration |
Gilles Peskine | 187db00 | 2022-11-23 14:30:00 +0100 | [diff] [blame] | 28 | os: linux |
| 29 | dist: focal |
| 30 | addons: |
| 31 | apt: |
| 32 | packages: |
| 33 | - clang-10 |
| 34 | - gnutls-bin |
Andrzej Kurek | 548894f | 2023-07-05 08:50:25 -0400 | [diff] [blame] | 35 | 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 Peskine | d0f543a | 2020-04-21 22:18:58 +0200 | [diff] [blame] | 39 | script: |
Gilles Peskine | 187db00 | 2022-11-23 14:30:00 +0100 | [diff] [blame] | 40 | # 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 Lv | 9e7bb2a | 2023-02-23 15:24:47 +0800 | [diff] [blame] | 59 | # Modern OpenSSL does not support null ciphers. |
Pengyu Lv | f01ac3a | 2023-02-22 10:07:16 +0800 | [diff] [blame] | 60 | - tests/compat.sh -p OpenSSL -e 'NULL' |
Gilles Peskine | 187db00 | 2022-11-23 14:30:00 +0100 | [diff] [blame] | 61 | - 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 Peskine | d0f543a | 2020-04-21 22:18:58 +0200 | [diff] [blame] | 66 | |
Gilles Peskine | 0402510 | 2020-04-25 23:25:10 +0200 | [diff] [blame] | 67 | - name: Windows |
| 68 | os: windows |
Gilles Peskine | d80cf54 | 2021-11-17 21:13:01 +0100 | [diff] [blame] | 69 | # 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 Peskine | b97a044 | 2020-04-26 14:09:09 +0200 | [diff] [blame] | 73 | before_install: |
| 74 | - choco install python --version=3.5.4 |
| 75 | env: |
Gilles Peskine | de7f1e0 | 2021-04-22 11:55:48 +0200 | [diff] [blame] | 76 | # Add the directory where the Choco packages go |
Gilles Peskine | b97a044 | 2020-04-26 14:09:09 +0200 | [diff] [blame] | 77 | - PATH=/c/Python35:/c/Python35/Scripts:$PATH |
Gilles Peskine | dd38669 | 2021-11-18 17:35:01 +0100 | [diff] [blame] | 78 | - PYTHON=python.exe |
Gilles Peskine | 0402510 | 2020-04-25 23:25:10 +0200 | [diff] [blame] | 79 | script: |
Gilles Peskine | de7f1e0 | 2021-04-22 11:55:48 +0200 | [diff] [blame] | 80 | - type perl; perl --version |
Gilles Peskine | b97a044 | 2020-04-26 14:09:09 +0200 | [diff] [blame] | 81 | - type python; python --version |
Gilles Peskine | de7f1e0 | 2021-04-22 11:55:48 +0200 | [diff] [blame] | 82 | - scripts/make_generated_files.bat |
Gilles Peskine | b97a044 | 2020-04-26 14:09:09 +0200 | [diff] [blame] | 83 | # Logs appear out of sequence on Windows. Give time to catch up. |
| 84 | - sleep 5 |
Gilles Peskine | 23d249a | 2020-04-26 13:12:55 +0200 | [diff] [blame] | 85 | - scripts/windows_msbuild.bat v141 # Visual Studio 2017 |
Gilles Peskine | 2155176 | 2023-03-15 23:20:26 +0100 | [diff] [blame] | 86 | - visualc/VS2013/x64/Release/selftest.exe |
Gilles Peskine | 0402510 | 2020-04-25 23:25:10 +0200 | [diff] [blame] | 87 | |
Jerry Yu | 32f977e | 2023-01-11 22:48:51 +0800 | [diff] [blame] | 88 | - name: full configuration on arm64 |
| 89 | os: linux |
| 90 | dist: focal |
| 91 | arch: arm64 |
| 92 | addons: |
| 93 | apt: |
| 94 | packages: |
| 95 | - gcc |
Andrzej Kurek | 548894f | 2023-07-05 08:50:25 -0400 | [diff] [blame] | 96 | 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 Yu | 32f977e | 2023-01-11 22:48:51 +0800 | [diff] [blame] | 100 | script: |
Jerry Yu | 55b3ed7 | 2023-03-13 10:46:01 +0800 | [diff] [blame] | 101 | # 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 Yu | 32f977e | 2023-01-11 22:48:51 +0800 | [diff] [blame] | 106 | - scripts/config.py full |
Jerry Yu | 32f977e | 2023-01-11 22:48:51 +0800 | [diff] [blame] | 107 | - make generated_files |
Jerry Yu | ad0b2f7 | 2023-03-03 15:58:49 +0800 | [diff] [blame] | 108 | - make CFLAGS='-O3 -Werror -fsanitize=address,undefined -fno-sanitize-recover=all' LDFLAGS='-Werror -fsanitize=address,undefined -fno-sanitize-recover=all' |
Jerry Yu | 32f977e | 2023-01-11 22:48:51 +0800 | [diff] [blame] | 109 | - 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 Yu | 837e9cf | 2023-02-08 10:57:23 +0800 | [diff] [blame] | 113 | - tests/compat.sh -p OpenSSL -e 'NULL\|ECDH_' |
Jerry Yu | 32f977e | 2023-01-11 22:48:51 +0800 | [diff] [blame] | 114 | - 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 Yu | 97b31d8 | 2023-02-21 14:52:33 +0800 | [diff] [blame] | 124 | - clang |
Jerry Yu | 32f977e | 2023-01-11 22:48:51 +0800 | [diff] [blame] | 125 | - gnutls-bin |
Andrzej Kurek | 548894f | 2023-07-05 08:50:25 -0400 | [diff] [blame] | 126 | 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 Yu | 32f977e | 2023-01-11 22:48:51 +0800 | [diff] [blame] | 130 | script: |
Jerry Yu | 55b3ed7 | 2023-03-13 10:46:01 +0800 | [diff] [blame] | 131 | # 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 Yu | 32f977e | 2023-01-11 22:48:51 +0800 | [diff] [blame] | 136 | - scripts/config.py full |
Jerry Yu | 32f977e | 2023-01-11 22:48:51 +0800 | [diff] [blame] | 137 | - make generated_files |
Jerry Yu | ad0b2f7 | 2023-03-03 15:58:49 +0800 | [diff] [blame] | 138 | - make CC=clang CFLAGS='-O3 -Werror -fsanitize=address,undefined -fno-sanitize-recover=all' LDFLAGS='-Werror -fsanitize=address,undefined -fno-sanitize-recover=all' |
Jerry Yu | 32f977e | 2023-01-11 22:48:51 +0800 | [diff] [blame] | 139 | # 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 Yu | d767cc4 | 2023-03-31 15:03:55 +0800 | [diff] [blame] | 144 | - 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 Yu | 3660623 | 2023-04-19 10:44:29 +0800 | [diff] [blame] | 162 | - scripts/config.py set MBEDTLS_AES_USE_HARDWARE_ONLY |
Jerry Yu | d767cc4 | 2023-03-31 15:03:55 +0800 | [diff] [blame] | 163 | - make generated_files |
| 164 | - make |
Jerry Yu | 2700ef6 | 2023-08-03 17:13:52 +0800 | [diff] [blame] | 165 | - programs/test/selftest aes | grep "using AESCE" |
Jerry Yu | d767cc4 | 2023-03-31 15:03:55 +0800 | [diff] [blame] | 166 | - tests/context-info.sh |
| 167 | |
Janos Follath | 831a65f | 2016-03-21 09:22:58 +0000 | [diff] [blame] | 168 | after_failure: |
Simon Butcher | 6eaf365 | 2016-04-10 15:11:27 +0100 | [diff] [blame] | 169 | - tests/scripts/travis-log-failure.sh |
Gilles Peskine | d0f543a | 2020-04-21 22:18:58 +0200 | [diff] [blame] | 170 | |
Paul Bakker | 05c3774 | 2014-05-02 16:19:04 +0200 | [diff] [blame] | 171 | env: |
| 172 | global: |
Manuel Pégourié-Gonnard | c8530df | 2019-02-27 10:46:56 +0100 | [diff] [blame] | 173 | - SEED=1 |
Paul Elliott | 240240d | 2023-08-30 17:59:42 +0100 | [diff] [blame] | 174 | - secure: "GF/Fde5fkm15T/RNykrjrPV5Uh1KJ70cP308igL6Xkk3eJmqkkmWCe9JqRH12J3TeWw2fu9PYPHt6iFSg6jasgqysfUyg+W03knRT5QNn3h5eHgt36cQJiJr6t3whPrRaiM6U9omE0evm+c0cAwlkA3GGSMw8Z+na4EnKI6OFCo=" |
Paul Bakker | 05c3774 | 2014-05-02 16:19:04 +0200 | [diff] [blame] | 175 | |
Gilles Peskine | d9d5c78 | 2021-11-17 19:29:38 +0100 | [diff] [blame] | 176 | install: |
Gilles Peskine | dd38669 | 2021-11-18 17:35:01 +0100 | [diff] [blame] | 177 | - $PYTHON scripts/min_requirements.py |
Gilles Peskine | d9d5c78 | 2021-11-17 19:29:38 +0100 | [diff] [blame] | 178 | |
Paul Bakker | 05c3774 | 2014-05-02 16:19:04 +0200 | [diff] [blame] | 179 | addons: |
Gilles Peskine | a5ced5b | 2020-04-25 23:36:00 +0200 | [diff] [blame] | 180 | apt: |
| 181 | packages: |
| 182 | - gnutls-bin |
Paul Bakker | 05c3774 | 2014-05-02 16:19:04 +0200 | [diff] [blame] | 183 | coverity_scan: |
| 184 | project: |
Paul Elliott | 63d3deb | 2022-05-06 14:06:09 +0100 | [diff] [blame] | 185 | name: "ARMmbed/mbedtls" |
Vikas Katariya | 2bcf51a | 2019-09-10 17:36:23 +0100 | [diff] [blame] | 186 | notification_email: support-mbedtls@arm.com |
Paul Bakker | 05c3774 | 2014-05-02 16:19:04 +0200 | [diff] [blame] | 187 | build_command_prepend: |
Paul Bakker | 05c3774 | 2014-05-02 16:19:04 +0200 | [diff] [blame] | 188 | build_command: make |
Paul Bakker | db34e6d | 2015-04-14 14:59:47 +0200 | [diff] [blame] | 189 | branch_pattern: coverity_scan |