|
1 | 1 | # Releasing
|
2 | 2 |
|
3 |
| -To release, first make sure that all CI tests are passing on `main`. |
| 3 | +- [ ] **Create a PR with a release branch** |
4 | 4 |
|
5 |
| -Note that CuPy must be tested manually (it isn't tested on CI). Use the script |
| 5 | + This makes it easy to verify that CI is passing, and also gives you a place |
| 6 | + to push up updates to the changelog and any last minute fixes for the |
| 7 | + release. |
6 | 8 |
|
7 |
| -``` |
8 |
| -./test_cupy.sh |
9 |
| -``` |
| 9 | +- [ ] **Double check the release branch is fully merged with `main`.** |
10 | 10 |
|
11 |
| -on a machine with a CUDA GPU. |
| 11 | + (e.g., if the release branch is called `release`) |
12 | 12 |
|
13 |
| -Once you are ready to release, create a PR with a release branch, so that you |
14 |
| -can verify that CI is passing. You must edit |
| 13 | + ``` |
| 14 | + git checkout main |
| 15 | + git pull |
| 16 | + git checkout release |
| 17 | + git merge main |
| 18 | + ``` |
15 | 19 |
|
16 |
| -``` |
17 |
| -array_api_compat/__init__.py |
18 |
| -``` |
| 20 | +- [ ] **Make sure that all CI tests are passing.** |
19 | 21 |
|
20 |
| -and update the version (the version is not computed from the tag because that |
21 |
| -would break vendorability). You should also edit |
| 22 | + Note that the GitHub action that publishes to PyPI does not check if CI is |
| 23 | + passing before publishing. So you need to check this manually. |
22 | 24 |
|
23 |
| -``` |
24 |
| -docs/changelog.md |
25 |
| -``` |
| 25 | + This does mean you can ignore CI failures, but ideally you should fix any |
| 26 | + failures or update the `*-xfails.txt` files before tagging, so that CI and |
| 27 | + the CuPy tests fully pass. Otherwise it will be hard to tell what things are |
| 28 | + breaking in the future. It's also a good idea to remove any xpasses from |
| 29 | + those files (but be aware that some xfails are from flaky failures, so |
| 30 | + unless you know the underlying issue has been fixed, an xpass test is |
| 31 | + probably still xfail). |
26 | 32 |
|
27 |
| -with the changes for the release. |
| 33 | +- [ ] **Test CuPy.** |
28 | 34 |
|
29 |
| -Once everything is ready, create a tag |
| 35 | + CuPy must be tested manually (it isn't tested on CI, see |
| 36 | + https://github.com/data-apis/array-api-compat/issues/197). Use the script |
30 | 37 |
|
31 |
| -``` |
32 |
| -git tag -a <version> |
33 |
| -``` |
| 38 | + ``` |
| 39 | + ./test_cupy.sh |
| 40 | + ``` |
34 | 41 |
|
35 |
| -(note the tag names are not prefixed, for instance, the tag for version 1.5 is |
36 |
| -just `1.5`) |
| 42 | + on a machine with a CUDA GPU. |
37 | 43 |
|
38 |
| -and push it to GitHub |
39 | 44 |
|
40 |
| -``` |
41 |
| -git push origin <version> |
42 |
| -``` |
| 45 | +- [ ] **Update the version.** |
43 | 46 |
|
44 |
| -Check that the `publish distributions` action on the tag build works. Note |
45 |
| -that this action will run even if the other CI fails, so you must make sure |
46 |
| -that CI is passing *before* tagging. |
| 47 | + You must edit |
47 | 48 |
|
48 |
| -This does mean you can ignore CI failures, but ideally you should fix any |
49 |
| -failures or update the `*-xfails.txt` files before tagging, so that CI and the |
50 |
| -cupy tests pass. Otherwise it will be hard to tell what things are breaking in |
51 |
| -the future. It's also a good idea to remove any xpasses from those files (but |
52 |
| -be aware that some xfails are from flaky failures, so unless you know the |
53 |
| -underlying issue has been fixed, an xpass test is probably still xfail). |
| 49 | + ``` |
| 50 | + array_api_compat/__init__.py |
| 51 | + ``` |
54 | 52 |
|
55 |
| -If the publish action fails for some reason and didn't upload the release to |
56 |
| -PyPI, you will need to delete the tag and try again. |
| 53 | + and update the version (the version is not computed from the tag because |
| 54 | + that would break vendorability). |
57 | 55 |
|
58 |
| -After the PyPI package is published, the conda-forge bot should update the |
59 |
| -feedstock automatically. |
| 56 | +- [ ] **Update the [changelog](../changelog.md).** |
| 57 | + |
| 58 | + Edit |
| 59 | + |
| 60 | + ``` |
| 61 | + docs/changelog.md |
| 62 | + ``` |
| 63 | + |
| 64 | + with the changes for the release. |
| 65 | + |
| 66 | +- [ ] **Create the release tag.** |
| 67 | + |
| 68 | + Once everything is ready, create a tag |
| 69 | + |
| 70 | + ``` |
| 71 | + git tag -a <version> |
| 72 | + ``` |
| 73 | + |
| 74 | + (note the tag names are not prefixed, for instance, the tag for version 1.5 is |
| 75 | + just `1.5`) |
| 76 | + |
| 77 | +- [ ] **Push the tag to GitHub.** |
| 78 | + |
| 79 | + *This is the final step. Doing this will build and publish the release!* |
| 80 | + |
| 81 | + ``` |
| 82 | + git push origin <version> |
| 83 | + ``` |
| 84 | + |
| 85 | + This will trigger the [`publish |
| 86 | + distributions`](https://github.com/data-apis/array-api-compat/actions/workflows/publish-package.yml) |
| 87 | + GitHub Action that will build the release and push it to PyPI. |
| 88 | + |
| 89 | +- [ ] **Check that the [`publish |
| 90 | + distributions`](https://github.com/data-apis/array-api-compat/actions/workflows/publish-package.yml) |
| 91 | + action build on the tag worked.** Note that this action will run even if the |
| 92 | + other CI fails, so you must make sure that CI is passing *before* tagging. |
| 93 | + |
| 94 | + If it failed for some reason, you may need to delete the tag and try again. |
| 95 | + |
| 96 | +- [ ] **Merge the release branch.** |
| 97 | + |
| 98 | + This way any changes you made in the branch, such as updates to the |
| 99 | + changelog or xfails files, are updated in `main`. This will also make the |
| 100 | + docs update (the docs are published automatically from the sources on |
| 101 | + `main`). |
| 102 | + |
| 103 | +- [ ] **Update conda-forge.** |
| 104 | + |
| 105 | + After the PyPI package is published, the conda-forge bot should update the |
| 106 | + feedstock automatically after some time. The bot should automerge, so in |
| 107 | + most cases you don't need to do anything here, unless some metadata on the |
| 108 | + feedstock needs to be updated. |
0 commit comments