v1.8.2 #13
Workflow file for this run
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 and publish pyfactxx | |
on: | |
release: | |
types: [created] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: ["ubuntu-20.04", "windows-latest"] | |
python-version: ["3.7", "3.8", "3.9", "3.10"] | |
defaults: | |
run: | |
working-directory: ./FaCT++.Python | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ilammy/msvc-dev-cmd@v1 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install setuptools wheel auditwheel scikit-build cmake cython | |
- name: Build a wheel | |
run: | | |
python setup.py bdist_wheel | |
- name: Audit a wheel | |
if: runner.os == 'Linux' | |
run: | | |
auditwheel repair --plat manylinux_2_27_x86_64 dist/* | |
rm -rf dist/* | |
mv wheelhouse/* dist | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ runner.os }}-${{ matrix.python-version }} | |
path: FaCT++.Python/dist/pyfactxx* | |
publish: | |
runs-on: ubuntu-latest | |
needs: build | |
defaults: | |
run: | |
working-directory: ./FaCT++.Python | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install setuptools wheel auditwheel scikit-build cmake cython | |
- name: Build a source distribution | |
run: | | |
python setup.py sdist | |
- name: Download artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
path: FaCT++.Python/wheels/ | |
- name: Move wheels | |
run: | | |
mv wheels/*/*.whl dist/ | |
- name: Publish packages | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} | |
packages_dir: FaCT++.Python/dist |