Restoring required imports #4
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: Build | |
on: | |
push: | |
# Manual run | |
workflow_dispatch: | |
jobs: | |
#This build makes delphifmx available for Android | |
build_universal_wheel: | |
name: Build universal wheel | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
python: ['3.9'] | |
include: | |
- os: ubuntu-20.04 | |
arch: "x86_64" | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python ${{ matrix.python }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Build sdist | |
run: | | |
python -m pip install setuptools --upgrade | |
python -m pip install wheel --upgrade | |
python setup.py bdist_wheel --universal | |
- name: Save sdist | |
uses: actions/upload-artifact@v2 | |
with: | |
path: dist/*.whl | |
if-no-files-found: error | |
build_wheels_win_32: | |
name: Build Windows x86 wheels for Python ${{ matrix.python }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
python: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11'] | |
include: | |
- os: [windows-latest] | |
arch: ["x86"] | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python ${{ matrix.python }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python }} | |
architecture: "x86" | |
- name: Build bdist wheel | |
run: | | |
python -m pip install setuptools --upgrade | |
python -m pip install wheel --upgrade | |
python setup.py bdist_wheel --plat-name=win32 | |
- name: Save wheel | |
uses: actions/upload-artifact@v2 | |
with: | |
path: dist/*.whl | |
if-no-files-found: error | |
build_wheels_win_64: | |
name: Build Windows x64 wheels for Python ${{ matrix.python }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
python: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11'] | |
include: | |
- os: [windows-latest] | |
arch: ["AMD64"] | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python ${{ matrix.python }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python }} | |
architecture: "x64" | |
- name: Build bdist wheel | |
run: | | |
python -m pip install setuptools --upgrade | |
python -m pip install wheel --upgrade | |
python setup.py bdist_wheel --plat-name=win_amd64 | |
- name: Save wheel | |
uses: actions/upload-artifact@v2 | |
with: | |
path: dist/*.whl | |
if-no-files-found: error | |
build_wheels_manylinux: | |
name: Build ManyLinux x86_64 wheels for Python ${{ matrix.python }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
python: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11'] | |
include: | |
- os: [ubuntu-20.04] #ubuntu-latest doesn't support cp36 | |
arch: ["x86_64"] | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python ${{ matrix.python }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Build bdist wheel | |
run: | | |
python -m pip install setuptools --upgrade | |
python -m pip install wheel --upgrade | |
python setup.py bdist_wheel --plat-name=manylinux1_x86_64 | |
- name: Save wheel | |
uses: actions/upload-artifact@v2 | |
with: | |
path: dist/*.whl | |
if-no-files-found: error | |
build_wheels_macos: | |
name: Build x86_64 macOS wheels for Python ${{ matrix.python }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
python: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11'] | |
include: | |
- os: [macos-latest] | |
arch: ["x86_64"] | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python ${{ matrix.python }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Build bdist wheel | |
run: | | |
python -m pip install setuptools --upgrade | |
python -m pip install wheel --upgrade | |
python setup.py bdist_wheel --plat-name=macosx_10_9_x86_64 | |
- name: Save wheel | |
uses: actions/upload-artifact@v2 | |
with: | |
path: dist/*.whl | |
if-no-files-found: error | |
build_wheels_macos_arm: | |
name: Build arm64 macOS wheels for Python ${{ matrix.python }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
python: ['3.8', '3.9', '3.10', '3.11'] | |
include: | |
- os: [macos-latest] | |
arch: ["arm64"] | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python ${{ matrix.python }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Build bdist wheel | |
run: | | |
python -m pip install setuptools --upgrade | |
python -m pip install wheel --upgrade | |
python setup.py bdist_wheel --plat-name=macosx_11_0_arm64 | |
- name: Save wheel | |
uses: actions/upload-artifact@v2 | |
with: | |
path: dist/*.whl | |
if-no-files-found: error | |
upload_pypi_test: | |
name: Upload to PyPI test | |
needs: [build_universal_wheel, build_wheels_win_32, build_wheels_win_64, build_wheels_manylinux, build_wheels_macos, build_wheels_macos_arm] | |
runs-on: ubuntu-latest | |
environment: | |
name: pypi | |
url: https://test.pypi.org/project/delphifmx | |
permissions: | |
id-token: write | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- uses: actions/download-artifact@v2 | |
with: | |
name: artifact | |
path: dist | |
- name: Publish package to TestPyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
repository_url: https://test.pypi.org/legacy/ | |
upload_pypi: | |
name: Upload to PyPI | |
needs: [build_universal_wheel, build_wheels_win_32, build_wheels_win_64, build_wheels_manylinux, build_wheels_macos, build_wheels_macos_arm] | |
runs-on: ubuntu-latest | |
environment: | |
name: pypi | |
url: https://pypi.org/project/delphifmx | |
permissions: | |
id-token: write | |
if: startsWith(github.ref, 'refs/tags/v') | |
steps: | |
- uses: actions/download-artifact@v2 | |
with: | |
name: artifact | |
path: dist | |
- name: Publish package to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 |