Skip to content

Restored linux workflow #10

Restored linux workflow

Restored linux workflow #10

Workflow file for this run

name: python
on:
push:
branches:
- main
tags:
- '*'
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
# Ubuntu does not build with fontconfig dev
linux:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.10', '3.11', '3.12' ]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Install fontconfig
run: sudo apt-get install -y fontconfig libfontconfig-dev libfontconfig1 libfontconfig1-dev
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: -i ${{ matrix.python-version }} --release --out dist --find-interpreter -m gr6j-python/Cargo.toml
sccache: 'true'
manylinux: auto
- name: Test Python API
run: |
pip install pytest pandas
python -c "import gr6j"
python -m pytest
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-linux-${{ matrix.platform.target }}
path: dist
overwrite: true
windows:
runs-on: windows-latest
strategy:
matrix:
python-version: [ '3.10', '3.11', '3.12' ]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: -i ${{ matrix.python-version }} --release --out dist --find-interpreter -m gr6j-python/Cargo.toml
sccache: 'true'
- name: Test Python API
run: |
pip install pytest pandas
python -c "import gr6j"
python -m pytest
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-windows-${{ python-version }}

Check failure on line 74 in .github/workflows/python.yml

View workflow run for this annotation

GitHub Actions / python

Invalid workflow file

The workflow is not valid. .github/workflows/python.yml (Line: 74, Col: 17): Unrecognized named-value: 'python-version'. Located at position 1 within expression: python-version
path: dist
overwrite: true
macos:
runs-on: macos-latest
strategy:
matrix:
python-version: [ '3.11', '3.12' ]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Build wheels - x86_64
uses: PyO3/maturin-action@v1
with:
target: x86_64
args: --release --out dist --find-interpreter -m gr6j-python/Cargo.toml
sccache: 'true'
- name: Test Python API
run: |
pip install pytest pandas
python -c "import gr6j"
python -m pytest
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-macos-${{ matrix.platform.target }}
path: dist
overwrite: true
sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build sdist
uses: PyO3/maturin-action@v1
with:
command: sdist
args: -m gr6j-python/Cargo.toml --out dist
- name: Upload sdist
uses: actions/upload-artifact@v4
with:
name: wheels-sdist
path: dist
release:
name: Release
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/')"
needs: [ windows, macos, sdist ]
# needs: [ linux, windows, macos, sdist ]
steps:
- uses: actions/download-artifact@v4
- name: Publish to PyPI
uses: PyO3/maturin-action@v1
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
with:
command: upload
args: --non-interactive --skip-existing wheels-*/*