-
Notifications
You must be signed in to change notification settings - Fork 24
63 lines (54 loc) · 2.82 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Wheel building
on:
schedule:
# run every day at 4am UTC
- cron: '0 4 * * *'
workflow_dispatch:
push:
pull_request:
permissions:
contents: read
jobs:
build_and_publish:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish.yml@v1
if: (github.repository == 'liberfa/pyerfa')
with:
upload_to_pypi: ${{ startsWith(github.ref, 'refs/tags/v') && !endsWith(github.ref, '.dev') && github.event_name == 'push' }}
upload_to_anaconda: ${{ (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') }}
anaconda_user: liberfa
anaconda_package: pyerfa
anaconda_keep_n_latest: 10
# For nightly wheels as well as when building with the 'Build all wheels' label, we disable
# the build isolation and explicitly install the latest developer version of numpy as well as
# the latest stable versions of all other build-time dependencies.
#
# pre-release pythons are included for testing but no wheels will be produced
# specifically for these targets since this package uses Py_Limited_API
# Do not hesitate to turn this setting off if testing fail for external reasons
# (e.g. numpy isn't currently compatible with the latest python pre-release)
env: |
CIBW_BEFORE_BUILD: '${{ ((github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request') && 'pip install setuptools setuptools_scm jinja2 numpy') || '' }}'
CIBW_BUILD_FRONTEND: '${{ ((github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request') && 'pip; args: --no-build-isolation') || 'build' }}'
CIBW_PRERELEASE_PYTHONS: '${{ ((github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request')) }}'
CIBW_ENVIRONMENT: '${{ ((github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request') && 'PIP_PRE=1 PIP_EXTRA_INDEX_URL=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple') || '' }}'
test_extras: test
test_command: pytest --pyargs erfa
targets: |
# Linux wheels
- cp3*-manylinux_x86_64
- cp3*-musllinux_x86_64
- cp3*-manylinux_aarch64
- pp39-manylinux_x86_64
# MacOS X wheels - we deliberately do not build universal2 wheels.
# Note that the arm64 wheels are not actually tested so we
# rely on local manual testing of these to make sure they are ok.
- cp3*macosx_x86_64
- cp3*macosx_arm64
- pp39-macosx_x86_64
# Windows wheels
- cp3*win32
- cp3*win_amd64
- pp39-win_amd64
secrets:
pypi_token: ${{ secrets.pypi_token }}
anaconda_token: ${{ secrets.anaconda_token }}