Skip to content

Commit

Permalink
restore wheels build, update release instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
HDembinski committed Jul 16, 2022
1 parent b3cbeff commit 1effbf5
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 71 deletions.
6 changes: 5 additions & 1 deletion .ci/release_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from pathlib import PurePath
import urllib.request
import json
import warnings

project_dir = PurePath(__file__).parent.parent
version_fn = project_dir / "src/iminuit/version.py"
Expand All @@ -12,7 +13,10 @@
with open(version_fn) as f:
version = {}
exec(f.read(), version)
iminuit_version = parse_version(version["version"])
with warnings.catch_warnings(record=True) as record:
iminuit_version = parse_version(version["version"])
if record:
raise ValueError(record[0].message)
root_version = version["root_version"]

print("iminuit version:", iminuit_version)
Expand Down
91 changes: 45 additions & 46 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,50 +26,50 @@ jobs:
- id: tag
run: echo "::set-output name=out::$(python .ci/get_tag.py)"

# wheels:
# needs: release_check
# name: ${{ matrix.py }} ${{ matrix.os }} ${{ matrix.arch }}
# runs-on: ${{ matrix.os }}
# strategy:
# fail-fast: false
# matrix:
# os: [ubuntu-latest, windows-latest, macos-latest]
# arch: [auto, aarch64]
# py: [cp36, cp37, cp38, cp39, cp310]
# include:
# - os: macos-latest
# py: cp38
# arch: universal2
# - os: macos-latest
# py: cp39
# arch: universal2
# - os: macos-latest
# py: cp310
# arch: universal2
# exclude:
# - os: windows-latest
# arch: aarch64
# - os: macos-latest
# arch: aarch64
# env:
# CIBW_BUILD: ${{ matrix.py }}-*
# CIBW_ARCHS_LINUX: ${{ matrix.arch }}
# steps:
# - uses: actions/checkout@v2
# with:
# submodules: true

# - if: ${{ matrix.arch == 'aarch64' }}
# uses: docker/setup-qemu-action@v1

# - uses: pypa/[email protected]
# env:
# CIBW_BUILD: ${{ matrix.py }}-*
# CIBW_ARCHS: ${{ matrix.arch }}

# - uses: actions/upload-artifact@v2
# with:
# path: ./wheelhouse/*.whl
wheels:
needs: release_check
name: ${{ matrix.py }} ${{ matrix.os }} ${{ matrix.arch }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
arch: [auto, aarch64]
py: [cp36, cp37, cp38, cp39, cp310]
include:
- os: macos-latest
py: cp38
arch: universal2
- os: macos-latest
py: cp39
arch: universal2
- os: macos-latest
py: cp310
arch: universal2
exclude:
- os: windows-latest
arch: aarch64
- os: macos-latest
arch: aarch64
env:
CIBW_BUILD: ${{ matrix.py }}-*
CIBW_ARCHS_LINUX: ${{ matrix.arch }}
steps:
- uses: actions/checkout@v2
with:
submodules: true

- if: ${{ matrix.arch == 'aarch64' }}
uses: docker/setup-qemu-action@v1

- uses: pypa/[email protected]
env:
CIBW_BUILD: ${{ matrix.py }}-*
CIBW_ARCHS: ${{ matrix.arch }}

- uses: actions/upload-artifact@v2
with:
path: ./wheelhouse/*.whl

sdist:
needs: release_check
Expand Down Expand Up @@ -97,8 +97,7 @@ jobs:
path: dist/*.tar.gz

upload:
# needs: [wheels, sdist]
needs: [sdist]
needs: [wheels, sdist]
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/master' }}
steps:
Expand Down
23 changes: 0 additions & 23 deletions doc/README.md

This file was deleted.

17 changes: 17 additions & 0 deletions doc/release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
How to make a release
=====================

- Sync local `master` and `develop` with Github
- `for x in master develop; git checkout $x; git pull`
- On `develop` branch
- Update `src/iminuit/version.py` to the release version
- For a beta release, add `.betaN`, where N is a number >= 0
- For a release candidate, add `.rcN`
- Run `python3 doc/update_changelog.py` or update `doc/changelog.rst` manually
- Check the output if you used the script
- Merge `develop` into `master`
- Every push to `master` triggers building wheels, uploading to PyPI, and tagging/publishing on GitHub
- If there are problems with the wheels, commit fixes to `develop`, then merge again into `master`
- Note: Upload to PyPI uses API tokens configured in PyPI and Github "Secrets"

- conda-forge should pick up our release automatically and generate conda packages
2 changes: 1 addition & 1 deletion src/iminuit/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# - Increase MAINTENANCE when fixing bugs without adding features
# - During development, add suffix .devN with N >= 0
# - For release candidates, add suffix .rcN with N >= 0
version = "2.12.3.beta1"
version = "2.12.3.beta2"

# We list the corresponding ROOT version of the C++ Minuit2 library here
root_version = "v6-25-02-1013-ga4bb8f3342"

0 comments on commit 1effbf5

Please sign in to comment.