-
Notifications
You must be signed in to change notification settings - Fork 252
Release Process
So you want to make a new release of C2Rust? Well, here's (generally) how we do that.
First, you will need to be an owner of the relevant crates on crates.io. Any existing owner can invite you, please contact one of the owners listed on the crate's crates.io page.
Based on https://dev.to/sharkdp/my-release-checklist-for-rust-programs-1m33
-
Check and update dependencies
- Check cargo outdated (
cargo outdated -R
) - Run
cargo update
- Manually update to new revisions (if needed)
- Check cargo outdated (
-
Clean up code base
- Review
cargo clippy
output - Run
cargo fmt
- Run tests
- Review
-
Bump version
- Update versions in
Cargo.toml
s - Run
cargo build
to update Cargo.lock
- Update versions in
-
Compile release notes
-
Update documentation
- Review and update command usage
- Update main README
- Review manual and update if needed
-
Install and test the master locally
-
cargo +stable install -f --path c2rust
- Test new features
- Run benchmarks?
-
-
Run package script check
./scripts/package.py --version x.y.z check
fw (01/28/2023) - this script was broken by #804
-
Dry run publish
cargo publish --dry-run --allow-dirty
fw (01/28/2023) - this does not work with a Cargo workspace. running with
-p
for each crate also doesn't work because cargo publish uses versions over path dependencies, but our intra-workspace deps have not actually been published yet -
Commit, push, pass CI, merge
-
Create release on github (with release notes)
Create a git tag through the GH release UI.
-
Verify github deployment
fw (01/28/2023) - what does this mean?
-
Publish to crates.io
The package.py script can do this with publish, but it also tries to tag a release at the same time. It's currently easier to just
cargo publish -p $crate
manually in the correct reverse dependency order until we fix up the script.Note that
cargo publish
requirescargo login
or to haveCARGO_REGISTRY_TOKEN
set in the environment.fw (01/28/2023) - skip crates
exclude
d in the top-levelCargo.toml
#!/bin/sh # reverse topological order: order=( c2rust-asm-casts c2rust-ast-builder c2rust-ast-printer c2rust-build-paths c2rust-ast-exporter c2rust-bitfields-derive c2rust-bitfields c2rust-transpile c2rust ) for crate in ${order[@]}; do cargo publish -p $crate || break done