diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a6c597729..982bb3633 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,10 +25,8 @@ jobs: with: python-version: 3.8 - run: pip install -U flake8 black~=22.0 - - uses: actions-rs/toolchain@v1 + - uses: dtolnay/rust-toolchain@stable with: - toolchain: stable - profile: minimal components: rustfmt - name: Test Build run: cargo build @@ -46,7 +44,7 @@ jobs: run: pushd rustworkx-core && cargo test && popd - name: rustworkx-core Docs run: pushd rustworkx-core && cargo doc && popd - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: rustworkx_core_docs path: target/doc/rustworkx_core @@ -77,12 +75,10 @@ jobs: python-version: ${{ matrix.python-version }} architecture: ${{ matrix.platform.python-architecture }} - name: Install Rust toolchain - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} - target: ${{ matrix.platform.rust-target }} - profile: minimal - default: true + targets: ${{ matrix.platform.rust-target }} - name: 'Install dependencies' run: python -m pip install --upgrade 'tox<4' - name: 'Install binary dependencies' @@ -105,12 +101,7 @@ jobs: python-version: ${{ matrix.python-version }} architecture: x64 - name: Install Rust toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - target: x86_64-unknown-linux-gnu - profile: minimal - default: true + uses: dtolnay/rust-toolchain@stable - name: 'Install dependencies' run: python -m pip install --upgrade 'tox<4' - name: 'Run rustworkx stub tests' @@ -136,12 +127,10 @@ jobs: python-version: ${{ matrix.python-version }} architecture: ${{ matrix.platform.python-architecture }} - name: Install Rust toolchain - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} - target: ${{ matrix.platform.rust-target }} - profile: minimal - default: true + targets: ${{ matrix.platform.rust-target }} - name: 'Install dependencies' run: python -m pip install --upgrade 'tox<4' - name: 'Install binary dependencies' @@ -165,11 +154,8 @@ jobs: with: python-version: 3.8 - name: Install Rust toolchain - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@stable with: - toolchain: stable - override: true - profile: default components: llvm-tools-preview - 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 - @@ -190,7 +176,7 @@ jobs: set -e mv tests/retworkx*profraw . ./grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --ignore "/*" -o ./coveralls.info - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: coverage path: coveralls.info @@ -212,18 +198,14 @@ jobs: with: python-version: 3.8 - name: Install Rust toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - profile: minimal + uses: dtolnay/rust-toolchain@stable - name: Install binary deps run: sudo apt-get install -y graphviz - name: Install deps run: pip install -U 'tox<4' - name: Build Docs run: tox -edocs - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: html_docs path: docs/build/html diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 2ffccea31..225c9ceff 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -10,10 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true + - uses: dtolnay/rust-toolchain@stable - name: Run cargo publish run: | cd rustworkx-core @@ -34,7 +31,7 @@ jobs: run: pip install -U twine setuptools-rust - name: Build sdist run: python setup.py sdist - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: path: ./dist/* - name: Upload to PyPI @@ -55,9 +52,7 @@ jobs: name: Install Python with: python-version: '3.7' - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable + - uses: dtolnay/rust-toolchain@stable - name: Install cibuildwheel run: | python -m pip install cibuildwheel==2.10.1 twine @@ -74,7 +69,7 @@ jobs: 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 - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: path: ./wheelhouse/*.whl - name: Upload to PyPI @@ -95,9 +90,7 @@ jobs: name: Install Python with: python-version: '3.7' - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable + - uses: dtolnay/rust-toolchain@stable - name: Set up QEMU uses: docker/setup-qemu-action@v1 with: @@ -119,7 +112,7 @@ jobs: CIBW_TEST_REQUIRES: networkx testtools fixtures CIBW_TEST_COMMAND: python -m unittest discover {project}/tests/rustworkx_tests CIBW_ARCHS_LINUX: aarch64 - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: path: ./wheelhouse/*.whl - name: Upload to PyPI @@ -140,9 +133,7 @@ jobs: name: Install Python with: python-version: '3.7' - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable + - uses: dtolnay/rust-toolchain@stable - name: Set up QEMU uses: docker/setup-qemu-action@v1 with: @@ -164,7 +155,7 @@ jobs: CIBW_TEST_REQUIRES: networkx testtools fixtures CIBW_TEST_COMMAND: python -m unittest discover {project}/tests/rustworkx_tests CIBW_ARCHS_LINUX: ppc64le - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: path: ./wheelhouse/*.whl - name: Upload to PyPI @@ -185,9 +176,7 @@ jobs: name: Install Python with: python-version: '3.7' - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable + - uses: dtolnay/rust-toolchain@stable - name: Set up QEMU uses: docker/setup-qemu-action@v1 with: @@ -209,7 +198,7 @@ jobs: CIBW_TEST_REQUIRES: networkx testtools fixtures CIBW_TEST_COMMAND: python -m unittest discover {project}/tests/rustworkx_tests CIBW_ARCHS_LINUX: ppc64le - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: path: ./wheelhouse/*.whl - name: Upload to PyPI @@ -230,9 +219,7 @@ jobs: name: Install Python with: python-version: '3.7' - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable + - uses: dtolnay/rust-toolchain@stable - name: Set up QEMU uses: docker/setup-qemu-action@v1 with: @@ -254,7 +241,7 @@ jobs: CIBW_TEST_REQUIRES: networkx testtools fixtures CIBW_TEST_COMMAND: python -m unittest discover {project}/tests/rustworkx_tests CIBW_ARCHS_LINUX: s390x - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: path: ./wheelhouse/*.whl - name: Upload to PyPI @@ -275,9 +262,7 @@ jobs: name: Install Python with: python-version: '3.7' - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable + - uses: dtolnay/rust-toolchain@stable - name: Set up QEMU uses: docker/setup-qemu-action@v1 with: @@ -299,7 +284,7 @@ jobs: CIBW_TEST_REQUIRES: networkx testtools fixtures CIBW_TEST_COMMAND: python -m unittest discover {project}/tests/rustworkx_tests CIBW_ARCHS_LINUX: s390x - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: path: ./wheelhouse/*.whl - name: Upload to PyPI @@ -319,7 +304,7 @@ jobs: CIBW_ARCHS_MACOS: arm64 universal2 CIBW_BEFORE_BUILD: pip install -U setuptools-rust CIBW_ENVIRONMENT: CARGO_BUILD_TARGET="aarch64-apple-darwin" PYO3_CROSS_LIB_DIR="/Library/Frameworks/Python.framework/Versions/$(python -c 'import sys; print(str(sys.version_info[0])+"."+str(sys.version_info[1]))')/lib/python$(python -c 'import sys; print(str(sys.version_info[0])+"."+str(sys.version_info[1]))')" - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: path: ./wheelhouse/*.whl - uses: actions/setup-python@v4 @@ -344,11 +329,9 @@ jobs: with: python-version: '3.7' architecture: 'x86' - - uses: actions-rs/toolchain@v1 + - uses: dtolnay/rust-toolchain@stable with: - toolchain: stable - target: i686-pc-windows-msvc - default: true + targets: i686-pc-windows-msvc - name: Force win32 rust run: rustup default stable-i686-pc-windows-msvc - name: Install cibuildwheel @@ -363,7 +346,7 @@ jobs: 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 - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: path: ./wheelhouse/*.whl - name: Upload to PyPI @@ -387,7 +370,7 @@ jobs: run: python setup.py bdist_wheel env: RUSTWORKX_PKG_NAME: retworkx - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: path: ./dist/* - name: Upload to PyPI