-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from nstarman/test-building
Test building wheels
- Loading branch information
Showing
19 changed files
with
110 additions
and
79 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# TODO! figure out how to source from [project.optional-dependencies] | ||
coverage[toml] | ||
hypothesis | ||
numpy>=1.18 | ||
pytest>=6.1.1 | ||
pytest-astropy-header | ||
pytest-cov | ||
pytest-doctestplus | ||
typing_extensions>=4.2 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,9 @@ on: | |
- '*' | ||
pull_request: | ||
|
||
permissions: | ||
contents: read | ||
|
||
env: | ||
ARCH_ON_CI: "normal" | ||
IS_CRON: "false" | ||
|
@@ -35,6 +38,7 @@ jobs: | |
core.info(`PR opened correctly against ${allowed_basebranch}`); | ||
} | ||
tests: | ||
name: ${{ matrix.name }} | ||
runs-on: ${{ matrix.os }} | ||
|
@@ -44,13 +48,6 @@ jobs: | |
matrix: | ||
include: | ||
|
||
# Run faster by the pre-commit bot | ||
# - name: Code style checks | ||
# os: ubuntu-latest | ||
# python: 3.x | ||
# toxenv: codestyle | ||
# toxposargs: --all-files -v | ||
|
||
# NOTE: this coverage test is needed for tests and code that | ||
# run only with minimal dependencies. | ||
- name: Python 3.10 with minimal dependencies and full coverage | ||
|
@@ -110,4 +107,54 @@ jobs: | |
file: ./coverage.xml | ||
|
||
|
||
# TODO! a mypyc compiled test | ||
test_pure_wheel_building: | ||
uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@v1 | ||
if: (github.event_name == 'push' || github.event_name == 'pull_request') | ||
needs: initial_checks | ||
with: | ||
upload_to_pypi: false | ||
upload_to_anaconda: false | ||
test_extras: test | ||
test_command: ls $GITHUB_WORKSPACE; pytest $GITHUB_WORKSPACE/tests $GITHUB_WORKSPACE/docs | ||
|
||
test_wheel_building: | ||
# This ensures that a couple of targets work fine in pull requests and pushes | ||
# FIXME! use OpenAstronomy/github-actions-workflows/.github/workflows/publish.yml@v1 | ||
name: mypyc wheels (${{ matrix.name }}) | ||
if: (github.event_name == 'push' || github.event_name == 'pull_request') | ||
needs: initial_checks | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
fail-fast: true | ||
matrix: | ||
include: | ||
- os: ubuntu-latest | ||
name: linux-x86_64 | ||
- os: windows-2019 | ||
name: windows-amd64 | ||
- os: macos-11 | ||
name: macos-x86_64 | ||
macos_arch: "x86_64" | ||
- os: macos-11 | ||
name: macos-arm64 | ||
macos_arch: "arm64" | ||
- os: macos-11 | ||
name: macos-universal2 | ||
macos_arch: "universal2" | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Build wheels via cibuildwheel | ||
uses: pypa/[email protected] | ||
env: | ||
CIBW_ARCHS_MACOS: "${{ matrix.macos_arch }}" | ||
# This isn't supported in pyproject.toml which makes sense (but is annoying). | ||
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.8" | ||
|
||
- name: Upload wheels as workflow artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ matrix.name }}-mypyc-wheels | ||
path: ./wheelhouse/*.whl |
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.