|
| 1 | +# Release |
| 2 | + |
| 3 | +This documents how MMTk is currently released in the pre-1.0 stage. |
| 4 | + |
| 5 | +## Release Cycle |
| 6 | + |
| 7 | +We maintain a 6-week release cycle. A release is usually cut at the end of a week (Friday). |
| 8 | + |
| 9 | +## Release Scope |
| 10 | + |
| 11 | +MMTk releases include MMTk core and the officially supported bindings. They share the same version number as MMTk core. |
| 12 | + |
| 13 | +The current releases include the following bindings: |
| 14 | +* OpenJDK |
| 15 | +* JikesRVM |
| 16 | + |
| 17 | +The current releases do not include the following bindings: |
| 18 | +* Julia: We have made good progress on the binding development, and we will include it soon. |
| 19 | +* Ruby: We have made good progress on the binding development, and we will include it soon. |
| 20 | +* V8: We currently lack of resources to work on the binding. |
| 21 | + |
| 22 | +## Release Process |
| 23 | + |
| 24 | +### Create PRs to bump the version number |
| 25 | + |
| 26 | +Create pull requests for each repository (mmtk-core, and binding repos that will be included in the release). |
| 27 | +We use semantic versioning for MMTk core, and use the same version number for all the bindings in the same release. |
| 28 | +If the current version is `0.X.x`, the new version should be `0.X+1.0`. |
| 29 | + |
| 30 | +#### MMTk core |
| 31 | + |
| 32 | +The PR should include these changes: |
| 33 | + |
| 34 | +1. Bump version in `Cargo.toml`. |
| 35 | +2. Bump version in `macros/Cargo.toml`. Use the new version for the `mmtk-macros` dependency in `Cargo.toml` |
| 36 | +3. Update `CHANGELOG.md`: |
| 37 | + 1. Add a section for the new version number and the cut-off date (when the PR is created) |
| 38 | + 2. Add change logs for the release. The following shows one convenient way to do it. If there is a better way, we should adopt. |
| 39 | + 1. Auto generate the list of changes for the release on Github. Click on [`releases`](https://github.com/mmtk/mmtk-core/releases), |
| 40 | + then click [`Draft a new release`](https://github.com/mmtk/mmtk-core/releases/new). Enter the new version tag, |
| 41 | + and the `Generate release notes` button should be avaialble. Copy the notes as the change logs to `CHANGELOG.md`. |
| 42 | + Close the release page without tagging a release. |
| 43 | + 2. Categorize the changes in `CHANGELOG.md`. We use these categories: Plan, Policy, Allocator, Scheduler, API, Misc. |
| 44 | +4. Update the pinned Rust version in `rust-toolchain` if necessary. |
| 45 | + 1. Talk with system admin for our CI machines, and check if there is a newer Rust version that we should be using. |
| 46 | + 2. If we update to a new Rust version, make necessary changes to the code base. |
| 47 | + |
| 48 | +#### Bindings |
| 49 | + |
| 50 | +The PR should include these changes: |
| 51 | + |
| 52 | +1. Bump version in `mmtk/Cargo.toml`. Use the same version as MMTk core. |
| 53 | +2. Update `CHANGELOG.md`, similar to the process in MMTk core. |
| 54 | +3. Update the pinned Rust version in `rust-toolchain` if the Rust version is updated for MMTk core. |
| 55 | +4. Update the dependency of `mmtk` in `mmtk/Cargo.toml` to use the MMTk core PR. Update `Cargo.lock`. |
| 56 | + |
| 57 | +#### Merging PRs |
| 58 | + |
| 59 | +We should have a mmtk-core PR and multiple binding PRs. When all the PRs are approved, we can start merging the PRs. |
| 60 | +The merging is the same as ['Merging a PR with API breaking changes' in pull_request.md](./pull_request.md#merging-a-pr-with-api-breaking-changes). |
| 61 | + |
| 62 | +### Tag releases |
| 63 | + |
| 64 | +Once the PRs are merged, we can tag releases on Github. |
| 65 | + |
| 66 | +1. Go to 'Create a new release' for each involved repository. E.g. https://github.com/mmtk/mmtk-core/releases/new for `mmtk-core.` |
| 67 | +2. Enter the new version (prefixed with `v`) in the box of 'Choose a tag'. Use the default 'target' (`master`). |
| 68 | +3. Enter the release title |
| 69 | + * `MMTk 0.x.0` |
| 70 | + * `MMTk OpenJDK Binding 0.x.0` |
| 71 | +4. Copy the markdown section for this version in the `CHANGELOG.md` as the description for the release. |
| 72 | +5. Tick 'Set as a pre-release'. |
| 73 | +6. Click 'Publish release'. |
| 74 | + |
| 75 | +### Post release checklist |
| 76 | + |
| 77 | +1. Keep an eye on the badges in [README](https://github.com/mmtk/mmtk-core#mmtk) |
| 78 | + * crates.io: Once a release is tagged for `mmtk-core`, [cargo-publish.yml](https://github.com/mmtk/mmtk-core/blob/master/.github/workflows/cargo-publish.yml) should be trigger to publish `mmtk-core` to `crates.io`. https://crates.io/crates/mmtk should show the new version. |
| 79 | + * docs: Document hosting: Once `mmtk-core` is published to `crates.io`, a job should be queue'd for document generation on `docs.rs`. https://docs.rs/mmtk/latest/mmtk/ should show |
| 80 | + the docs for the new version once the generation is done. |
| 81 | +2. Keep an eye on the CI status for the latest commit in MMTk core. |
| 82 | +3. Do point release for fixing severe issues. Currently we normally do not need point releases. Normal bug fixes or any other issues can be fixed in the next release. |
| 83 | + But in rare cases, such as the current tagged release cannot build, cannot run, or it somehow fails in publishing, we may need to do a point release. |
| 84 | + * If there is no other commit in `master` yet, doing a point release follows exactly the same process above. Depending on the changes, we may or may not need a point release |
| 85 | + for the bindings. |
| 86 | + * If there are commits in `master` that we do not want to include in the point release, the point release should be in a separate branch in the upstream repository. |
| 87 | + The changes for the point release should be merged back to `master`. |
0 commit comments