-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update linux runners to ubuntu-22 or ubuntu-latest, but run test-mem job on ubuntu-20 for it for some reason fails on ubuntu-22 * bump up CI actions to be compatible with node 20, namely bump up to actions/checkout@v4, actions/setup-python@v5, download-artifact@v4, upload-artifact@v4 * update steps involving download-artifact and upload-artifact actions per https://github.com/actions/download-artifact/blob/main/docs/MIGRATION.md * migrate to docker compose v2 * to build binary wheels for mac os, set MACOSX_DEPLOYMENT_TARGET according to the macos version * stop building and testing wheels for old Python versions 3.7, 3.8
- Loading branch information
1 parent
80e3026
commit cd646a9
Showing
7 changed files
with
52 additions
and
42 deletions.
There are no files selected for viewing
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,46 +14,51 @@ jobs: | |
include: | ||
- os: macos-12 # x86_64 | ||
name: mac | ||
env: | ||
macosx_deployment_target: "12.0" | ||
cibw: | ||
build: "cp37* cp38* cp39* cp310* cp311* cp312*" | ||
build: "cp39* cp310* cp311* cp312*" | ||
- os: macos-13-large # Apple Silicon | ||
name: mac_arm64 | ||
env: | ||
macosx_deployment_target: "13.0" | ||
cibw: | ||
build: "cp37* cp38* cp39* cp310* cp311* cp312*" | ||
- os: ubuntu-20.04 | ||
build: "cp39* cp310* cp311* cp312*" | ||
- os: ubuntu-22.04 | ||
name: manylinux2014 | ||
cibw: | ||
arch: x86_64 | ||
build: "cp37* cp38* cp39* cp310* cp311* cp312*" | ||
build: "cp39* cp310* cp311* cp312*" | ||
manylinux_image: manylinux2014 | ||
- os: windows-2019 | ||
name: win_amd64 | ||
architecture: x64 | ||
cibw: | ||
build: "cp37-win_amd64 cp38-win_amd64 cp39-win_amd64 cp310-win_amd64 cp311-win_amd64 cp312-win_amd64" | ||
build: "cp39-win_amd64 cp310-win_amd64 cp311-win_amd64 cp312-win_amd64" | ||
env: | ||
MACOSX_DEPLOYMENT_TARGET: "${{ matrix.env.macosx_deployment_target }}" | ||
CIBW_BUILD: "${{ matrix.cibw.build || '*' }}" | ||
CIBW_SKIP: "*musllinux*" | ||
CIBW_ARCHS: "${{ matrix.cibw.arch || 'auto' }}" | ||
CIBW_MANYLINUX_X86_64_IMAGE: "${{ matrix.cibw.manylinux_image }}" | ||
CIBW_BEFORE_BUILD_MACOS: "brew install libomp llvm && brew link --overwrite [email protected] && brew link --force libomp" | ||
CIBW_BEFORE_BUILD_MACOS: "brew install libomp llvm@12 && brew link --overwrite [email protected] && brew link --force libomp" | ||
CIBW_REPAIR_WHEEL_COMMAND_MACOS: "delocate-listdeps {wheel} && delocate-wheel --verbose --require-archs {delocate_archs} -w {dest_dir} {wheel}" | ||
# to install latest delocate package | ||
CIBW_DEPENDENCY_VERSIONS: "latest" | ||
# due to package and module name conflict have to temporarily move it away to run tests | ||
CIBW_BEFORE_TEST: mv {package}/qsimcirq /tmp | ||
CIBW_BEFORE_TEST: "mv {package}/qsimcirq /tmp" | ||
CIBW_TEST_EXTRAS: "dev" | ||
CIBW_TEST_COMMAND: "pytest {package}/qsimcirq_tests/qsimcirq_test.py && mv /tmp/qsimcirq {package}" | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
|
||
# Used to host cibuildwheel | ||
- uses: actions/setup-python@v2 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.11' | ||
|
||
- name: Install cibuildwheel and twine | ||
run: python -m pip install cibuildwheel==2.16.2 | ||
run: python -m pip install cibuildwheel==2.20.0 | ||
|
||
- name: Install requirements | ||
run: python -m pip install -r requirements.txt | ||
|
@@ -64,20 +69,21 @@ jobs: | |
- name: Build wheels | ||
run: python -m cibuildwheel --output-dir wheelhouse | ||
|
||
- uses: actions/upload-artifact@v2 | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: python-wheels | ||
name: python-wheels-${{ matrix.name }} | ||
path: ./wheelhouse/*.whl | ||
release-wheels: | ||
name: Publish all wheels | ||
needs: [build_wheels] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Download build artifacts | ||
uses: actions/download-artifact@v2 | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: python-wheels | ||
path: dist/ | ||
pattern: python-wheels-* | ||
merge-multiple: true | ||
- name: Publish wheels | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,29 +19,34 @@ jobs: | |
include: | ||
- os: macos-12 # x86_64 | ||
name: mac | ||
env: | ||
macosx_deployment_target: "12.0" | ||
cibw: | ||
build: "cp37* cp38* cp39* cp310* cp311* cp312*" | ||
build: "cp39* cp310* cp311* cp312*" | ||
- os: macos-13-large # Apple Silicon | ||
name: mac_arm64 | ||
env: | ||
macosx_deployment_target: "13.0" | ||
cibw: | ||
build: "cp37* cp38* cp39* cp310* cp311* cp312*" | ||
- os: ubuntu-20.04 | ||
build: "cp39* cp310* cp311* cp312*" | ||
- os: ubuntu-22.04 | ||
name: manylinux2014 | ||
cibw: | ||
arch: x86_64 | ||
build: "cp37* cp38* cp39* cp310* cp311* cp312*" | ||
build: "cp39* cp310* cp311* cp312*" | ||
manylinux_image: manylinux2014 | ||
- os: windows-2019 | ||
name: win_amd64 | ||
architecture: x64 | ||
cibw: | ||
build: "cp37-win_amd64 cp38-win_amd64 cp39-win_amd64 cp310-win_amd64 cp311-win_amd64 cp312-win_amd64" | ||
build: "cp39-win_amd64 cp310-win_amd64 cp311-win_amd64 cp312-win_amd64" | ||
env: | ||
MACOSX_DEPLOYMENT_TARGET: "${{ matrix.env.macosx_deployment_target }}" | ||
CIBW_BUILD: "${{ matrix.cibw.build || '*' }}" | ||
CIBW_SKIP: "*musllinux*" | ||
CIBW_ARCHS: "${{ matrix.cibw.arch || 'auto' }}" | ||
CIBW_MANYLINUX_X86_64_IMAGE: "${{ matrix.cibw.manylinux_image }}" | ||
CIBW_BEFORE_BUILD_MACOS: "brew install libomp llvm && brew link --overwrite [email protected] && brew link --force libomp" | ||
CIBW_BEFORE_BUILD_MACOS: "brew install libomp llvm@12 && brew link --overwrite [email protected] && brew link --force libomp" | ||
CIBW_REPAIR_WHEEL_COMMAND_MACOS: "delocate-listdeps {wheel} && delocate-wheel --verbose --require-archs {delocate_archs} -w {dest_dir} {wheel}" | ||
# to install latest delocate package | ||
CIBW_DEPENDENCY_VERSIONS: "latest" | ||
|
@@ -50,15 +55,15 @@ jobs: | |
CIBW_TEST_EXTRAS: "dev" | ||
CIBW_TEST_COMMAND: "pytest {package}/qsimcirq_tests/qsimcirq_test.py && mv /tmp/qsimcirq {package}" | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
|
||
# Used to host cibuildwheel | ||
- uses: actions/setup-python@v2 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.11' | ||
|
||
- name: Install cibuildwheel and twine | ||
run: python -m pip install cibuildwheel==2.16.2 | ||
run: python -m pip install cibuildwheel==2.20.0 | ||
|
||
- name: Install requirements | ||
run: python -m pip install -r requirements.txt | ||
|
@@ -69,8 +74,7 @@ jobs: | |
- name: Build wheels | ||
run: python -m cibuildwheel --output-dir wheelhouse | ||
|
||
- uses: actions/upload-artifact@v2 | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: python-wheels | ||
name: python-wheels-${{ matrix.name }} | ||
path: ./wheelhouse/*.whl | ||
|
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