diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 98ff13787..3282b38c6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -66,15 +66,15 @@ jobs: gdb --batch --quiet --nx --nh --ex 'py import rpyc; print(rpyc.version.version)' - name: Set up Python ${{ matrix.python_version }} - uses: actions/setup-python@v6 + uses: astral-sh/setup-uv@v7 with: python-version: ${{ matrix.python_version }} - cache: 'pip' - cache-dependency-path: | + enable-cache: true + activate-environment: true + cache-dependency-glob: | **/pyproject.toml **/requirements*.txt - - name: Verify tag against version if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') env: @@ -125,16 +125,13 @@ jobs: - name: Install dependencies run: | - pip install --upgrade pip - pip install --upgrade wheel build - pip install --upgrade flake8 appdirs - pip install --upgrade --editable . + uv pip install --upgrade --editable . - name: Sanity checks run: PWNLIB_NOTERM=1 python -bb -c 'from pwn import *; print(pwnlib.term.term_mode)' - name: Install documentation dependencies - run: pip install -r docs/requirements.txt + run: uv pip install -r docs/requirements.txt - name: Disable yama ptrace_scope run: | @@ -222,7 +219,7 @@ jobs: - name: Build source and wheel distributions run: | - python -m build + uv build - uses: actions/upload-artifact@v4 if: matrix.python_version == '3.10' @@ -251,11 +248,12 @@ jobs: - uses: actions/checkout@v5 - name: Set up Python 3.12 - uses: actions/setup-python@v6 + uses: astral-sh/setup-uv@v7 with: python-version: '3.12' - cache: 'pip' - cache-dependency-path: | + enable-cache: true + activate-environment: true + cache-dependency-glob: | **/pyproject.toml **/requirements*.txt @@ -291,21 +289,18 @@ jobs: - name: Install dependencies run: | - pip install --upgrade pip - pip install --upgrade wheel build - pip install --upgrade flake8 appdirs - pip install --upgrade --editable . + uv pip install --upgrade --editable . - name: Sanity checks run: PWNLIB_NOTERM=1 python -c 'from pwn import *; print(pwnlib.term.term_mode)' - name: Install documentation dependencies - run: pip install -r docs/requirements.txt + run: uv pip install -r docs/requirements.txt - name: Coverage Doctests (Android Only) run: | source .android.env - PWNLIB_NOTERM=1 coverage run -m sphinx -b doctest docs/source docs/build/doctest docs/source/adb.rst + PWNLIB_NOTERM=1 python -bb -m coverage run -m sphinx -b doctest docs/source docs/build/doctest docs/source/adb.rst - uses: actions/upload-artifact@v4 with: @@ -321,17 +316,21 @@ jobs: - uses: actions/checkout@v5 - name: Set up Python 3.12 - uses: actions/setup-python@v6 + uses: astral-sh/setup-uv@v7 with: python-version: '3.12' + enable-cache: true + activate-environment: true + cache-dependency-glob: | + **/pyproject.toml + **/requirements*.txt - name: Install dependencies run: | - pip install --upgrade pip - pip install --upgrade --editable . + uv pip install --upgrade --editable . - name: Install documentation dependencies - run: pip install -r docs/requirements.txt + run: uv pip install -r docs/requirements.txt - name: Sanity checks run: | @@ -363,7 +362,7 @@ jobs: - name: Install coveralls run: | - pip install --break-system-packages tomli coveralls || pip install tomli coveralls + uv pip install tomli coveralls || pip install tomli coveralls - name: Upload coverage to coveralls.io run: |