Merge pull request #205 from mtreinish/prepare-2.6.2 #69
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: Release Artifacts | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
build_wheels: | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-20.04, windows-2019, macos-10.15] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
name: Install Python | |
with: | |
python-version: '3.9' | |
- name: Build wheels | |
uses: pypa/[email protected] | |
env: | |
CIBW_SKIP: "cp36-* cp37-* pp* *musl*" | |
CIBW_TEST_SKIP: "*-macosx_arm64 *-macosx_universal2:arm64 *-win32 *-manylinux_i686 cp310-manylinux*" | |
CIBW_MANYLINUX_X86_64_IMAGE: quay.io/pypa/manylinux2014_x86_64:latest | |
CIBW_MANYLINUX_I686_IMAGE: quay.io/pypa/manylinux2014_i686:latest | |
CIBW_ARCHS_MACOS: x86_64 universal2 | |
CIBW_TEST_REQUIRES: pytest qiskit-aer | |
CIBW_TEST_COMMAND_LINUX: pytest -p no:warnings /mthree_test | |
CIBW_TEST_COMMAND_WINDOWS: pytest -p no:warnings C:\Users\RUNNER~1\AppData\Local\Temp\mthree_test | |
CIBW_TEST_COMMAND_MACOS: pytest -p no:warnings /tmp/mthree_test | |
CIBW_ENVIRONMENT_LINUX: MTHREE_OPENMP=1 | |
CIBW_BEFORE_TEST_LINUX: rm -rf /mthree_test && cp -r {project}/mthree/test /mthree_test && rm -f /mthree_test/test_converters.py && rm -f /mthree_test/test_columns.py | |
CIBW_BEFORE_TEST_WINDOWS: rm -rf C:\Users\RUNNER~1\AppData\Local\Temp\mthree_test && cp -r {project}/mthree/test C:\Users\RUNNER~1\AppData\Local\Temp\mthree_test && rm -f C:\Users\RUNNER~1\AppData\Local\Temp\mthree_test\test_converters.py && rm -f C:\Users\RUNNER~1\AppData\Local\Temp\mthree_test\test_columns.py && pip install --prefer-binary orjson | |
CIBW_BEFORE_TEST_MACOS: rm -rf /tmp/mthree_test && cp -r {project}/mthree/test /tmp/mthree_test && rm -f /tmp/mthree_test/test_converters.py && rm -f /tmp/mthree_test/test_columns.py | |
- uses: actions/upload-artifact@v2 | |
with: | |
path: ./wheelhouse/*.whl | |
- name: Install twine | |
run: | | |
python -m pip install twine | |
- name: Publish to PyPi | |
env: | |
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} | |
TWINE_USERNAME: nonhermitian | |
run: twine upload ./wheelhouse/*whl | |
sdist-build: | |
name: Build and Publish Release Artifacts | |
needs: [build_wheels] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
name: Install Python | |
with: | |
python-version: '3.9' | |
- name: Install Deps | |
run: pip install -U twine cython numpy | |
- name: Build Artifacts | |
run: | | |
python setup.py sdist | |
shell: bash | |
- uses: actions/upload-artifact@v2 | |
with: | |
path: ./dist/mthree* | |
- name: Publish to PyPi | |
env: | |
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} | |
TWINE_USERNAME: __token__ | |
run: twine upload dist/mthree* |