-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Allow run on push for v0.6.5 * Fixes to build process - Install brew on MacOS - Use strings for Python versions (avoid cutting off 0 in 3.10) - Use setup-miniconda instead of setup-python action (3.6 no longer available in setup-python) * Use login mode in shells This is to allow automatic login of the miniconda environment, see the setup-miniconda action documentation * Update manylinux action * Run only on Ubuntu * Downgrade manylinux action * Try Git ownership fix * Try cibuildwheel * Only upload on release * Remove run on push and specific version checkout * Update checkout to v3 * Fix release testing * Run release tests in specific branch rather than release If there are errors in the test files on a specific tag, this means that we can never get these tests to pass for that release. Instead run the tests present in whatever is checked out, but against a specific release version of Euphonic. * Install llvm on Mac
- Loading branch information
1 parent
1dafb5e
commit e9a4d7a
Showing
5 changed files
with
33 additions
and
27 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,14 +3,14 @@ name: Build and upload PyPI wheels and source dist | |
on: | ||
release: | ||
types: [published] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
os: [windows-latest, macos-latest, ubuntu-latest] | ||
architecture: [x64] | ||
python-version: [3.6, 3.7, 3.8, 3.9, 3.10] | ||
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10'] | ||
include: | ||
- os: windows-latest | ||
wheelname: win | ||
|
@@ -20,78 +20,83 @@ jobs: | |
wheelname: manylinux | ||
# Build wheels against the lowest compatible Numpy version | ||
- python-version: 3.6 | ||
manylinux-version-tag: cp36-cp36m | ||
manylinux-version-tag: cp36 | ||
numpy-version: 1.12.1 | ||
- python-version: 3.7 | ||
manylinux-version-tag: cp37-cp37m | ||
manylinux-version-tag: cp37 | ||
numpy-version: 1.14.6 | ||
- python-version: 3.8 | ||
manylinux-version-tag: cp38-cp38 | ||
manylinux-version-tag: cp38 | ||
numpy-version: 1.17.3 | ||
- python-version: 3.9 | ||
manylinux-version-tag: cp39-cp39 | ||
manylinux-version-tag: cp39 | ||
numpy-version: 1.19.3 | ||
- python-version: 3.10 | ||
manylinux-version-tag: cp310-cp310 | ||
manylinux-version-tag: cp310 | ||
numpy-version: 1.21.3 | ||
fail-fast: false | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 # Ensure tags are fetched for versioning | ||
- name: Setup Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
- name: Setup Python ${{ matrix.python-version }} with Conda | ||
uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
architecture: ${{ matrix.architecture }} | ||
python-version: ${{ matrix.python-version }} | ||
- name: Update Python pip, wheel, and twine | ||
shell: bash -l {0} | ||
run: | | ||
python -m pip install --upgrade pip wheel twine | ||
shell: bash | ||
- name: Install llvm on Macos | ||
if: startsWith(matrix.os, 'macos') | ||
run: brew install llvm | ||
|
||
- name: Build Python wheel | ||
if: matrix.os != 'ubuntu-latest' | ||
shell: bash -l {0} | ||
env: | ||
NUMPY_VERSION: ${{ matrix.numpy-version }} | ||
run: | | ||
# Build against lowest required Numpy version | ||
python -m pip install numpy==${NUMPY_VERSION} | ||
python -m pip wheel . -w wheelhouse --no-deps | ||
shell: bash | ||
- name: Build manylinux Python wheel | ||
if: matrix.os == 'ubuntu-latest' | ||
uses: RalfG/[email protected]_x86_64 | ||
uses: pypa/[email protected] | ||
env: | ||
CIBW_BUILD: ${{ matrix.manylinux-version-tag}}-manylinux* | ||
CIBW_BEFORE_BUILD: python -mpip install numpy==${{ matrix.numpy-version }} | ||
CIBW_ARCHS: x86_64 | ||
with: | ||
python-versions: ${{ matrix.manylinux-version-tag }} | ||
build-requirements: numpy==${{ matrix.numpy-version }} | ||
pip-wheel-args: '--no-deps -w wheelhouse' | ||
output-dir: wheelhouse | ||
|
||
- name: Create source distribution | ||
if: matrix.os == 'windows-latest' && matrix.python-version == '3.10' | ||
shell: bash -l {0} | ||
run: | | ||
python setup.py sdist | ||
shell: bash | ||
- name: Upload as build artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: wheels | ||
path: wheelhouse/*-${{ matrix.wheelname }}*.whl | ||
- name: Upload source dist to PyPI | ||
if: matrix.os == 'windows-latest' && matrix.python-version == '3.10' | ||
if: github.event_name == 'release' && matrix.os == 'windows-latest' && matrix.python-version == '3.10' | ||
shell: bash -l {0} | ||
env: | ||
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | ||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
run: | | ||
python -m twine upload dist/*.tar.gz | ||
shell: bash | ||
- name: Upload wheel to PyPI | ||
if: github.event_name == 'release' | ||
shell: bash -l {0} | ||
env: | ||
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | ||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
WHEEL_NAME: ${{ matrix.wheelname }} | ||
run: | | ||
python -m twine upload wheelhouse/*-${WHEEL_NAME}*.whl | ||
shell: bash |
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