PuT: More consistent data types #981
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 upload MacOS Python Package | |
on: [pull_request, release] | |
jobs: | |
deploy: | |
runs-on: macos-latest | |
env: | |
# Note that compiler options for macos-latest are documented here: | |
# https://github.com/actions/runner-images/blob/main/images/macos/macos-12-Readme.md | |
HAS_SECRETS: ${{ secrets.AWS_SECRET_ACCESS_KEY != '' }} | |
CC: "gcc-12" | |
CXX: "g++-12" | |
continue-on-error: true | |
strategy: | |
matrix: | |
python-version: [ '3.7', '3.8', '3.9', '3.10', '3.11'] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set Python environment | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: x64 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip setuptools wheel twine | |
pip install -r requirements.txt | |
pip install -r requirements_additional.txt | |
- name: Build | |
run: | | |
python setup.py sdist bdist_wheel | |
- name: Stores artifacts along with the workflow result | |
if: ${{ github.event_name == 'push'}} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: library | |
path: dist/*.whl | |
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` | |
- name: Publish | |
if: ${{ (github.event_name == 'release') && (env.HAS_SECRETS == 'true') }} | |
env: | |
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | |
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |
run: | | |
twine upload dist/*.whl | |
- name: Publish tar files | |
if: ${{ (github.event_name == 'release') && (env.HAS_SECRETS == 'true') && (matrix.python-version == '3.9') }} | |
env: | |
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | |
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |
run: twine upload dist/*.gz |