From 66a3bcbb500b17461e348168b8ea41ad815e000b Mon Sep 17 00:00:00 2001 From: Doug Chapman <54039637+dougch@users.noreply.github.com> Date: Wed, 9 Oct 2024 14:49:33 -0700 Subject: [PATCH] ci: Add ubuntu24 with a new cmake buildspec (#4824) --- codebuild/spec/buildspec_generalbatch.yml | 23 ++++++++++++++++++ codebuild/spec/buildspec_ubuntu_cmake.yml | 29 +++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 codebuild/spec/buildspec_ubuntu_cmake.yml diff --git a/codebuild/spec/buildspec_generalbatch.yml b/codebuild/spec/buildspec_generalbatch.yml index 812b9bf4150..129d242eabb 100644 --- a/codebuild/spec/buildspec_generalbatch.yml +++ b/codebuild/spec/buildspec_generalbatch.yml @@ -187,6 +187,29 @@ batch: S2N_LIBCRYPTO: openssl-3.0 TESTS: unit identifier: s2nUnitOpenssl3Gcc9 + ### Ubuntu24 ### + # Openssl-1.1.1 + gcc-13: Prefer more widely used Openssl on the default + # Ubuntu24 compiler. + # Aws-lc + clang-18: aws-lc is being built with clang; keep parity while building + # s2n-tls on a newer compiler. + - buildspec: codebuild/spec/buildspec_ubuntu_cmake.yml + env: + compute-type: BUILD_GENERAL1_MEDIUM + image: 024603541914.dkr.ecr.us-west-2.amazonaws.com/docker:ubuntu24 + privileged-mode: true + variables: + COMPILER: 'gcc-13' + S2N_LIBCRYPTO: 'openssl-1.1.1' + identifier: s2nUnitOpenssl111Gcc13 + - buildspec: codebuild/spec/buildspec_ubuntu_cmake.yml + env: + compute-type: BUILD_GENERAL1_MEDIUM + image: 024603541914.dkr.ecr.us-west-2.amazonaws.com/docker:ubuntu24 + privileged-mode: true + variables: + COMPILER: 'clang-18' + S2N_LIBCRYPTO: 'awslc' + identifier: s2nUnitAwslcClang18 - buildspec: codebuild/spec/buildspec_amazonlinux.yml env: compute-type: BUILD_GENERAL1_LARGE diff --git a/codebuild/spec/buildspec_ubuntu_cmake.yml b/codebuild/spec/buildspec_ubuntu_cmake.yml new file mode 100644 index 00000000000..88360356bda --- /dev/null +++ b/codebuild/spec/buildspec_ubuntu_cmake.yml @@ -0,0 +1,29 @@ +--- +# 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 + +phases: + build: + on-failure: ABORT + commands: + - | + cmake . -Bbuild \ + -DCMAKE_C_COMPILER=/usr/bin/$COMPILER \ + -DCMAKE_PREFIX_PATH=/usr/local/$S2N_LIBCRYPTO \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo + - cmake --build ./build -- -j $(nproc) + post_build: + on-failure: ABORT + commands: + - CTEST_OUTPUT_ON_FAILURE=1 CTEST_PARALLEL_LEVEL=$(nproc) make -C build test