Force gr6j install in worflow #12
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: 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 -m gr6j-python/Cargo.toml | |
sccache: 'true' | |
manylinux: auto | |
- name: Test Python API | |
run: | | |
pip install pytest pandas | |
pip install gr6j --no-index --find-links dist --force-reinstall --no-deps | |
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 -m gr6j-python/Cargo.toml | |
sccache: 'true' | |
- name: Test Python API | |
run: | | |
pip install pytest pandas | |
pip install gr6j --no-index --find-links dist --force-reinstall --no-deps | |
python -c "import gr6j" | |
python -m pytest | |
- name: Upload wheels | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wheels-windows-${{ matrix.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 | |
pip install gr6j --no-index --find-links dist --force-reinstall --no-deps | |
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-*/* |