Skip to content

ci: add git diff for checking lock file changes#1654

Merged
paul-schaaf merged 7 commits into
solana-foundation:masterfrom
fanatid:ci-git-diff
Mar 20, 2022
Merged

ci: add git diff for checking lock file changes#1654
paul-schaaf merged 7 commits into
solana-foundation:masterfrom
fanatid:ci-git-diff

Conversation

@fanatid
Copy link
Copy Markdown
Contributor

@fanatid fanatid commented Mar 20, 2022

Moved from #1653

@paul-schaaf
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

is this ready for review?

@fanatid
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

oh thats right nice! Lets do it then.

keeping git diff sounds good.

@fanatid
Copy link
Copy Markdown
Contributor Author

fanatid commented Mar 20, 2022

Updated.

@paul-schaaf paul-schaaf merged commit 45a5d20 into solana-foundation:master Mar 20, 2022
@fanatid fanatid deleted the ci-git-diff branch March 20, 2022 19:43
Otter-0x4ka5h pushed a commit to Otter-0x4ka5h/anchor that referenced this pull request Mar 25, 2026
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