Skip to content
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

ci: Nix flake and devShell #2189

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

ci: Nix flake and devShell #2189

wants to merge 4 commits into from

Conversation

dougch
Copy link
Contributor

@dougch dougch commented Feb 11, 2025

Issues:

none

Description of changes:

Adds a Nix package flake and a development shell with the tooling needed to build and test aws-lc.

The flake allows other projects, such as s2n-tls, to directly pull aws-lc into a nix Ci environment. The devshell is a self-contained development shell, setup and managed by nix, focused on reproducible builds, and can be helpful for bootstrapping new folks.

Example devshell usage:

% nix develop                                                                                                                                                                                                                       
Entering a devShell...              
[awslc nix] dougch@devdesktop22:~/gitrepos/aws-lc$ clean;configure;build;unit                                                

Testing:

How is this change tested (unit tests, fuzz tests, etc.)? locally, new action on my fork
Sample output of the GitHub Action: https://github.com/dougch/aws-lc/actions/runs/13296817224/job/37130549429

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.

@dougch dougch requested a review from a team as a code owner February 11, 2025 22:01
@codecov-commenter
Copy link

codecov-commenter commented Feb 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.06%. Comparing base (913af96) to head (89a9fca).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2189      +/-   ##
==========================================
+ Coverage   79.04%   79.06%   +0.02%     
==========================================
  Files         612      612              
  Lines      106510   106510              
  Branches    15053    15052       -1     
==========================================
+ Hits        84192    84217      +25     
+ Misses      21664    21639      -25     
  Partials      654      654              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@justsmth justsmth self-requested a review February 12, 2025 14:37
Copy link
Contributor

@andrewhop andrewhop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a CI check that ensures this flake works as expected?

{
description = "AWS-LC is a general-purpose cryptographic library";

inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will we have to keep this up to date? Is there an option for latest?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Latest is essentially a development branch and comes with the risk of breakage. There are only 2 releases a year (similar to Canonical's cadence), so the version bumps can be infrequent.

@dougch dougch requested a review from andrewhop February 12, 2025 23:33
@hanno-becker
Copy link
Contributor

This would also ease the integration of CBMC once mlkem-native is merged (#2176), as there's a flake specifying the CBMC tooling (https://github.com/pq-code-package/mlkem-native/tree/main/nix/cbmc).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants