diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6a6af592a4..ca80d6befd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,11 +23,14 @@ jobs: echo -e "$CONCURRENCY_GROUP\n" shell: bash - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - uses: astral-sh/setup-uv@v7 with: python-version: "3.12" + activate-environment: true + enable-cache: true + cache-python: true - run: | - pip install -U --group lint + uv pip install -U --group lint - uses: dtolnay/rust-toolchain@1.92 # TODO: unpin clippy with: components: rustfmt, clippy @@ -75,6 +78,13 @@ jobs: python-version: "3.12" platform: { os: "ubuntu-latest", python-architecture: "x64", rust-target: "x86_64-unknown-linux-gnu" } msrv: "MSRV" + # Test Python 3.12 on additional Linux architectures + - rust: stable + python-version: "3.12" + platform: { os: "ubuntu-24.04-ppc64le", python-architecture: "ppc64le", rust-target: "powerpc64le-unknown-linux-gnu" } + - rust: stable + python-version: "3.12" + platform: { os: "ubuntu-24.04-s390x", python-architecture: "s390x", rust-target: "s390x-unknown-linux-gnu" } # Test future versions of Rust and Python - rust: beta python-version: "3.14" # upgrade to 3.15-dev when the release candidate is available @@ -83,11 +93,12 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + uses: astral-sh/setup-uv@v7 with: python-version: ${{ matrix.python-version }} - architecture: ${{ matrix.platform.python-architecture }} - + activate-environment: true + enable-cache: true + cache-python: true - name: Install Rust toolchain uses: dtolnay/rust-toolchain@master with: @@ -95,7 +106,7 @@ jobs: targets: ${{ matrix.platform.rust-target }} - name: 'Install dependencies' run: | - python -m pip install -U --group testinfra + uv pip install -U --group testinfra - name: 'Install binary dependencies' run: sudo apt-get install -y graphviz if: runner.os == 'Linux' @@ -112,15 +123,17 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + uses: astral-sh/setup-uv@v7 with: python-version: ${{ matrix.python-version }} - architecture: x64 + activate-environment: true + enable-cache: true + cache-python: true - name: Install Rust toolchain uses: dtolnay/rust-toolchain@stable - name: 'Install dependencies' run: | - python -m pip install -U --group testinfra + uv pip install -U --group testinfra - name: 'Run rustworkx stub tests' run: nox -estubs coverage: @@ -130,10 +143,13 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + - name: Set up Python 3.12 + uses: astral-sh/setup-uv@v7 with: python-version: "3.12" + activate-environment: true + enable-cache: true + cache-python: true - name: Install Rust toolchain uses: dtolnay/rust-toolchain@stable with: @@ -142,9 +158,9 @@ jobs: 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 --group test + uv pip install -U --group test - name: Build rustworkx - run: pip install . + run: uv pip install . env: SETUPTOOLS_RUST_CARGO_PROFILE: "dev" CARGO_INCREMENTAL: 0 @@ -178,17 +194,20 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + - name: Set up Python 3.12 + uses: astral-sh/setup-uv@v7 with: python-version: "3.12" + activate-environment: true + enable-cache: true + cache-python: true - name: Install Rust toolchain uses: dtolnay/rust-toolchain@stable - name: Install binary deps run: sudo apt-get install -y graphviz - name: Install deps run: | - pip install -U --group testinfra + uv pip install -U --group testinfra - name: Build Docs run: nox -e docs - uses: actions/upload-artifact@v4 diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index f8842c5e28..a1ec30456e 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -91,7 +91,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest] + os: [ubuntu-24.04-ppc64le] steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 @@ -99,10 +99,6 @@ jobs: with: python-version: '3.12' - uses: dtolnay/rust-toolchain@stable - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - with: - platforms: all - name: Install cibuildwheel run: | python -m pip install -U --group releaseinfra @@ -129,7 +125,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest] + os: [ubuntu-24.04-s390x] steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 @@ -137,10 +133,6 @@ jobs: with: python-version: '3.12' - uses: dtolnay/rust-toolchain@stable - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - with: - platforms: all - name: Install cibuildwheel run: | python -m pip install -U --group releaseinfra