v1.34.0rc2 #478
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 | |
on: | |
release: | |
types: | |
- created | |
push: | |
branches: | |
- 'wheel/**' | |
jobs: | |
build_Linux_wheels: | |
name: Build manylinux | |
runs-on: ubuntu-24.04 | |
strategy: | |
matrix: | |
python3-version: ['10', '11', '12', '13'] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* | |
- name: Set up container | |
run: | | |
docker create --name linux_build -i -v /:/host quay.io/pypa/manylinux_2_28_x86_64:latest /bin/bash | |
docker cp . linux_build:/tket/ | |
- name: Run build | |
run: | | |
docker start linux_build | |
docker exec -e PY_TAG="cp3${{ matrix.python3-version }}-cp3${{ matrix.python3-version }}" -e CONAN_PROFILE=linux-x86_64-gcc12 linux_build /bin/bash -c "/tket/.github/workflows/linuxbuildwheel" | |
mkdir wheelhouse | |
docker cp linux_build:/tket/pytket/audited/. wheelhouse/ | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: Linux_3.${{ matrix.python3-version }}_wheel | |
path: wheelhouse/ | |
build_Linux_aarch64_wheels: | |
name: Build manylinux aarch64 | |
# We need the one with 12GB RAM to build pytket. | |
runs-on: 'buildjet-8vcpu-ubuntu-2204-arm' | |
strategy: | |
matrix: | |
python3-version: ['10', '11', '12', '13'] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* | |
- name: Set up container | |
run: | | |
docker create --name linux_build -i -v /:/host quay.io/pypa/manylinux_2_28_aarch64:latest /bin/bash | |
docker cp . linux_build:/tket/ | |
- name: Run build | |
run: | | |
docker start linux_build | |
docker exec -e PY_TAG="cp3${{ matrix.python3-version }}-cp3${{ matrix.python3-version }}" -e CONAN_PROFILE=linux-armv8-gcc12 linux_build /bin/bash -c "/tket/.github/workflows/linuxbuildwheel" | |
mkdir wheelhouse | |
docker cp linux_build:/tket/pytket/audited/. wheelhouse/ | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: Linux_aarch64_3.${{ matrix.python3-version }}_wheel | |
path: wheelhouse/ | |
build_macos_x86_wheels: | |
name: Build macos x86 wheels | |
runs-on: macos-13 | |
strategy: | |
matrix: | |
python-version: ['3.10', '3.11', '3.12', '3.13'] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install conan | |
uses: turtlebrowser/get-conan@v1.2 | |
- name: Set up conan | |
run: | | |
conan profile detect | |
DEFAULT_PROFILE_PATH=`conan profile path default` | |
PROFILE_PATH=./conan-profiles/macos-13 | |
diff ${DEFAULT_PROFILE_PATH} ${PROFILE_PATH} || true | |
cp ${PROFILE_PATH} ${DEFAULT_PROFILE_PATH} | |
conan remote add tket-libs https://quantinuumsw.jfrog.io/artifactory/api/conan/tket1-libs --index 0 | |
- name: Build tket C++ | |
run: conan create tket --user tket --channel stable --build=missing -o boost/*:header_only=True -o tklog/*:shared=True -o tket/*:shared=True -tf "" | |
- name: Build wheel | |
run: | | |
conan create recipes/pybind11 | |
conan create recipes/pybind11_json/all --version 0.2.14 | |
cd pytket | |
# Ensure wheels are compatible with MacOS 13.0 and later: | |
export WHEEL_PLAT_NAME=macosx_13_0_x86_64 | |
pip install -U pip build delocate | |
python -m build | |
delocate-wheel -v -w "$GITHUB_WORKSPACE/wheelhouse/" "dist/pytket-"*".whl" | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: MacOS_x86_${{ matrix.python-version }}_wheel | |
path: wheelhouse/ | |
build_macos_arm64_wheels: | |
name: Build macos arm64 wheels | |
runs-on: macos-15 | |
env: | |
MACOSX_DEPLOYMENT_TARGET: '13.0' | |
strategy: | |
matrix: | |
python-version: ['3.10', '3.11', '3.12', '3.13'] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install conan | |
uses: turtlebrowser/get-conan@v1.2 | |
- name: Set up conan | |
run: | | |
conan profile detect | |
DEFAULT_PROFILE_PATH=`conan profile path default` | |
PROFILE_PATH=./conan-profiles/macos-15 | |
diff ${DEFAULT_PROFILE_PATH} ${PROFILE_PATH} || true | |
cp ${PROFILE_PATH} ${DEFAULT_PROFILE_PATH} | |
conan remote add tket-libs https://quantinuumsw.jfrog.io/artifactory/api/conan/tket1-libs --index 0 | |
- name: Build tket C++ | |
run: conan create tket --user tket --channel stable --build="*" -o boost/*:header_only=True -o tklog/*:shared=True -o tket/*:shared=True -tf "" | |
- name: Build wheel | |
run: | | |
conan create recipes/pybind11 | |
conan create recipes/pybind11_json/all --version 0.2.14 | |
cd pytket | |
# Ensure wheels are compatible with MacOS 13.0 and later: | |
export WHEEL_PLAT_NAME=macosx_13_0_arm64 | |
python${{ matrix.python-version }} -m pip install -U pip build delocate | |
python${{ matrix.python-version }} -m build | |
delocate-wheel -v -w "$GITHUB_WORKSPACE/wheelhouse/" "dist/pytket-"*".whl" | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: MacOS_arm64_${{ matrix.python-version }}_wheel | |
path: wheelhouse/ | |
build_Windows_wheels: | |
name: Build Windows wheels | |
runs-on: windows-2022 | |
strategy: | |
matrix: | |
python-version: ['3.10', '3.11', '3.12', '3.13'] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* | |
- name: Select Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install conan | |
uses: turtlebrowser/get-conan@v1.2 | |
- name: Set up conan | |
shell: bash | |
run: | | |
conan profile detect | |
DEFAULT_PROFILE_PATH=`conan profile path default` | |
PROFILE_PATH=./conan-profiles/windows-2022 | |
diff ${DEFAULT_PROFILE_PATH} ${PROFILE_PATH} || true | |
cp ${PROFILE_PATH} ${DEFAULT_PROFILE_PATH} | |
conan remote add tket-libs https://quantinuumsw.jfrog.io/artifactory/api/conan/tket1-libs --index 0 | |
- name: Build tket | |
run: conan create tket --user tket --channel stable --build=missing -o boost/*:header_only=True -o tklog/*:shared=True -o tket/*:shared=True -tf "" | |
- name: Build wheel | |
run: | | |
conan create recipes/pybind11 | |
conan create recipes/pybind11_json/all --version 0.2.14 | |
cd pytket | |
python -m pip install -U pip build | |
python -m build --outdir "${{ github.workspace }}/wheelhouse" | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: Windows_${{ matrix.python-version }}_wheel | |
path: wheelhouse/ | |
test_linux_wheels: | |
name: Test linux wheels | |
needs: build_Linux_wheels | |
runs-on: ubuntu-24.04 | |
strategy: | |
matrix: | |
python3-version: ['10', '11', '12', '13'] | |
steps: | |
- name: Set up Python 3.${{ matrix.python3-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.${{ matrix.python3-version }}" | |
- name: Download wheels | |
uses: actions/download-artifact@v4 | |
with: | |
name: Linux_3.${{ matrix.python3-version }}_wheel | |
path: wheelhouse/ | |
- name: Install wheel | |
run: pip install wheelhouse/pytket-*.whl | |
- uses: actions/checkout@v4 | |
with: | |
path: tket | |
- name: Setup tests | |
run: | | |
cd tket/pytket/tests | |
pip install -r requirements.txt | |
- name: Run tests | |
run: cd tket/pytket/tests && pytest --ignore=simulator/ | |
test_linux_aarch64_wheels: | |
name: Test linux aarch64 wheels | |
needs: build_Linux_aarch64_wheels | |
runs-on: 'buildjet-4vcpu-ubuntu-2204-arm' | |
strategy: | |
matrix: | |
python3-version: ['10', '11', '12', '13'] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
path: tket | |
- name: Set up Python 3.${{ matrix.python3-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.${{ matrix.python3-version }}" | |
- name: Download wheel | |
uses: actions/download-artifact@v4 | |
with: | |
name: Linux_aarch64_3.${{ matrix.python3-version }}_wheel | |
path: wheelhouse/ | |
- name: Install wheel | |
run: pip install wheelhouse/pytket-*.whl | |
- uses: actions/checkout@v4 | |
with: | |
path: tket | |
- name: Setup tests | |
run: | | |
cd tket/pytket/tests | |
pip install -U -r requirements.txt | |
- name: Run tests | |
run: cd tket/pytket/tests && pytest --ignore=simulator/ | |
test_macos_x86_wheels: | |
name: Test macos x86 wheels | |
needs: build_macos_x86_wheels | |
strategy: | |
matrix: | |
os: ['macos-13'] | |
python-version: ['3.10', '3.11', '3.12', '3.13'] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Download wheels | |
uses: actions/download-artifact@v4 | |
with: | |
name: MacOS_x86_${{ matrix.python-version }}_wheel | |
path: wheelhouse/ | |
- uses: actions/checkout@v4 | |
with: | |
path: tket | |
- name: Install wheel | |
run: | | |
pip install $GITHUB_WORKSPACE/wheelhouse/pytket-*.whl | |
- name: Run tests | |
run: | | |
cd tket/pytket/tests | |
pip install -r requirements.txt | |
pytest --ignore=simulator/ | |
test_macos_arm64_wheels: | |
name: Test macos arm64 wheels | |
needs: build_macos_arm64_wheels | |
strategy: | |
matrix: | |
os: ['macos-14', 'macos-15'] | |
python-version: ['3.10', '3.11', '3.12', '3.13'] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Download wheels | |
uses: actions/download-artifact@v4 | |
with: | |
name: MacOS_arm64_${{ matrix.python-version }}_wheel | |
path: wheelhouse/ | |
- uses: actions/checkout@v4 | |
with: | |
path: tket | |
- name: Install wheel | |
run: | | |
python${{ matrix.python-version }} -m pip install $GITHUB_WORKSPACE/wheelhouse/pytket-*.whl | |
- name: Run tests | |
run: | | |
cd tket/pytket/tests | |
python${{ matrix.python-version }} -m pip install -r requirements.txt | |
python${{ matrix.python-version }} -m pytest --ignore=simulator/ | |
test_Windows_wheels: | |
name: Test Windows wheels | |
needs: build_Windows_wheels | |
runs-on: windows-2022 | |
strategy: | |
matrix: | |
python-version: ['3.10', '3.11', '3.12', '3.13'] | |
steps: | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Download wheel | |
uses: actions/download-artifact@v4 | |
with: | |
name: Windows_${{ matrix.python-version }}_wheel | |
path: wheelhouse/ | |
- name: Install wheel | |
shell: bash | |
run: for i in wheelhouse/pytket-*.whl ; do pip install $i ; done | |
- uses: actions/checkout@v4 | |
with: | |
path: tket | |
- name: Run tests | |
run: | | |
pip install pytest hypothesis | |
cd tket/pytket/tests | |
pip install -r requirements.txt | |
pytest --ignore=simulator/ | |
publish_to_pypi: | |
name: Publish to pypi | |
if: github.event_name == 'release' | |
needs: [test_linux_wheels, test_linux_aarch64_wheels, test_macos_x86_wheels, test_macos_arm64_wheels, test_Windows_wheels] | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Download all wheels | |
uses: actions/download-artifact@v4 | |
with: | |
path: wheelhouse | |
- name: Put them all in the dist folder | |
run: | | |
mkdir dist | |
for w in `find wheelhouse/ -type f -name "*.whl"` ; do cp $w dist/ ; done | |
- name: Publish wheels | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_PYTKET_API_TOKEN }} | |
verbose: true |