Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into swap-nox-tox
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanIsCoding committed Jun 21, 2023
2 parents 1b498d0 + c4f0c2e commit 1ac8aa8
Show file tree
Hide file tree
Showing 97 changed files with 5,701 additions and 1,042 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/docs_dev.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
name: Docs Publish
on:
workflow_dispatch:
push:
branches: [ main ]

jobs:
deploy:
if: github.repository_owner == 'Qiskit'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
24 changes: 22 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ concurrency:
cancel-in-progress: true
jobs:
build_lint:
if: github.repository_owner == 'Qiskit'
name: Build, rustfmt, and python lint
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -49,13 +50,14 @@ jobs:
name: rustworkx_core_docs
path: target/doc/rustworkx_core
tests:
if: github.repository_owner == 'Qiskit'
needs: [build_lint]
name: python${{ matrix.python-version }}-${{ matrix.platform.python-architecture }} ${{ matrix.platform.os }} ${{ matrix.msrv }}
runs-on: ${{ matrix.platform.os }}
strategy:
matrix:
rust: [stable]
python-version: [3.7, 3.8, 3.9, "3.10", "3.11"]
python-version: [3.8, 3.9, "3.10", "3.11"]
platform: [
{ os: "macOS-latest", python-architecture: "x64", rust-target: "x86_64-apple-darwin" },
{ os: "ubuntu-latest", python-architecture: "x64", rust-target: "x86_64-unknown-linux-gnu" },
Expand All @@ -74,6 +76,20 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.platform.python-architecture }}
if: runner.os != 'Windows'
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: 3.7
architecture: ${{ matrix.platform.python-architecture }}
if: ${{ runner.os == 'Windows' && matrix.python-version == '3.7.16' }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.platform.python-architecture }}
if: ${{ runner.os == 'Windows' && matrix.python-version != '3.7.16' }}

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
Expand All @@ -87,6 +103,7 @@ jobs:
- name: 'Run tests'
run: nox -e test
tests_stubs:
if: github.repository_owner == 'Qiskit'
needs: [tests]
name: python-stubs-${{ matrix.python-version }}
runs-on: ubuntu-latest
Expand All @@ -107,6 +124,7 @@ jobs:
- name: 'Run rustworkx stub tests'
run: nox -e stubs
tests_retworkx_compat:
if: github.repository_owner == 'Qiskit'
needs: [build_lint]
name: python${{ matrix.python-version }}-${{ matrix.platform.python-architecture }} ${{ matrix.platform.os }} ${{ matrix.msrv }}
runs-on: ${{ matrix.platform.os }}
Expand Down Expand Up @@ -147,6 +165,7 @@ jobs:
cd tests
stestr run -t ./retworkx_backwards_compat
coverage:
if: github.repository_owner == 'Qiskit'
needs: [tests]
name: Coverage
runs-on: ubuntu-latest
Expand All @@ -163,7 +182,7 @@ jobs:
- name: Download grcov
run: curl -L https://github.com/mozilla/grcov/releases/download/v0.8.7/grcov-x86_64-unknown-linux-gnu.tar.bz2 | tar jxf -
- name: Install deps
run: pip install -U setuptools-rust networkx testtools fixtures
run: pip install -U setuptools-rust networkx scipy testtools fixtures
- name: Build retworkx
run: python setup.py develop
env:
Expand All @@ -189,6 +208,7 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coveralls.info
docs:
if: github.repository_owner == 'Qiskit'
needs: [tests]
name: Build Docs
runs-on: ubuntu-latest
Expand Down
44 changes: 23 additions & 21 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.7'
python-version: '3.8'
- name: Install deps
run: pip install -U twine setuptools-rust
- name: Build sdist
Expand All @@ -51,7 +51,7 @@ jobs:
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.7'
python-version: '3.8'
- uses: dtolnay/rust-toolchain@stable
- name: Install cibuildwheel
run: |
Expand All @@ -65,7 +65,7 @@ jobs:
CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=10.9
CIBW_MANYLINUX_X86_64_IMAGE: quay.io/pypa/manylinux2014_x86_64:latest
CIBW_MANYLINUX_I686_IMAGE: quay.io/pypa/manylinux2014_i686:latest
CIBW_SKIP: cp36-* pp* *win32 *musl*
CIBW_SKIP: cp36-* cp37-* pp* *win32 *musl*
CIBW_BEFORE_BUILD: pip install -U setuptools-rust
CIBW_TEST_REQUIRES: networkx testtools fixtures
CIBW_TEST_COMMAND: python -m unittest discover {project}/tests/rustworkx_tests
Expand All @@ -89,10 +89,10 @@ jobs:
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.7'
python-version: '3.8'
- uses: dtolnay/rust-toolchain@stable
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v2
with:
platforms: all
- name: Install cibuildwheel
Expand All @@ -107,9 +107,9 @@ jobs:
CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=10.9
CIBW_MANYLINUX_X86_64_IMAGE: quay.io/pypa/manylinux2014_x86_64:latest
CIBW_MANYLINUX_I686_IMAGE: quay.io/pypa/manylinux2014_i686:latest
CIBW_SKIP: cp36-* pp* *win32 *musl*
CIBW_SKIP: cp36-* cp37-* pp* *win32 *musl*
CIBW_BEFORE_BUILD: pip install -U setuptools-rust
CIBW_TEST_REQUIRES: networkx testtools fixtures
CIBW_TEST_REQUIRES: networkx scipy testtools fixtures
CIBW_TEST_COMMAND: python -m unittest discover {project}/tests/rustworkx_tests
CIBW_ARCHS_LINUX: aarch64
- uses: actions/upload-artifact@v3
Expand All @@ -132,10 +132,10 @@ jobs:
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.7'
python-version: '3.8'
- uses: dtolnay/rust-toolchain@stable
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v2
with:
platforms: all
- name: Install cibuildwheel
Expand All @@ -150,7 +150,7 @@ jobs:
CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=10.9
CIBW_MANYLINUX_X86_64_IMAGE: quay.io/pypa/manylinux2014_x86_64:latest
CIBW_MANYLINUX_I686_IMAGE: quay.io/pypa/manylinux2014_i686:latest
CIBW_SKIP: cp36-* cp39-* cp310-* pp* *win32 *musl*
CIBW_SKIP: cp36-* cp37-* cp39-* cp310-* cp311-* pp* *win32 *musl*
CIBW_BEFORE_BUILD: pip install -U setuptools-rust
CIBW_TEST_REQUIRES: networkx testtools fixtures
CIBW_TEST_COMMAND: python -m unittest discover {project}/tests/rustworkx_tests
Expand All @@ -175,10 +175,10 @@ jobs:
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.7'
python-version: '3.8'
- uses: dtolnay/rust-toolchain@stable
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v2
with:
platforms: all
- name: Install cibuildwheel
Expand Down Expand Up @@ -218,10 +218,10 @@ jobs:
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.7'
python-version: '3.8'
- uses: dtolnay/rust-toolchain@stable
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v2
with:
platforms: all
- name: Install cibuildwheel
Expand All @@ -236,11 +236,12 @@ jobs:
CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=10.9
CIBW_MANYLINUX_X86_64_IMAGE: quay.io/pypa/manylinux2014_x86_64:latest
CIBW_MANYLINUX_I686_IMAGE: quay.io/pypa/manylinux2014_i686:latest
CIBW_SKIP: cp36-* cp39-* cp310-* pp* *win32 *musl*
CIBW_SKIP: cp36-* cp37-* cp39-* cp310-* cp311-* pp* *win32 *musl*
CIBW_BEFORE_BUILD: pip install -U setuptools-rust
CIBW_TEST_REQUIRES: networkx testtools fixtures
CIBW_TEST_COMMAND: python -m unittest discover {project}/tests/rustworkx_tests
CIBW_ARCHS_LINUX: s390x
CIBW_TEST_SKIP: "*-*linux_s390x"
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
Expand All @@ -261,10 +262,10 @@ jobs:
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.7'
python-version: '3.8'
- uses: dtolnay/rust-toolchain@stable
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v2
with:
platforms: all
- name: Install cibuildwheel
Expand All @@ -284,6 +285,7 @@ jobs:
CIBW_TEST_REQUIRES: networkx testtools fixtures
CIBW_TEST_COMMAND: python -m unittest discover {project}/tests/rustworkx_tests
CIBW_ARCHS_LINUX: s390x
CIBW_TEST_SKIP: "*-*linux_s390x"
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
Expand All @@ -294,7 +296,7 @@ jobs:
TWINE_USERNAME: retworkx-ci
build-mac-arm-wheels:
name: Build wheels on macos for arm and universal2
runs-on: macos-10.15
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Build wheels
Expand Down Expand Up @@ -327,7 +329,7 @@ jobs:
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.7'
python-version: '3.8'
architecture: 'x86'
- uses: dtolnay/rust-toolchain@stable
with:
Expand All @@ -342,7 +344,7 @@ jobs:
python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=10.9
CIBW_SKIP: cp36-* pp* *amd64 *musl*
CIBW_SKIP: cp36-* cp37-* pp* *amd64 *musl*
CIBW_BEFORE_BUILD: pip install -U setuptools-rust
CIBW_TEST_REQUIRES: networkx testtools fixtures
CIBW_TEST_COMMAND: python -m unittest discover {project}/tests/rustworkx_tests
Expand All @@ -365,7 +367,7 @@ jobs:
with:
python-version: '3.10'
- name: Install deps
run: pip install -U twine setuptools-rust
run: pip install -U twine setuptools-rust wheel build
- name: Build sdist
run: python setup.py bdist_wheel
env:
Expand Down
5 changes: 1 addition & 4 deletions .mergify.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
queue_rules:
- name: automerge
conditions:
- check-success=python3.7-x64 windows-latest
- check-success=python3.7-x64 ubuntu-latest
- check-success=python3.7-x64 macOS-latest
- check-success=python3.8-x64 windows-latest
- check-success=python3.8-x64 ubuntu-latest
- check-success=python3.8-x64 macOS-latest
Expand Down Expand Up @@ -36,4 +33,4 @@ pull_request_rules:
actions:
backport:
branches:
- stable/0.12
- stable/0.13
Loading

0 comments on commit 1ac8aa8

Please sign in to comment.