added workflow #16
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: Publish Python distribution to TestPyPI | |
on: | |
push: | |
branches: | |
- 'main' | |
- 'feature/wheel_with_setup.py_2' | |
jobs: | |
build: | |
name: Build distribution | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
pyver: ["3.10"] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: 'feature/wheel_with_setup.py_2' | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.pyver }} | |
- name: create venv | |
run: python3 -m venv venv && source venv/bin/activate | |
- name: Build command 1 | |
run: cmake . -DCMAKE_BUILD_TYPE=Release | |
- name: Build command 2 | |
run: cmake --build . -j | |
# Build by poetry | |
- name: Install pip and setuptools wheel | |
run: python3 -m pip install wheel | |
- name: Install poetry | |
run: python3 -m pip install poetry | |
- name: Build a binary wheel and a source tarball with poetry | |
run: python3 -m pip install wheel && python3 -m pip install wheel && python3 -m poetry run python3 setup.py bdist_wheel | |
- name: Store the distribution packages | |
uses: actions/upload-artifact@v3 | |
with: | |
name: python-package-distributions | |
path: dist/ |