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: Validate lockfile #530

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

ci: Validate lockfile #530

wants to merge 1 commit into from

Conversation

robin-nitrokey
Copy link
Member

This patch adds a step to the build-firmware CI job that ensures that the lockfile is up-to-date. See also: Nitrokey/nethsm-pkcs11#221

This patch adds a step to the build-firmware CI job that ensures that
the lockfile is up-to-date.  See also:  Nitrokey/nethsm-pkcs11#221
@nitrokey-ci
Copy link
Collaborator

No significant changes.

Insignifcant changes
metric value change
binary-size-nk3am 1,439,716 +0 (+0.00%)
binary-size-nk3am-test 2,047,493 +0 (+0.00%)
binary-size-nk3xn 516,404 +0 (+0.00%)
binary-size-nk3xn-test 590,424 +0 (+0.00%)
binary-size-nkpk 746,350 +0 (+0.00%)

Copy link
Collaborator

@sosthene-nitrokey sosthene-nitrokey left a comment

Choose a reason for hiding this comment

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

In nethsm-pkcs11 I also made the lints run with --frozen. That way the lints cannot be triggered for things that are not the result of the PR being checked.

Not sure when a lint could be triggered by a cargo update, but we never know.

@sosthene-nitrokey
Copy link
Collaborator

The release builds should probably use --frozen no?

@robin-nitrokey
Copy link
Member Author

I omitted that to keep the Makefile simple (we would only want to set it in CI, not for development) while still catching the most common issues. In what cases would cargo fetch --locked succeed and cargo build --frozen fail?

@sosthene-nitrokey
Copy link
Collaborator

It's not to check for failure, but to ensure sure that the lockfile is the correct description of the version used for releases. (reproducible builds etc...). To be frank I don't have intuition for exactly when Cargo can fetch crates. So this idea was just based on the Rust packaging guidlines for Arch, which use cargo fetch --locked and then cargo build --release --frozen.

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.

4 participants