From 0bae2c5f0b30d3ca84a360cdd6c148862530fa9b Mon Sep 17 00:00:00 2001 From: Jou Ho <43765840+jouho@users.noreply.github.com> Date: Thu, 19 Sep 2024 11:37:59 -0700 Subject: [PATCH] ci: refactor fuzz buildspec (#4783) --- codebuild/spec/buildspec_fuzz.yml | 36 +----------------- codebuild/spec/buildspec_fuzz_batch.yml | 49 +++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 35 deletions(-) create mode 100644 codebuild/spec/buildspec_fuzz_batch.yml diff --git a/codebuild/spec/buildspec_fuzz.yml b/codebuild/spec/buildspec_fuzz.yml index 889d64bb5e8..c74700ff28f 100644 --- a/codebuild/spec/buildspec_fuzz.yml +++ b/codebuild/spec/buildspec_fuzz.yml @@ -13,40 +13,6 @@ # limitations under the License. version: 0.2 -# This buildspec runs on an Ubuntu22 image. That configuration is a property of -# the codebuild job itself. - -# Codebuild's matrix jobs have non-differentiated names so use batch-list -# instead. - -# Parameter motivation - -# LIBCRYPTOS -# awslc: happy path libcrypto for s2n-tls -# openssl 3: s2n-tls takes different code paths for ossl3, so make sure we run -# asan on it. See pr 4033 for a historical motivating example. - -batch: - build-list: - - identifier: clang_awslc - debug-session: true - env: - compute-type: BUILD_GENERAL1_XLARGE - image: 024603541914.dkr.ecr.us-west-2.amazonaws.com/docker:ubuntu22codebuild - privileged-mode: true - variables: - S2N_LIBCRYPTO: awslc - COMPILER: clang - - identifier: clang_openssl_3_0 - debug-session: true - env: - compute-type: BUILD_GENERAL1_XLARGE - image: 024603541914.dkr.ecr.us-west-2.amazonaws.com/docker:ubuntu22codebuild - privileged-mode: true - variables: - S2N_LIBCRYPTO: openssl-3.0 - COMPILER: clang - phases: pre_build: commands: @@ -60,7 +26,7 @@ phases: commands: - | cmake . -Bbuild \ - -DCMAKE_PREFIX_PATH=$LIBCRYPTO_ROOT \ + -DCMAKE_PREFIX_PATH=/usr/local/$S2N_LIBCRYPTO \ -DS2N_FUZZ_TEST=on - cmake --build ./build -- -j $(nproc) post_build: diff --git a/codebuild/spec/buildspec_fuzz_batch.yml b/codebuild/spec/buildspec_fuzz_batch.yml new file mode 100644 index 00000000000..5100911af08 --- /dev/null +++ b/codebuild/spec/buildspec_fuzz_batch.yml @@ -0,0 +1,49 @@ +--- +# 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 + +# This buildspec runs on an Ubuntu22 image. That configuration is a property of +# the codebuild job itself. + +# Codebuild's matrix jobs have non-differentiated names so use batch-list +# instead. + +# Parameter motivation + +# LIBCRYPTOS +# awslc: happy path libcrypto for s2n-tls +# openssl 3: libcrypto that is widely used + +batch: + build-list: + - identifier: clang_awslc + buildspec: codebuild/spec/buildspec_fuzz.yml + debug-session: true + env: + compute-type: BUILD_GENERAL1_XLARGE + image: 024603541914.dkr.ecr.us-west-2.amazonaws.com/docker:ubuntu22codebuild + privileged-mode: true + variables: + S2N_LIBCRYPTO: awslc + COMPILER: clang + - identifier: clang_openssl_3_0 + buildspec: codebuild/spec/buildspec_fuzz.yml + debug-session: true + env: + compute-type: BUILD_GENERAL1_XLARGE + image: 024603541914.dkr.ecr.us-west-2.amazonaws.com/docker:ubuntu22codebuild + privileged-mode: true + variables: + S2N_LIBCRYPTO: openssl-3.0 + COMPILER: clang