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

ci: refactor fuzz buildspec #4783

Merged
merged 2 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
36 changes: 1 addition & 35 deletions codebuild/spec/buildspec_fuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
49 changes: 49 additions & 0 deletions codebuild/spec/buildspec_fuzz_batch.yml
Original file line number Diff line number Diff line change
@@ -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
Loading