Skip to content

Merge pull request #9 from scarrazza/fix-arm64-installation #79

Merge pull request #9 from scarrazza/fix-arm64-installation

Merge pull request #9 from scarrazza/fix-arm64-installation #79

Workflow file for this run

name: "Build wheels and deploy"
on:
push:
release:
types:
- published
jobs:
build_sdist:
name: Build sdist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build SDist
run: pipx run build --sdist
- name: Check metadata
run: pipx run twine check dist/*
- uses: actions/upload-artifact@v4
with:
name: sdist
path: dist/*.tar.gz
build_wheels:
name: Wheels on ${{ matrix.platform }}
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-14]
steps:
- uses: actions/checkout@v4
- name: Install GNU Fortran
uses: fortran-lang/setup-fortran@v1
with:
version: 13
- uses: pypa/cibuildwheel@v2.16
env:
CIBW_ARCHS_MACOS: auto x86_64 arm64
CIBW_SKIP: pp* cp36-* *-musllinux_x86_64 *_i686
- name: Verify clean directory
run: git diff --exit-code
shell: bash
- uses: actions/upload-artifact@v4
with:
name: ${{matrix.platform}}
path: wheelhouse/*.whl
test:
name: Test wheels
runs-on: ${{ matrix.platform }}
needs: build_wheels
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-14]
python-version: ["3.10"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: actions/download-artifact@v4
with:
name: ${{matrix.platform}}
path: wheels/
- name: Install built wheel
run: |
pip install --no-index --find-links=wheels/ fiatlux
- name: Test
run: |
pip install pytest
pytest tests
upload_all:
name: Upload if release
needs: [build_wheels, build_sdist, test]
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_TOKEN }}