Skip to content

Add scripts for local subtree update - #46

Merged
jaisnan merged 9 commits into
model-checking:mainfrom
jaisnan:add-scripts-for-local-updatae
Aug 12, 2024
Merged

Add scripts for local subtree update#46
jaisnan merged 9 commits into
model-checking:mainfrom
jaisnan:add-scripts-for-local-updatae

Conversation

@jaisnan

@jaisnanjaisnan commented Jul 30, 2024

Copy link
Copy Markdown

The CI job for subtree update timesout because it takes more than 6hrs. While we figure out how to solve that problem, this process makes sure there's an automated way for anyone to update the repo's subtree hosted library, with a one click script/command.

The structure of this process follows the (would-be) CI workflow closely i.e

  1. Call scripts/run_update_with_checks.sh
  2. This script in turn calls the other scripts in order
  3. Pull and update local subtree/library with updates from rust-lang
  4. Merge subtree/library onto local SYNC-{DATE} where {DATE} is the date tracked by Kani's features/verify-rust-std branch.
  5. Update toolchain to the date tracked by kani's features/verify-rust-std branch and commit.
  6. Test this branch with check_rustc which checks for compilation compatibility of the updated library and check_kani which checks that Kani's injected harnesses verify as expected.

Call-out

This currently only automates the process of updating the subtree and running all checks on it. After that, the process of issuing a PR from the SYNC-DATE branch of the local repo is still in the responsibility of the dev running the script.

There is ongoing work to automate the process of writing/pushing branches as well.

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

add pull_request just for testing
add push permission for testing
Test without updating subtree
Try within kani dir
Use kani as workdir
Change parsing
Parse regex with path
Check for toolchain file
Get toolchain date
Use correct hash and date
Use commit hash instead
make upstream pull explicit
Add origin for pulling
set working directory to head
Fix working directory
Update subtree
Add --quiet
Update with --quiet
Add pull_from_upstream.sh
Add scripts -1
Add explicit commit pull
Add temp home dir
Add clone from temp
Add base repo
Update comments
clone into tempdir
Add working tests
@jaisnan
jaisnan requested a review from a team as a code ownerJuly 30, 2024 15:31

@celinvalcelinval left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

That's great! Thanks @jaisnan

I think we should update our CI to use check_kani.sh and check_rustc.sh scripts, so we don't have 2 different sources of truth.

@jaisnan

jaisnan commented Jul 30, 2024

Copy link
Copy Markdown
Author

That's great! Thanks @jaisnan

I think we should update our CI to use check_kani.sh and check_rustc.sh scripts, so we don't have 2 different sources of truth.

Let me update this PR itself with that change.
Edit: Done!

Test with github workspace
Try with bash
Run ls
Try with path expanded
Fix path to script
Fix path to library
Fix script
Check with verify-rst-std
Check workflow
Check path
Fix path
change path to head
Comment threadscripts/pull_from_upstream.sh
@jaisnan
jaisnan merged commit ec6d98e into model-checking:mainAug 12, 2024
@carolynzechcarolynzech mentioned this pull request Aug 15, 2024
szlee118 pushed a commit to stogaru/verify-rust-std that referenced this pull request Oct 17, 2024
The CI job for subtree update timesout because it takes more than 6hrs.
While we figure out how to solve that problem, this process makes sure
there's an automated way for anyone to update the repo's subtree hosted
library, with a one click script/command.
The structure of this process follows the (would-be) CI workflow closely
i.e
1. Call `scripts/run_update_with_checks.sh` 2. This script in turn calls the other scripts in order
3. Pull and update local `subtree/library` with updates from
[rust-lang](https://github.com/rust-lang/rust)
4. Merge `subtree/library` onto local `SYNC-{DATE}` where {DATE} is the
date tracked by Kani's `features/verify-rust-std` branch.
5. Update toolchain to the date tracked by kani's
`features/verify-rust-std` branch and commit.
6. Test this branch with `check_rustc` which checks for compilation
compatibility of the updated library and `check_kani` which checks that
Kani's injected harnesses verify as expected.
## Call-out
This currently only automates the process of updating the subtree and
running all checks on it. After that, the process of issuing a PR from
the SYNC-DATE branch of the local repo is still in the responsibility of
the dev running the script.
There is ongoing work to automate the process of writing/pushing
branches as well.
By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 and MIT licenses.
hxuhack added a commit to safer-rust/rapx-verify-rust-std that referenced this pull request Sep 23, 2025
Sign up for freeto 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.

3 participants

@jaisnan@tautschnig@celinval