1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
---
# 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.
# This is designed to work with CodeBuild's reserved instances fleet and curated Ec2 AMI for AL2023.
version: 0.2
env:
variables:
NIX_CACHE_BUCKET: "s3://s2n-tls-nixcachebucket-x86-64?region=us-west-2"
S2N_KTLS_TESTING_EXPECTED: 1
phases:
install:
commands:
- yum update -y; yum upgrade -y
pre_build:
commands:
# (Re)Install nix
- sh <(curl -L https://nixos.org/nix/install) --no-daemon
# Make sure nix exists in the PATH
- export PATH=$HOME/.nix-profile/bin:$PATH
# Turn on flakes
- mkdir -p ~/.config/nix; echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf
# Populate the store from the nix cache
- nix copy --from $NIX_CACHE_BUCKET --all --no-check-sigs
# Load the TLS kernel module
- sudo modprobe tls
- echo "Checking that the TLS kernel mod loaded..."; test $(sudo lsmod|grep -c tls) = 1
build:
commands:
- nix develop .#openssl111 --command bash -c 'source ./nix/shell.sh && clean && configure && unit'
- S2N_CMAKE_OPTIONS="-DASAN=ON" nix develop .#openssl111 --command bash -c 'source ./nix/shell.sh && clean && configure && unit'
|