|
1 | 1 | # Release Checklist |
2 | | -The following are the steps to follow to make a new PySCIPOpt release. They should mostly be done in order. |
3 | | -- [ ] Check if [scipoptsuite-deploy](https://github.com/scipopt/scipoptsuite-deploy) needs a new release, if a new SCIP version is released for example, or new dependencies (change symmetry dependency, add support for papilo/ parallelization.. etc). And Update release links in `pyproject.toml` |
4 | | -- [ ] Check if the table in the [documentation](https://pyscipopt.readthedocs.io/en/latest/build.html#building-from-source) needs to be updated. |
5 | | -- [ ] Update version number according to semantic versioning [rules](https://semver.org/) in `src/pyscipopt/_version.py` and `setup.py` |
6 | | -- [ ] Update `CHANGELOG.md`; Change the `Unreleased` to the new version number and add an empty unreleased section. |
7 | | -- [ ] Create a release candidate on test-pypi by running the workflow “Build wheels” in Actions->build wheels, with these parameters `upload:true, test-pypi:true` |
8 | | -- [ ] If the pipeline passes, test the released pip package on test-pypi by running and checking that it works |
| 2 | + |
| 3 | +## Upgrading SCIP |
| 4 | + |
| 5 | +Run `./upgrade_scip.sh` from the `master` branch (use `--dry-run` first to preview without side effects). The script will: |
| 6 | +1. Prompt for SCIP, SoPlex, GCG, and IPOPT versions |
| 7 | +2. Build new binaries via [scipoptsuite-deploy](https://github.com/scipopt/scipoptsuite-deploy) (skipped if a matching release already exists) |
| 8 | +3. Create a branch, update `pyproject.toml`, and open a PR |
| 9 | + |
| 10 | +On the PR: |
| 11 | +- [ ] Fix any API incompatibilities |
| 12 | +- [ ] Get CI green |
| 13 | +- [ ] Update the [compatibility table](https://pyscipopt.readthedocs.io/en/latest/build.html#building-from-source) if needed |
| 14 | +- [ ] Merge into `master` |
| 15 | + |
| 16 | +## Releasing PySCIPOpt |
| 17 | + |
| 18 | +Releases run in two phases from `master`, driven by `./release.sh`. The tag and master push only happen in phase 2, so an aborted release leaves no semantic public trace — just a deletable `release-candidate-vX.Y.Z` branch. |
| 19 | + |
| 20 | +Use `--dry-run` with any command to preview without side effects. |
| 21 | + |
| 22 | +### Phase 1 — start |
| 23 | + |
9 | 24 | ```bash |
10 | | -pip install -i https://test.pypi.org/simple/ PySCIPOpt |
| 25 | +./release.sh |
11 | 26 | ``` |
12 | | -- [ ] If it works, release on pypi.org with running the same workflow but with `test-pypi:false`. |
13 | | -- [ ] Then create a tag with the new version (from the master branch) |
| 27 | + |
| 28 | +Prompts for the version bump (patch/minor/major), updates `_version.py`, `setup.py`, and `CHANGELOG.md`, commits **locally**, pushes the commit to `release-candidate-vX.Y.Z` on origin, and triggers the build-wheels workflow on that branch (uploads to test-pypi). **Master is not pushed, no tag is created.** The script exits as soon as the workflow is dispatched. |
| 29 | + |
| 30 | +To skip the bump prompt (e.g., when test-pypi has already burnt the default next version and you need to jump ahead): |
| 31 | + |
14 | 32 | ```bash |
15 | | -git tag vX.X.X |
16 | | -git push origin vX.X.X |
| 33 | +./release.sh --version=X.Y.Z |
17 | 34 | ``` |
18 | | -- [ ] Then make a github [release](https://github.com/scipopt/PySCIPOpt/releases/new) from this new tag. |
19 | | -- [ ] Update the documentation: from readthedocs.io -> Builds -> Build version (latest and stable) |
| 35 | + |
| 36 | +### Manual verification |
| 37 | + |
| 38 | +Once the release-candidate workflow finishes, install from test-pypi and smoke-test: |
| 39 | + |
| 40 | +```bash |
| 41 | +pip install -i https://test.pypi.org/simple/ PySCIPOpt==X.Y.Z |
| 42 | +``` |
| 43 | + |
| 44 | +### Phase 2 — finalize or roll back |
| 45 | + |
| 46 | +If the smoke test **passes**: |
| 47 | + |
| 48 | +```bash |
| 49 | +./release.sh --finalize |
| 50 | +``` |
| 51 | + |
| 52 | +Checks the release-candidate workflow succeeded, then tags `vX.Y.Z`, pushes master, and deletes the release-candidate branch. |
| 53 | + |
| 54 | +If the smoke test **fails** (or you change your mind): |
| 55 | + |
| 56 | +```bash |
| 57 | +./release.sh --rollback |
| 58 | +``` |
| 59 | + |
| 60 | +Deletes the release-candidate branch and resets the local release commit. test-pypi has already burnt the uploaded version string, so the next attempt must use `--version=` to pick a different one. |
| 61 | + |
| 62 | +### After finalize |
| 63 | + |
| 64 | +- [ ] Release to production pypi: |
| 65 | + ```bash |
| 66 | + gh workflow run build_wheels.yml --repo scipopt/PySCIPOpt --ref vX.Y.Z -f upload_to_pypi=true -f test_pypi=false |
| 67 | + ``` |
| 68 | +- [ ] Create a GitHub release: |
| 69 | + ```bash |
| 70 | + gh release create vX.Y.Z --repo scipopt/PySCIPOpt --title vX.Y.Z --generate-notes |
| 71 | + ``` |
| 72 | +- [ ] Update readthedocs: Builds -> Build version (latest and stable) |
0 commit comments