Skip to content

Commit 198e45d

Browse files
committed
Use UV as a faster pip implementation
1 parent 753fcf0 commit 198e45d

File tree

1 file changed

+19
-23
lines changed

1 file changed

+19
-23
lines changed

.github/workflows/ci.yml

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,14 @@ jobs:
6666
gdb --batch --quiet --nx --nh --ex 'py import rpyc; print(rpyc.version.version)'
6767
6868
- name: Set up Python ${{ matrix.python_version }}
69-
uses: actions/setup-python@v6
69+
uses: astral-sh/setup-uv@v7
7070
with:
7171
python-version: ${{ matrix.python_version }}
72-
cache: 'pip'
73-
cache-dependency-path: |
72+
enable-cache: true
73+
cache-dependency-glob: |
7474
**/pyproject.toml
7575
**/requirements*.txt
7676
77-
7877
- name: Verify tag against version
7978
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
8079
env:
@@ -125,16 +124,13 @@ jobs:
125124
126125
- name: Install dependencies
127126
run: |
128-
pip install --upgrade pip
129-
pip install --upgrade wheel build
130-
pip install --upgrade flake8 appdirs
131-
pip install --upgrade --editable .
127+
uv pip install --upgrade --editable .
132128
133129
- name: Sanity checks
134130
run: PWNLIB_NOTERM=1 python -bb -c 'from pwn import *; print(pwnlib.term.term_mode)'
135131

136132
- name: Install documentation dependencies
137-
run: pip install -r docs/requirements.txt
133+
run: uv pip install -r docs/requirements.txt
138134

139135
- name: Disable yama ptrace_scope
140136
run: |
@@ -222,7 +218,7 @@ jobs:
222218
223219
- name: Build source and wheel distributions
224220
run: |
225-
python -m build
221+
uv build
226222
227223
- uses: actions/upload-artifact@v4
228224
if: matrix.python_version == '3.10'
@@ -251,11 +247,11 @@ jobs:
251247
- uses: actions/checkout@v5
252248

253249
- name: Set up Python 3.12
254-
uses: actions/setup-python@v6
250+
uses: astral-sh/setup-uv@v7
255251
with:
256252
python-version: '3.12'
257-
cache: 'pip'
258-
cache-dependency-path: |
253+
enable-cache: true
254+
cache-dependency-glob: |
259255
**/pyproject.toml
260256
**/requirements*.txt
261257
@@ -291,21 +287,18 @@ jobs:
291287
292288
- name: Install dependencies
293289
run: |
294-
pip install --upgrade pip
295-
pip install --upgrade wheel build
296-
pip install --upgrade flake8 appdirs
297-
pip install --upgrade --editable .
290+
uv pip install --upgrade --editable .
298291
299292
- name: Sanity checks
300293
run: PWNLIB_NOTERM=1 python -c 'from pwn import *; print(pwnlib.term.term_mode)'
301294

302295
- name: Install documentation dependencies
303-
run: pip install -r docs/requirements.txt
296+
run: uv pip install -r docs/requirements.txt
304297

305298
- name: Coverage Doctests (Android Only)
306299
run: |
307300
source .android.env
308-
PWNLIB_NOTERM=1 coverage run -m sphinx -b doctest docs/source docs/build/doctest docs/source/adb.rst
301+
PWNLIB_NOTERM=1 python -bb -m coverage run -m sphinx -b doctest docs/source docs/build/doctest docs/source/adb.rst
309302
310303
- uses: actions/upload-artifact@v4
311304
with:
@@ -321,17 +314,20 @@ jobs:
321314
- uses: actions/checkout@v5
322315

323316
- name: Set up Python 3.12
324-
uses: actions/setup-python@v6
317+
uses: astral-sh/setup-uv@v7
325318
with:
326319
python-version: '3.12'
320+
enable-cache: true
321+
cache-dependency-glob: |
322+
**/pyproject.toml
323+
**/requirements*.txt
327324
328325
- name: Install dependencies
329326
run: |
330-
pip install --upgrade pip
331-
pip install --upgrade --editable .
327+
uv pip install --upgrade --editable .
332328
333329
- name: Install documentation dependencies
334-
run: pip install -r docs/requirements.txt
330+
run: uv pip install -r docs/requirements.txt
335331

336332
- name: Sanity checks
337333
run: |

0 commit comments

Comments
 (0)