Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: add more generic analyzer buildspec #4747

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
boquan-fang marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -39,76 +39,59 @@ version: 0.2
# in the stack traces that ASAN reports.
batch:
build-list:
- identifier: clang_awslc
- identifier: clang_awslc_sanitizers
buildspec: codebuild/spec/buildspec_sanitizers.yml
boquan-fang marked this conversation as resolved.
Show resolved Hide resolved
env:
compute-type: BUILD_GENERAL1_LARGE
variables:
S2N_LIBCRYPTO: awslc
COMPILER: clang
- identifier: clang_openssl_3_0
- identifier: clang_openssl_3_0_sanitizers
buildspec: codebuild/spec/buildspec_sanitizers.yml
env:
compute-type: BUILD_GENERAL1_LARGE
variables:
S2N_LIBCRYPTO: openssl-3.0
COMPILER: clang
- identifier: clang_openssl_1_1_1
- identifier: clang_openssl_1_1_1_sanitizers
buildspec: codebuild/spec/buildspec_sanitizers.yml
env:
compute-type: BUILD_GENERAL1_LARGE
variables:
S2N_LIBCRYPTO: openssl-1.1.1
COMPILER: clang
- identifier: clang_openssl_1_0_2
- identifier: clang_openssl_1_0_2_sanitizers
buildspec: codebuild/spec/buildspec_sanitizers.yml
env:
compute-type: BUILD_GENERAL1_LARGE
variables:
S2N_LIBCRYPTO: openssl-1.0.2
COMPILER: clang
- identifier: gcc_awslc
- identifier: gcc_awslc_sanitizers
buildspec: codebuild/spec/buildspec_sanitizers.yml
env:
compute-type: BUILD_GENERAL1_LARGE
variables:
S2N_LIBCRYPTO: awslc
COMPILER: gcc
- identifier: gcc_openssl_3_0
- identifier: gcc_openssl_3_0_sanitizers
buildspec: codebuild/spec/buildspec_sanitizers.yml
env:
compute-type: BUILD_GENERAL1_LARGE
variables:
S2N_LIBCRYPTO: openssl-3.0
COMPILER: gcc
- identifier: gcc_openssl_1_1_1
- identifier: gcc_openssl_1_1_1_sanitizers
boquan-fang marked this conversation as resolved.
Show resolved Hide resolved
buildspec: codebuild/spec/buildspec_sanitizers.yml
env:
compute-type: BUILD_GENERAL1_LARGE
variables:
S2N_LIBCRYPTO: openssl-1.1.1
COMPILER: gcc
- identifier: gcc_openssl_1_0_2
- identifier: gcc_openssl_1_0_2_sanitizers
buildspec: codebuild/spec/buildspec_sanitizers.yml
env:
compute-type: BUILD_GENERAL1_LARGE
variables:
S2N_LIBCRYPTO: openssl-1.0.2
COMPILER: gcc

phases:
pre_build:
commands:
- |
if [ -d "third-party-src" ]; then
cd third-party-src;
ln -s /usr/local $CODEBUILD_SRC_DIR/third-party-src/test-deps;
fi
- /usr/bin/$COMPILER --version
build:
on-failure: ABORT
commands:
- |
cmake . -Bbuild \
-DCMAKE_C_COMPILER=/usr/bin/$COMPILER \
-DCMAKE_PREFIX_PATH=/usr/local/$S2N_LIBCRYPTO \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DASAN=ON \
-DUBSAN=ON
- cmake --build ./build -- -j $(nproc)
post_build:
on-failure: ABORT
commands:
- CTEST_OUTPUT_ON_FAILURE=1 CTEST_PARALLEL_LEVEL=$(nproc) make -C build test
44 changes: 44 additions & 0 deletions codebuild/spec/buildspec_sanitizers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You may not use
# this file except in compliance with the License. A copy of the License is
# located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompanying this file. This file is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied. See the License for the specific language governing permissions and
# limitations under the License.
version: 0.2

env:
variables:
# CODEBUILD_ is a reserved namespace.
CB_BIN_DIR: "./codebuild/bin"
boquan-fang marked this conversation as resolved.
Show resolved Hide resolved

phases:
pre_build:
commands:
- |
if [ -d "third-party-src" ]; then
cd third-party-src;
ln -s /usr/local $CODEBUILD_SRC_DIR/third-party-src/test-deps;
boquan-fang marked this conversation as resolved.
Show resolved Hide resolved
fi
- /usr/bin/$COMPILER --version
build:
on-failure: ABORT
commands:
- |
cmake . -Bbuild \
-DCMAKE_C_COMPILER=/usr/bin/$COMPILER \
-DCMAKE_PREFIX_PATH=/usr/local/$S2N_LIBCRYPTO \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DASAN=ON \
-DUBSAN=ON
- cmake --build ./build -- -j $(nproc)
post_build:
on-failure: ABORT
commands:
- CTEST_OUTPUT_ON_FAILURE=1 CTEST_PARALLEL_LEVEL=$(nproc) make -C build test
Loading