Debian Codegraph @

crt/s2n/codebuild/spec/buildspec_ktls_keyupdate.yml

raw symbols SCIP
1 ---
2 # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License"). You may not use
5 # this file except in compliance with the License. A copy of the License is
6 # located at
7 #
8 # http://aws.amazon.com/apache2.0/
9 #
10 # or in the "license" file accompanying this file. This file is distributed on an
11 # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
12 # implied. See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 version: 0.2
16 # This is designed to work with CodeBuild's reserved instances fleet and
17 # curated Ec2 AMI for Ubuntu25.
18 #
19 # Because the Ec2 reserved instance disks persist between runs,
20 # we need to do periodic clean up; The `nix store gc` command runs on Sunday to
21 # prevent the disk from filling up.
22 env:
23 shell: bash
24 variables:
25 NIX_CACHE_BUCKET: "s3://s2n-tls-nixcachebucket-x86-64?region=us-west-2"
26 NIX_INSTALLER: "https://nixos.org/nix/install"
27 S2N_KTLS_TESTING_EXPECTED: 1
28 S2N_KTLS_KEYUPDATE_TESTING_EXPECTED: 1
29 phases:
30 pre_build:
31 commands:
32 - if [[ $(date +%u) -eq 0 ]]; then nix store gc;fi
33 # Configure S3 bucket as a nix substituter
34 - mkdir -p ~/.config/nix
35 - echo "extra-substituters = $NIX_CACHE_BUCKET" >> ~/.config/nix/nix.conf
36 - echo "extra-trusted-substituters = $NIX_CACHE_BUCKET" >> ~/.config/nix/nix.conf
37 - echo "require-sigs = false" >> ~/.config/nix/nix.conf
38 # Load the TLS kernel module
39 - sudo modprobe tls
40 - echo "Checking that the TLS kernel mod loaded..."; test $(sudo lsmod|grep -c tls) = 1
41 build:
42 commands:
43 - nix develop .#awslc --command bash -c 'source ./nix/shell.sh && clean && configure && unit'
44 - S2N_CMAKE_OPTIONS="-DASAN=ON" nix develop .#awslc --command bash -c 'source ./nix/shell.sh && clean && configure && unit'
45 post_build:
46 commands:
47 - nix copy --to $NIX_CACHE_BUCKET .#cache-awslc
48