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: add git diff for checking lock file changes #1654

Merged
merged 7 commits into from
Mar 20, 2022

Conversation

fanatid
Copy link
Contributor

@fanatid fanatid commented Mar 20, 2022

Moved from #1653

@paul-schaaf
Copy link
Contributor

just to make sure I understand correctly, is the reason for adding this that cargo build will sometimes adjust the lock file and if that happens we want that committed before the CI so the lock file is not adjusted in the CI?

@fanatid
Copy link
Contributor Author

fanatid commented Mar 20, 2022

Yes, purpose of this changes to validate that dependencies on CI (rust/js) will be same as on developer computer.

@paul-schaaf
Copy link
Contributor

is this ready for review?

@fanatid
Copy link
Contributor Author

fanatid commented Mar 20, 2022

Yes, it's ready. One thing I do not like that submodules like action-house/stake/swap change Cargo.lock so we need checkout it. But we can fix it in the future.

@paul-schaaf
Copy link
Contributor

paul-schaaf commented Mar 20, 2022

Ideally we should use cargo build-bpf --locked (--locked doesn't exist on build-bpf though) right?

but we could use that for building our code in the CI (if it does what I think it does)

@fanatid
Copy link
Contributor Author

fanatid commented Mar 20, 2022

We can pass --locked through --:

$ cargo build-bpf -- --locked
BPF SDK: /home/kirill/.local/share/solana/install/releases/1.9.13/solana-release/bin/sdk/bpf
cargo-build-bpf child: rustup toolchain list -v
cargo-build-bpf child: cargo +bpf build --target bpfel-unknown-unknown --release --locked

While I think that would be good to add --locked (--frozen-lockfile for yarn) have git diff at the end still will be useful.
Are you agree with adding --locked/--frozen-lockfile? (if yes, I'll change PR)

@paul-schaaf
Copy link
Contributor

oh thats right nice! Lets do it then.

keeping git diff sounds good.

@fanatid
Copy link
Contributor Author

fanatid commented Mar 20, 2022

Updated.

@paul-schaaf paul-schaaf merged commit 45a5d20 into coral-xyz:master Mar 20, 2022
@fanatid fanatid deleted the ci-git-diff branch March 20, 2022 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants