From c486370506e3ef933354a88581849f0461e63c27 Mon Sep 17 00:00:00 2001 From: Ivan Carvalho Date: Tue, 21 Feb 2023 10:35:42 -0800 Subject: [PATCH 1/3] Switch to dtolnay/rust-toolchain --- .github/workflows/main.yml | 27 +++++++-------------------- .github/workflows/wheels.yml | 35 +++++++++-------------------------- 2 files changed, 16 insertions(+), 46 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b0e2ac10a..e729de294 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 @@ -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' @@ -111,12 +107,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' @@ -140,11 +134,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 - @@ -187,11 +178,7 @@ 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 diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 2ffccea31..8ac624ebf 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 @@ -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 @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: @@ -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 From 0f2e0055f37a1e79745ddffee262710b37759b65 Mon Sep 17 00:00:00 2001 From: Ivan Carvalho Date: Tue, 21 Feb 2023 11:21:39 -0800 Subject: [PATCH 2/3] Update upload-artifact --- .github/workflows/main.yml | 6 +++--- .github/workflows/wheels.yml | 20 ++++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e729de294..4bbe23c89 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -44,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 @@ -156,7 +156,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 @@ -185,7 +185,7 @@ jobs: 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 8ac624ebf..225c9ceff 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -31,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 @@ -69,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 @@ -112,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 @@ -155,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 @@ -198,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 @@ -241,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 @@ -284,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 @@ -304,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 @@ -346,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 @@ -370,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 From 3ad2ecee443796dfeb050b755d412b973cf6df05 Mon Sep 17 00:00:00 2001 From: Ivan Carvalho Date: Thu, 9 Mar 2023 13:51:09 -0800 Subject: [PATCH 3/3] Update new action --- .github/workflows/main.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9e7d874e5..982bb3633 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -101,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'