Release 0.6.6 #92
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: Assets | |
on: | |
release: | |
types: | |
- created | |
push: | |
branches: | |
- "release**" | |
jobs: | |
macos-x64: | |
name: PyPI wheels for macOS/x64 | |
runs-on: macos-13 # x64 | |
strategy: | |
matrix: | |
python: | |
- "3.8" | |
- "3.9" | |
- "3.10" | |
- "3.11" | |
- "3.12" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip conan setuptools wheel | |
brew install swig | |
- name: Build wheel | |
run: python setup.py bdist_wheel | |
- name: Wheel path | |
id: wheel | |
working-directory: pybuild/dist/ | |
run: | | |
echo "WHEEL_NAME=$(ls *.whl)" >> $GITHUB_OUTPUT | |
echo "WHEEL_NAME=$(ls *.whl)" >> $GITHUB_ENV | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: pypi-macos-x64-py${{ matrix.python }} | |
path: pybuild/dist/${{ env.WHEEL_NAME }} | |
- uses: actions/upload-release-asset@v1 | |
if: ${{ github.event_name == 'release' && github.event.action == 'created' }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: pybuild/dist/${{ env.WHEEL_NAME }} | |
asset_name: ${{ env.WHEEL_NAME }} | |
asset_content_type: application/zip | |
macos-arm64: | |
name: PyPI wheels for macOS/arm64 | |
runs-on: macos-14 # arm64 | |
strategy: | |
matrix: | |
python: | |
- "3.8" | |
- "3.9" | |
- "3.10" | |
- "3.11" | |
- "3.12" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip conan setuptools wheel | |
brew install swig | |
- name: Build wheel | |
run: python setup.py bdist_wheel | |
- name: Wheel path | |
id: wheel | |
working-directory: pybuild/dist/ | |
run: | | |
echo "WHEEL_NAME=$(ls *.whl)" >> $GITHUB_OUTPUT | |
echo "WHEEL_NAME=$(ls *.whl)" >> $GITHUB_ENV | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: pypi-macos-arm64-py${{ matrix.python }} | |
path: pybuild/dist/${{ env.WHEEL_NAME }} | |
- uses: actions/upload-release-asset@v1 | |
if: ${{ github.event_name == 'release' && github.event.action == 'created' }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: pybuild/dist/${{ env.WHEEL_NAME }} | |
asset_name: ${{ env.WHEEL_NAME }} | |
asset_content_type: application/zip | |
manylinux-x64: | |
name: PyPI wheels for Manylinux (x64) | |
runs-on: ubuntu-latest | |
container: quay.io/pypa/manylinux${{ matrix.manylinux }}_x86_64:latest | |
env: | |
SWIG_VERSION: ${{ matrix.swig_version }} | |
strategy: | |
matrix: | |
manylinux: | |
- "_2_28" | |
cpython_version: | |
- "cp38-cp38" | |
- "cp39-cp39" | |
- "cp310-cp310" | |
- "cp311-cp311" | |
- "cp312-cp312" | |
include: | |
- manylinux: _2_28 | |
swig_version: 'swig-3.0.12-19.module_el8.3.0+6167+838326ab' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
dnf install -y $SWIG_VERSION | |
export PATH="/opt/python/${{ matrix.cpython_version }}/bin:$PATH" | |
python -m pip install --upgrade pip conan wheel auditwheel | |
- name: Build wheel | |
run: | | |
export PATH="/opt/python/${{ matrix.cpython_version }}/bin:$PATH" | |
conan remove -c "*/*" | |
/opt/python/${{ matrix.cpython_version }}/bin/python setup.py bdist_wheel | |
/opt/python/${{ matrix.cpython_version }}/bin/python -m auditwheel repair pybuild/dist/*.whl | |
- name: Wheel path | |
id: wheel | |
working-directory: wheelhouse | |
run: | | |
echo "WHEEL_NAME=$(ls *.whl)" >> $GITHUB_OUTPUT | |
echo "WHEEL_NAME=$(ls *.whl)" >> $GITHUB_ENV | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: pypi-linux-x64-${{ matrix.cpython_version }} | |
path: wheelhouse/${{ env.WHEEL_NAME }} | |
- uses: actions/upload-release-asset@v1 | |
if: ${{ github.event_name == 'release' && github.event.action == 'created' }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: wheelhouse/${{ env.WHEEL_NAME }} | |
asset_name: ${{ env.WHEEL_NAME }} | |
asset_content_type: application/zip | |
manylinux-arm64: | |
name: PyPI wheels for Manylinux (arm64) | |
runs-on: | |
- "self-hosted" | |
- "ARM64" | |
- "Linux" | |
container: quay.io/pypa/manylinux${{ matrix.manylinux }}_aarch64:latest | |
env: | |
JAVA_VERSION: ${{ matrix.java_version }} | |
SWIG_VERSION: ${{ matrix.swig_version }} | |
strategy: | |
matrix: | |
manylinux: | |
- "_2_28" | |
cpython_version: | |
- "cp38-cp38" | |
- "cp39-cp39" | |
- "cp310-cp310" | |
- "cp311-cp311" | |
- "cp312-cp312" | |
# We are having problems when zulu-opendjk Conan package on an armv8 architecture. | |
# zulu-openjdk provides the Java JRE required by the ANTLR generator. | |
# So, for the time being, we are installing Java manually for this platform | |
include: | |
- manylinux: _2_28 | |
java_version: 'java-11-openjdk-11.0.21.0.9-2.el8' | |
swig_version: 'swig-3.0.12-19.module_el8.4.0+2254+838326ab' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
dnf install -y $JAVA_VERSION $SWIG_VERSION | |
export PATH="/opt/python/${{ matrix.cpython_version }}/bin:$PATH" | |
python -m pip install --upgrade pip conan wheel auditwheel | |
- name: Build wheel | |
run: | | |
export PATH="/opt/python/${{ matrix.cpython_version }}/bin:$PATH" | |
conan remove -c "*/*" | |
python setup.py bdist_wheel | |
python -m auditwheel repair pybuild/dist/*.whl | |
- name: Wheel path | |
id: wheel | |
working-directory: wheelhouse | |
run: | | |
echo "WHEEL_NAME=$(ls *.whl)" >> $GITHUB_OUTPUT | |
echo "WHEEL_NAME=$(ls *.whl)" >> $GITHUB_ENV | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: pypi-linux-arm64-${{ matrix.cpython_version }} | |
path: wheelhouse/${{ env.WHEEL_NAME }} | |
- uses: actions/upload-release-asset@v1 | |
if: ${{ github.event_name == 'release' && github.event.action == 'created' }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: wheelhouse/${{ env.WHEEL_NAME }} | |
asset_name: ${{ env.WHEEL_NAME }} | |
asset_content_type: application/zip | |
windows-x64: | |
name: PyPI wheels for Windows | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
python: | |
- "3.8" | |
- "3.9" | |
- "3.10" | |
- "3.11" | |
- "3.12" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install dependencies | |
run: python -m pip install --upgrade pip conan setuptools wheel | |
- name: Build wheel | |
run: python setup.py bdist_wheel | |
- name: Wheel path | |
id: wheel | |
working-directory: pybuild/dist/ | |
run: | | |
echo "WHEEL_NAME=$(Get-ChildItem -name *.whl)" >> $env:GITHUB_OUTPUT | |
echo "WHEEL_NAME=$(Get-ChildItem -name *.whl)" >> $env:GITHUB_ENV | |
shell: powershell | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: pypi-windows-py${{ matrix.python }} | |
path: pybuild/dist/${{ env.WHEEL_NAME }} | |
- uses: actions/upload-release-asset@v1 | |
if: ${{ github.event_name == 'release' && github.event.action == 'created' }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: pybuild/dist/${{ env.WHEEL_NAME }} | |
asset_name: ${{ env.WHEEL_NAME }} | |
asset_content_type: application/zip | |
emscripten-wasm: | |
name: WASM binaries for emscripten | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
build_type: | |
- Release | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 16.20.2 | |
- name: Install conan | |
run: | | |
pipx install conan | |
shell: bash | |
- name: Get latest CMake | |
uses: lukka/get-cmake@latest | |
# We clean the Conan cache as a preventive measure for our runs in self-hosted runners | |
# Self-hosted runners use containers that cache Conan packages from previous runs, | |
# and that can cause different type of problems | |
- name: Configure and build | |
run: | | |
conan profile detect --force | |
conan remove -c "*/*" | |
conan build . -pr=conan/profiles/release-clang-emscripten-wasm -pr:b=conan/profiles/release -b missing | |
shell: bash | |
- name: Upload release asset | |
uses: softprops/action-gh-release@v2 | |
if: ${{ github.event_name == 'release' && github.event.action == 'created' }} | |
with: | |
files: | | |
build/Release/emscripten/cqasm_emscripten.js | |
build/Release/emscripten/cqasm_emscripten.wasm | |
token: ${{ secrets.GITHUB_TOKEN }} | |
publish: | |
name: Publish | |
if: ${{ github.event_name == 'release' && github.event.action == 'created' }} | |
needs: | |
- macos-x64 | |
- macos-arm64 | |
- manylinux-x64 | |
- manylinux-arm64 | |
- windows-x64 | |
- emscripten-wasm | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
id: download | |
- name: Publish to PyPI | |
uses: pypa/gh-action-pypi-publish@v1.8.14 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_TOKEN }} | |
packages_dir: ${{ steps.download.outputs.download-path }}/pypi-* |