Merge pull request #15514 from eerovaher/clean-units #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Wheel building | |
on: | |
schedule: | |
# run every day at 4am UTC | |
- cron: '0 4 * * *' | |
workflow_dispatch: | |
push: | |
pull_request: | |
permissions: | |
contents: read | |
jobs: | |
test_wheel_building: | |
# This ensures that a couple of targets work fine in pull requests and pushes | |
permissions: | |
contents: none | |
uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish.yml@v1 | |
if: (github.event_name == 'push' || github.event_name == 'pull_request') | |
with: | |
upload_to_pypi: false | |
upload_to_anaconda: false | |
test_extras: test | |
test_command: pytest -p no:warnings --astropy-header -m "not hypothesis" -k "not test_data_out_of_range and not test_set_locale and not TestQuantityTyping" --pyargs astropy | |
targets: | | |
- cp39-manylinux_x86_64 | |
build_and_publish: | |
# This does the actual wheel building and publishing as part of the cron job | |
# or if triggered manually via the workflow dispatch, or for a tag. | |
permissions: | |
contents: none | |
uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish.yml@v1 | |
if: (github.repository == 'astropy/astropy' && ( startsWith(github.ref, 'refs/tags/v') || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'Build all wheels'))) | |
with: | |
# We upload to PyPI for all tags starting with v but not ones ending in .dev | |
upload_to_pypi: ${{ startsWith(github.ref, 'refs/tags/v') && !endsWith(github.ref, '.dev') && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') }} | |
upload_to_anaconda: ${{ (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') }} | |
anaconda_user: astropy | |
anaconda_package: astropy | |
anaconda_keep_n_latest: 10 | |
test_extras: test | |
# FIXME: we exclude the test_data_out_of_range test since it | |
# currently fails, see https://github.com/astropy/astropy/issues/10409 | |
# We also exclude test_set_locale as it sometimes relies on the correct locale | |
# packages being installed, which it isn't always. | |
test_command: pytest -p no:warnings --astropy-header -m "not hypothesis" -k "not test_data_out_of_range and not test_set_locale and not TestQuantityTyping" --pyargs astropy | |
targets: | | |
# Linux wheels | |
- cp39-manylinux_x86_64 | |
- cp310-manylinux_x86_64 | |
- cp311-manylinux_x86_64 | |
- cp312-manylinux_x86_64 | |
# Note that following wheels are not currently tested: | |
- cp39-manylinux_aarch64 | |
- cp310-manylinux_aarch64 | |
- cp311-manylinux_aarch64 | |
- cp312-manylinux_aarch64 | |
- cp39-musllinux_x86_64 | |
- cp310-musllinux_x86_64 | |
- cp311-musllinux_x86_64 | |
- cp312-musllinux_x86_64 | |
# MacOS X wheels - as noted in https://github.com/astropy/astropy/pull/12379 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. | |
- cp39*macosx_x86_64 | |
- cp310*macosx_x86_64 | |
- cp311*macosx_x86_64 | |
- cp312*macosx_x86_64 | |
- cp39*macosx_arm64 | |
- cp310*macosx_arm64 | |
- cp311*macosx_arm64 | |
- cp312*macosx_arm64 | |
# Windows wheels | |
- cp39*win32 | |
- cp310*win32 | |
- cp311*win32 | |
- cp312*win32 | |
- cp39*win_amd64 | |
- cp310*win_amd64 | |
- cp311*win_amd64 | |
- cp312*win_amd64 | |
secrets: | |
pypi_token: ${{ secrets.pypi_token }} | |
anaconda_token: ${{ secrets.anaconda_token }} |