| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
--- |
| 6 |
version: 0.2 |
| 7 |
env: |
| 8 |
shell: bash |
| 9 |
variables: |
| 10 |
NIXDEV_ARGS: --max-jobs auto |
| 11 |
S2N_NO_HEADBUILD: "1" |
| 12 |
|
| 13 |
batch: |
| 14 |
build-graph: |
| 15 |
|
| 16 |
- identifier: UnitOpenssl30_x86_64 |
| 17 |
env: |
| 18 |
compute-type: BUILD_GENERAL1_LARGE |
| 19 |
image: public.ecr.aws/l1b2r3y5/nix-aws-codebuild:latest |
| 20 |
privileged-mode: true |
| 21 |
variables: |
| 22 |
NIXDEV_LIBCRYPTO: .#default |
| 23 |
NIX_CACHE_BUCKET: s3://s2n-tls-nixcachebucket-x86-64?region=us-west-2 |
| 24 |
|
| 25 |
|
| 26 |
- identifier: UnitOpenssl30_aarch64 |
| 27 |
env: |
| 28 |
compute-type: BUILD_GENERAL1_LARGE |
| 29 |
image: public.ecr.aws/l1b2r3y5/nix-aws-codebuild-aarch64:next |
| 30 |
privileged-mode: true |
| 31 |
type: ARM_CONTAINER |
| 32 |
variables: |
| 33 |
NIXDEV_LIBCRYPTO: .#default |
| 34 |
NIX_CACHE_BUCKET: s3://s2n-tls-nixcachebucket-aarch64?region=us-west-2 |
| 35 |
|
| 36 |
|
| 37 |
- identifier: UnitOpenssl111_aarch64 |
| 38 |
env: |
| 39 |
compute-type: BUILD_GENERAL1_LARGE |
| 40 |
image: public.ecr.aws/l1b2r3y5/nix-aws-codebuild-aarch64:next |
| 41 |
privileged-mode: true |
| 42 |
type: ARM_CONTAINER |
| 43 |
variables: |
| 44 |
NIXDEV_LIBCRYPTO: .#openssl111 |
| 45 |
NIX_CACHE_BUCKET: s3://s2n-tls-nixcachebucket-aarch64?region=us-west-2 |
| 46 |
|
| 47 |
|
| 48 |
- identifier: UnitOpenssl102_aarch64 |
| 49 |
env: |
| 50 |
compute-type: BUILD_GENERAL1_LARGE |
| 51 |
image: public.ecr.aws/l1b2r3y5/nix-aws-codebuild-aarch64:next |
| 52 |
privileged-mode: true |
| 53 |
type: ARM_CONTAINER |
| 54 |
variables: |
| 55 |
NIXDEV_LIBCRYPTO: .#openssl102 |
| 56 |
NIX_CACHE_BUCKET: s3://s2n-tls-nixcachebucket-aarch64?region=us-west-2 |
| 57 |
|
| 58 |
|
| 59 |
- identifier: UnitLibressl_x86_64 |
| 60 |
env: |
| 61 |
compute-type: BUILD_GENERAL1_LARGE |
| 62 |
image: public.ecr.aws/l1b2r3y5/nix-aws-codebuild:latest |
| 63 |
privileged-mode: true |
| 64 |
variables: |
| 65 |
NIXDEV_LIBCRYPTO: .#libressl |
| 66 |
NIX_CACHE_BUCKET: s3://s2n-tls-nixcachebucket-x86-64?region=us-west-2 |
| 67 |
|
| 68 |
|
| 69 |
- identifier: UnitAwslc_x86_64 |
| 70 |
env: |
| 71 |
compute-type: BUILD_GENERAL1_LARGE |
| 72 |
image: public.ecr.aws/l1b2r3y5/nix-aws-codebuild:latest |
| 73 |
privileged-mode: true |
| 74 |
variables: |
| 75 |
NIXDEV_LIBCRYPTO: .#awslc |
| 76 |
NIX_CACHE_BUCKET: s3://s2n-tls-nixcachebucket-x86-64?region=us-west-2 |
| 77 |
|
| 78 |
|
| 79 |
- identifier: UnitAwslc_aarch64 |
| 80 |
env: |
| 81 |
compute-type: BUILD_GENERAL1_LARGE |
| 82 |
image: public.ecr.aws/l1b2r3y5/nix-aws-codebuild-aarch64:next |
| 83 |
privileged-mode: true |
| 84 |
type: ARM_CONTAINER |
| 85 |
variables: |
| 86 |
NIXDEV_LIBCRYPTO: .#awslc |
| 87 |
NIX_CACHE_BUCKET: s3://s2n-tls-nixcachebucket-aarch64?region=us-west-2 |
| 88 |
|
| 89 |
|
| 90 |
- identifier: UnitAwslcFips2022_aarch64 |
| 91 |
env: |
| 92 |
compute-type: BUILD_GENERAL1_LARGE |
| 93 |
image: public.ecr.aws/l1b2r3y5/nix-aws-codebuild-aarch64:next |
| 94 |
privileged-mode: true |
| 95 |
type: ARM_CONTAINER |
| 96 |
variables: |
| 97 |
NIXDEV_LIBCRYPTO: .#awslcfips2022 |
| 98 |
NIX_CACHE_BUCKET: s3://s2n-tls-nixcachebucket-aarch64?region=us-west-2 |
| 99 |
|
| 100 |
|
| 101 |
- identifier: UnitAwslcFips2024_aarch64 |
| 102 |
env: |
| 103 |
compute-type: BUILD_GENERAL1_LARGE |
| 104 |
image: public.ecr.aws/l1b2r3y5/nix-aws-codebuild-aarch64:next |
| 105 |
privileged-mode: true |
| 106 |
type: ARM_CONTAINER |
| 107 |
variables: |
| 108 |
NIXDEV_LIBCRYPTO: .#awslcfips2024 |
| 109 |
NIX_CACHE_BUCKET: s3://s2n-tls-nixcachebucket-aarch64?region=us-west-2 |
| 110 |
|
| 111 |
phases: |
| 112 |
install: |
| 113 |
commands: |
| 114 |
- if [[ $(date +%u) -eq 0 ]]; then nix store gc; fi |
| 115 |
- | |
| 116 |
# Configure S3 bucket as a nix substituter so nix develop pulls from it automatically. |
| 117 |
mkdir -p ~/.config/nix |
| 118 |
echo "extra-substituters = $NIX_CACHE_BUCKET" >> ~/.config/nix/nix.conf |
| 119 |
echo "extra-trusted-substituters = $NIX_CACHE_BUCKET" >> ~/.config/nix/nix.conf |
| 120 |
echo "require-sigs = false" >> ~/.config/nix/nix.conf |
| 121 |
pre_build: |
| 122 |
commands: |
| 123 |
- | |
| 124 |
set -e |
| 125 |
nix develop $NIXDEV_ARGS $NIXDEV_LIBCRYPTO --command bash -c "source ./nix/shell.sh; configure" |
| 126 |
build: |
| 127 |
commands: |
| 128 |
- | |
| 129 |
set -e |
| 130 |
nix develop $NIXDEV_ARGS $NIXDEV_LIBCRYPTO --command bash -c "source ./nix/shell.sh; build" |
| 131 |
post_build: |
| 132 |
commands: |
| 133 |
- | |
| 134 |
set -e |
| 135 |
nix develop $NIXDEV_ARGS $NIXDEV_LIBCRYPTO --command bash -c "source ./nix/shell.sh; unit" |
| 136 |
echo "Pushing to nix cache..." |
| 137 |
NIX_CACHE_PKG=".#cache-${NIXDEV_LIBCRYPTO#.#}" |
| 138 |
nix copy --to $NIX_CACHE_BUCKET $NIX_CACHE_PKG |