Skip to content

Commit

Permalink
ci: refactor fuzz buildspec (#4783)
Browse files Browse the repository at this point in the history
  • Loading branch information
jouho authored Sep 19, 2024
1 parent e896037 commit 0bae2c5
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 35 deletions.
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

0 comments on commit 0bae2c5

Please sign in to comment.