Debian Codegraph @

crt/s2n/codebuild/spec/buildspec_sanitizer.yml

raw symbols SCIP
1 ---
2 # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License"). You may not use
5 # this file except in compliance with the License. A copy of the License is
6 # located at
7 #
8 # http://aws.amazon.com/apache2.0/
9 #
10 # or in the "license" file accompanying this file. This file is distributed on an
11 # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
12 # implied. See the License for the specific language governing permissions and
13 # limitations under the License.
14 version: 0.2
15
16 # This buildspec runs on an Ubuntu22 image. That configuration is a property of
17 # the codebuild job itself.
18
19 # Codebuild's matrix jobs have non-differentiated names so use batch-list
20 # instead.
21
22 # Parameter motivation
23
24 # COMPILERS
25 # We run asan on both gcc and clang because of different features sets for their
26 # address sanitizers. Specifically there was a case where GCC was able to detect
27 # a memcpy-param-overlap that Clang did not.
28
29 # LIBCRYPTOS
30 # awslc: happy path libcrypto for s2n-tls
31 # openssl 3: s2n-tls takes different code paths for ossl3, so make sure we run
32 # asan on it. See pr 4033 for a historical motivating example.
33 # openssl 1.1.1: a widely deployed version of openssl.
34 # openssl 1.0.2: the default libcrypto on AL2, and AL2 is still widely deployed.
35
36 # CMAKE_BUILD_TYPE
37 # RelWithDebInfo: This instructs CMake to do all optimizations (Rel -> Release)
38 # along with debug info (DebInfo). Debug info is necessary to get line numbers
39 # in the stack traces that ASAN reports.
40 batch:
41 build-list:
42 - identifier: clang_awslc
43 env:
44 compute-type: BUILD_GENERAL1_LARGE
45 variables:
46 S2N_LIBCRYPTO: awslc
47 COMPILER: clang
48 - identifier: clang_openssl_3_0
49 env:
50 compute-type: BUILD_GENERAL1_LARGE
51 variables:
52 S2N_LIBCRYPTO: openssl-3.0
53 COMPILER: clang
54 - identifier: clang_openssl_3_fips
55 env:
56 compute-type: BUILD_GENERAL1_LARGE
57 variables:
58 S2N_LIBCRYPTO: openssl-3.0-fips
59 COMPILER: clang
60 - identifier: clang_openssl_1_1_1
61 env:
62 compute-type: BUILD_GENERAL1_LARGE
63 variables:
64 S2N_LIBCRYPTO: openssl-1.1.1
65 COMPILER: clang
66 - identifier: clang_openssl_1_0_2
67 env:
68 compute-type: BUILD_GENERAL1_LARGE
69 variables:
70 S2N_LIBCRYPTO: openssl-1.0.2
71 COMPILER: clang
72 - identifier: gcc_awslc
73 env:
74 compute-type: BUILD_GENERAL1_LARGE
75 variables:
76 S2N_LIBCRYPTO: awslc
77 COMPILER: gcc
78 - identifier: gcc_awslc_fips_2024
79 env:
80 compute-type: BUILD_GENERAL1_LARGE
81 variables:
82 S2N_LIBCRYPTO: awslc-fips-2024
83 COMPILER: gcc
84 - identifier: gcc_awslc_fips_next
85 env:
86 compute-type: BUILD_GENERAL1_LARGE
87 variables:
88 S2N_LIBCRYPTO: awslc-fips-next
89 COMPILER: gcc
90 - identifier: gcc_openssl_3_0
91 env:
92 compute-type: BUILD_GENERAL1_LARGE
93 variables:
94 S2N_LIBCRYPTO: openssl-3.0
95 COMPILER: gcc
96 - identifier: gcc_openssl_3_fips
97 env:
98 compute-type: BUILD_GENERAL1_LARGE
99 variables:
100 S2N_LIBCRYPTO: openssl-3.0-fips
101 COMPILER: gcc
102 - identifier: gcc_openssl_1_1_1
103 env:
104 compute-type: BUILD_GENERAL1_LARGE
105 variables:
106 S2N_LIBCRYPTO: openssl-1.1.1
107 COMPILER: gcc
108 - identifier: gcc_openssl_1_0_2
109 env:
110 compute-type: BUILD_GENERAL1_LARGE
111 variables:
112 S2N_LIBCRYPTO: openssl-1.0.2
113 COMPILER: gcc
114 - identifier: clang_openssl_1_0_2_fips
115 env:
116 compute-type: BUILD_GENERAL1_LARGE
117 variables:
118 S2N_LIBCRYPTO: openssl-1.0.2-fips
119 COMPILER: clang
120 - identifier: gcc_openssl_1_0_2_fips
121 env:
122 compute-type: BUILD_GENERAL1_LARGE
123 variables:
124 S2N_LIBCRYPTO: openssl-1.0.2-fips
125 COMPILER: gcc
126
127 phases:
128 pre_build:
129 commands:
130 - |
131 if [ -d "third-party-src" ]; then
132 cd third-party-src;
133 ln -s /usr/local $CODEBUILD_SRC_DIR/third-party-src/test-deps;
134 fi
135 - /usr/bin/$COMPILER --version
136 build:
137 on-failure: ABORT
138 commands:
139 - |
140 cmake . -Bbuild \
141 -DCMAKE_C_COMPILER=/usr/bin/$COMPILER \
142 -DCMAKE_PREFIX_PATH=/usr/local/$S2N_LIBCRYPTO \
143 -DCMAKE_BUILD_TYPE=RelWithDebInfo \
144 -DASAN=ON \
145 -DUBSAN=ON
146 - cmake --build ./build -- -j $(nproc)
147 post_build:
148 on-failure: ABORT
149 commands:
150 - CTEST_OUTPUT_ON_FAILURE=1 CTEST_PARALLEL_LEVEL=$(nproc) make -C build test