-
Notifications
You must be signed in to change notification settings - Fork 739
ci: add awslcfips to nix jobs #5205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
b82eeec
ci: add awslcfips to nix jobs
dougch 073a1bf
add newer awslcfips
dougch ce90485
more env variables
dougch 12b52e5
reduce duplicate env vars
dougch 5990362
better comments on tests not run
dougch 0c3c13e
more pr feedback
dougch 710e6b7
put S2N_NO_HEADBUILD back
dougch a15f9d8
add/reorder the list of integ tests
dougch e3b20c8
Naming consistency
dougch 41862a2
missing copyright
dougch 3010b16
Update codebuild/spec/buildspec_integv2_nix.yml
dougch e1ebc18
Update codebuild/spec/buildspec_integv2_nix.yml
dougch 43c2884
Collapsing waves
dougch File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,170 @@ | ||
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
--- | ||
version: 0.2 | ||
env: | ||
shell: bash | ||
variables: | ||
# --ignore-environment prevents existing environment variables from being carried forward into the new shell. | ||
# This allows for a clean, sterile environment. | ||
NIXDEV_ARGS: --max-jobs auto --ignore-environment | ||
# Ctest is doing Regex matching of test names, with an implicit ".*" around these, so: | ||
# renegotiate covers both renegotiate.py and renegotiate_apache.py | ||
INTEGV2_TEST: | ||
happy_path client_authentication sni_match buffered_send npn sslv2_client_hello | ||
ocsp external_psk pq_handshake serialization | ||
signature_algorithms record_padding renegotiate$ renegotiate_apache cross_compatibility early_data hello_retry_requests | ||
fragmentation key_update session_resumption version_negotiation | ||
# Excluded in nix: | ||
# - dynamic_record_sizes (fails on aarch64) | ||
# - sslyze (tooling not available on aarch64) | ||
|
||
batch: | ||
build-graph: | ||
# Cache job for x86 | ||
- identifier: nixCache_x86_64 | ||
env: | ||
compute-type: BUILD_GENERAL1_XLARGE | ||
image: public.ecr.aws/l1b2r3y5/nix-aws-codebuild:latest | ||
privileged-mode: false | ||
type: LINUX_CONTAINER | ||
variables: | ||
NIXDEV_LIBCRYPTO: .#default | ||
NIX_CACHE_BUCKET: s3://codebuildnixinteg-prod-nixcachebucketintegprodx861-ehnvuoswh2yr?region=us-east-2 | ||
|
||
# Cache Job for aarch64 | ||
- identifier: nixCache_aarch64 | ||
env: | ||
compute-type: BUILD_GENERAL1_XLARGE | ||
image: public.ecr.aws/l1b2r3y5/nix-aws-codebuild-aarch64:next | ||
privileged-mode: false | ||
type: ARM_CONTAINER | ||
variables: | ||
NIXDEV_LIBCRYPTO: .#default | ||
NIX_CACHE_BUCKET: s3://codebuildnixinteg-prod-nixcachebucketintegprodaarc-rqyksjxh6wxa?region=us-east-2 | ||
|
||
# AWSLC x86 | ||
- identifier: Integ_awslc_x86_0 | ||
depend-on: | ||
- nixCache_x86_64 | ||
env: | ||
compute-type: BUILD_GENERAL1_XLARGE | ||
image: public.ecr.aws/l1b2r3y5/nix-aws-codebuild:latest | ||
privileged-mode: true | ||
type: LINUX_CONTAINER | ||
variables: | ||
NIXDEV_LIBCRYPTO: .#awslc | ||
NIX_CACHE_BUCKET: s3://codebuildnixinteg-prod-nixcachebucketintegprodx861-ehnvuoswh2yr?region=us-east-2 | ||
|
||
# AWSLC aarch64 | ||
- identifier: Integ_awslc_aarch64_0 | ||
depend-on: | ||
- nixCache_aarch64 | ||
env: | ||
compute-type: BUILD_GENERAL1_XLARGE | ||
image: public.ecr.aws/l1b2r3y5/nix-aws-codebuild-aarch64:next | ||
privileged-mode: true | ||
type: ARM_CONTAINER | ||
variables: | ||
NIXDEV_LIBCRYPTO: .#awslc | ||
NIX_CACHE_BUCKET: s3://codebuildnixinteg-prod-nixcachebucketintegprodaarc-rqyksjxh6wxa?region=us-east-2 | ||
|
||
# AWSLC-FIPS-2022 | ||
- identifier: Integ_awslcfips2022_aarch64_0 | ||
depend-on: | ||
- nixCache_aarch64 | ||
env: | ||
compute-type: BUILD_GENERAL1_XLARGE | ||
image: public.ecr.aws/l1b2r3y5/nix-aws-codebuild-aarch64:next | ||
privileged-mode: true | ||
type: ARM_CONTAINER | ||
variables: | ||
NIXDEV_LIBCRYPTO: .#awslcfips2022 | ||
NIX_CACHE_BUCKET: s3://codebuildnixinteg-prod-nixcachebucketintegprodaarc-rqyksjxh6wxa?region=us-east-2 | ||
|
||
# AWSLC-FIPS-2024 | ||
- identifier: Integ_awslcfips2024_aarch64_0 | ||
depend-on: | ||
- nixCache_aarch64 | ||
env: | ||
compute-type: BUILD_GENERAL1_XLARGE | ||
image: public.ecr.aws/l1b2r3y5/nix-aws-codebuild-aarch64:next | ||
privileged-mode: true | ||
type: ARM_CONTAINER | ||
variables: | ||
NIXDEV_LIBCRYPTO: .#awslcfips2024 | ||
NIX_CACHE_BUCKET: s3://codebuildnixinteg-prod-nixcachebucketintegprodaarc-rqyksjxh6wxa?region=us-east-2 | ||
|
||
# Openssl30 x86 | ||
- identifier: Integ_openssl30_x86_0 | ||
depend-on: | ||
- nixCache_x86_64 | ||
env: | ||
compute-type: BUILD_GENERAL1_XLARGE | ||
image: public.ecr.aws/l1b2r3y5/nix-aws-codebuild:latest | ||
privileged-mode: true | ||
type: LINUX_CONTAINER | ||
variables: | ||
NIXDEV_LIBCRYPTO: .#default | ||
NIX_CACHE_BUCKET: s3://codebuildnixinteg-prod-nixcachebucketintegprodx861-ehnvuoswh2yr?region=us-east-2 | ||
|
||
# Openssl30 aarch64 | ||
- identifier: Integ_openssl30_aarch64_0 | ||
depend-on: | ||
- nixCache_aarch64 | ||
env: | ||
compute-type: BUILD_GENERAL1_XLARGE | ||
image: public.ecr.aws/l1b2r3y5/nix-aws-codebuild-aarch64:next | ||
privileged-mode: true | ||
type: ARM_CONTAINER | ||
variables: | ||
NIXDEV_LIBCRYPTO: .#default | ||
NIX_CACHE_BUCKET: s3://codebuildnixinteg-prod-nixcachebucketintegprodaarc-rqyksjxh6wxa?region=us-east-2 | ||
|
||
# Openssl111 aarch64 only | ||
- identifier: Integ_openssl111_aarch64_0 | ||
depend-on: | ||
- nixCache_aarch64 | ||
env: | ||
compute-type: BUILD_GENERAL1_XLARGE | ||
image: public.ecr.aws/l1b2r3y5/nix-aws-codebuild-aarch64:next | ||
privileged-mode: true | ||
type: ARM_CONTAINER | ||
variables: | ||
NIXDEV_LIBCRYPTO: .#openssl111 | ||
NIX_CACHE_BUCKET: s3://codebuildnixinteg-prod-nixcachebucketintegprodaarc-rqyksjxh6wxa?region=us-east-2 | ||
|
||
phases: | ||
install: | ||
commands: | ||
- | | ||
if [[ $CODEBUILD_BATCH_BUILD_IDENTIFIER =~ .*"nixCache".* ]]; then | ||
echo "Refreshing nix cache..." | ||
nix copy --from $NIX_CACHE_BUCKET --all --no-check-sigs | ||
nix build .#devShell | ||
nix copy --to $NIX_CACHE_BUCKET .#devShell | ||
else | ||
echo "Downloading cache" | ||
nix copy --from $NIX_CACHE_BUCKET --all --no-check-sigs | ||
fi | ||
pre_build: | ||
commands: | ||
- | | ||
if [[ ! $CODEBUILD_BATCH_BUILD_IDENTIFIER =~ .*"nixCache".* ]]; then | ||
nix copy --from $NIX_CACHE_BUCKET --all --no-check-sigs | ||
nix develop $NIXDEV_ARGS $NIXDEV_LIBCRYPTO --command bash -c "source ./nix/shell.sh; configure" | ||
fi | ||
build: | ||
commands: | ||
- | | ||
if [[ ! $CODEBUILD_BATCH_BUILD_IDENTIFIER =~ .*"nixCache".* ]]; then | ||
nix develop $NIXDEV_ARGS $NIXDEV_LIBCRYPTO --command bash -c "source ./nix/shell.sh; build" | ||
fi | ||
post_build: | ||
commands: | ||
- | | ||
if [[ ! $CODEBUILD_BATCH_BUILD_IDENTIFIER =~ .*"nixCache".* ]]; then | ||
nix develop $NIXDEV_ARGS $NIXDEV_LIBCRYPTO --command bash -c "source ./nix/shell.sh;integ $INTEGV2_TEST" | ||
fi | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,166 @@ | ||
# | ||
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
--- | ||
version: 0.2 | ||
env: | ||
shell: bash | ||
variables: | ||
NIXDEV_ARGS: --max-jobs auto | ||
S2N_NO_HEADBUILD: "1" | ||
|
||
batch: | ||
build-graph: | ||
# Cache job for x86 | ||
- identifier: nixCache_x86_64 | ||
comment: identifiers can not contain dashes | ||
env: | ||
compute-type: BUILD_GENERAL1_LARGE | ||
image: public.ecr.aws/l1b2r3y5/nix-aws-codebuild:latest | ||
variables: | ||
NIX_CACHE_BUCKET: s3://s2n-tls-nixcachebucket-x86-64?region=us-west-2 | ||
|
||
# Cache job for aarch64 | ||
- identifier: nixCache_aarch64 | ||
env: | ||
compute-type: BUILD_GENERAL1_LARGE | ||
image: public.ecr.aws/l1b2r3y5/nix-aws-codebuild-aarch64:next | ||
type: ARM_CONTAINER | ||
variables: | ||
NIX_CACHE_BUCKET: s3://s2n-tls-nixcachebucket-aarch64?region=us-west-2 | ||
|
||
# Openssl30 x86 | ||
- identifier: UnitOpenssl30_x86_64 | ||
depend-on: | ||
- nixCache_x86_64 | ||
env: | ||
compute-type: BUILD_GENERAL1_LARGE | ||
image: public.ecr.aws/l1b2r3y5/nix-aws-codebuild:latest | ||
privileged-mode: true | ||
variables: | ||
NIXDEV_LIBCRYPTO: .#default | ||
NIX_CACHE_BUCKET: s3://s2n-tls-nixcachebucket-x86-64?region=us-west-2 | ||
|
||
# Openssl30 aarch64 | ||
- identifier: UnitOpenssl30_aarch64 | ||
depend-on: | ||
- nixCache_aarch64 | ||
env: | ||
compute-type: BUILD_GENERAL1_LARGE | ||
image: public.ecr.aws/l1b2r3y5/nix-aws-codebuild-aarch64:next | ||
privileged-mode: true | ||
type: ARM_CONTAINER | ||
variables: | ||
NIXDEV_LIBCRYPTO: .#default | ||
NIX_CACHE_BUCKET: s3://s2n-tls-nixcachebucket-aarch64?region=us-west-2 | ||
|
||
# Openssl111 aarch64 | ||
- identifier: UnitOpenssl111_aarch64 | ||
depend-on: | ||
- nixCache_aarch64 | ||
env: | ||
compute-type: BUILD_GENERAL1_LARGE | ||
image: public.ecr.aws/l1b2r3y5/nix-aws-codebuild-aarch64:next | ||
privileged-mode: true | ||
type: ARM_CONTAINER | ||
variables: | ||
NIXDEV_LIBCRYPTO: .#openssl111 | ||
NIX_CACHE_BUCKET: s3://s2n-tls-nixcachebucket-aarch64?region=us-west-2 | ||
|
||
# Openssl102 aarch64 | ||
- identifier: UnitOpenssl102_aarch64 | ||
depend-on: | ||
- nixCache_aarch64 | ||
env: | ||
compute-type: BUILD_GENERAL1_LARGE | ||
image: public.ecr.aws/l1b2r3y5/nix-aws-codebuild-aarch64:next | ||
privileged-mode: true | ||
type: ARM_CONTAINER | ||
variables: | ||
NIXDEV_LIBCRYPTO: .#openssl102 | ||
NIX_CACHE_BUCKET: s3://s2n-tls-nixcachebucket-aarch64?region=us-west-2 | ||
|
||
# awslc x86 | ||
- identifier: UnitAwslc_x86_64 | ||
depend-on: | ||
- nixCache_x86_64 | ||
env: | ||
compute-type: BUILD_GENERAL1_LARGE | ||
image: public.ecr.aws/l1b2r3y5/nix-aws-codebuild:latest | ||
privileged-mode: true | ||
variables: | ||
NIXDEV_LIBCRYPTO: .#awslc | ||
NIX_CACHE_BUCKET: s3://s2n-tls-nixcachebucket-x86-64?region=us-west-2 | ||
|
||
# awslc aarch64 | ||
- identifier: UnitAwslc_aarch64 | ||
depend-on: | ||
- nixCache_aarch64 | ||
env: | ||
compute-type: BUILD_GENERAL1_LARGE | ||
image: public.ecr.aws/l1b2r3y5/nix-aws-codebuild-aarch64:next | ||
privileged-mode: true | ||
type: ARM_CONTAINER | ||
variables: | ||
NIXDEV_LIBCRYPTO: .#awslc | ||
NIX_CACHE_BUCKET: s3://s2n-tls-nixcachebucket-aarch64?region=us-west-2 | ||
|
||
# awslcfips 2022 aarch64 | ||
- identifier: UnitAwslcFips2022_aarch64 | ||
depend-on: | ||
- nixCache_aarch64 | ||
env: | ||
compute-type: BUILD_GENERAL1_LARGE | ||
image: public.ecr.aws/l1b2r3y5/nix-aws-codebuild-aarch64:next | ||
privileged-mode: true | ||
type: ARM_CONTAINER | ||
variables: | ||
NIXDEV_LIBCRYPTO: .#awslcfips2022 | ||
NIX_CACHE_BUCKET: s3://s2n-tls-nixcachebucket-aarch64?region=us-west-2 | ||
|
||
# awslcfips 2024 aarch64 | ||
- identifier: UnitAwslcFips2024_aarch64 | ||
depend-on: | ||
- nixCache_aarch64 | ||
env: | ||
compute-type: BUILD_GENERAL1_LARGE | ||
image: public.ecr.aws/l1b2r3y5/nix-aws-codebuild-aarch64:next | ||
privileged-mode: true | ||
type: ARM_CONTAINER | ||
variables: | ||
NIXDEV_LIBCRYPTO: .#awslcfips2024 | ||
NIX_CACHE_BUCKET: s3://s2n-tls-nixcachebucket-aarch64?region=us-west-2 | ||
|
||
phases: | ||
install: | ||
commands: | ||
- | | ||
if [[ "$CODEBUILD_BATCH_BUILD_IDENTIFIER" =~ .*"nixCache".* ]]; then | ||
echo "Refreshing nix cache..." | ||
nix copy --from $NIX_CACHE_BUCKET --all --no-check-sigs | ||
nix build $NIXDEV_ARGS .#devShell | ||
nix copy --to $NIX_CACHE_BUCKET .#devShell; | ||
else | ||
echo "Downloading cache" | ||
nix copy --from $NIX_CACHE_BUCKET --all --no-check-sigs | ||
fi | ||
pre_build: | ||
commands: | ||
- | | ||
if [[ ! $CODEBUILD_BATCH_BUILD_IDENTIFIER =~ .*"nixCache".* ]]; then | ||
nix copy --from $NIX_CACHE_BUCKET --all --no-check-sigs | ||
nix develop $NIXDEV_ARGS $NIXDEV_LIBCRYPTO --command bash -c "source ./nix/shell.sh; configure"; | ||
fi | ||
build: | ||
commands: | ||
- | | ||
if [[ ! $CODEBUILD_BATCH_BUILD_IDENTIFIER =~ .*"nixCache".* ]]; then | ||
nix develop $NIXDEV_ARGS $NIXDEV_LIBCRYPTO --command bash -c "source ./nix/shell.sh; build"; | ||
fi | ||
post_build: | ||
commands: | ||
- | | ||
if [[ ! $CODEBUILD_BATCH_BUILD_IDENTIFIER =~ .*"nixCache".* ]]; then | ||
nix develop $NIXDEV_ARGS $NIXDEV_LIBCRYPTO --command bash -c "source ./nix/shell.sh; unit" | ||
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we match the rebalancing work that was done? So have
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually - let me do this in a followup when we figure out fan-out.