Skip to content

Commit 5e94b87

Browse files
authored
Merge pull request #1090 from matthewfeickert/ci/use-uv-for-pip-installs
ci: Use uv for all pip installs
2 parents f529771 + c309b62 commit 5e94b87

File tree

1 file changed

+23
-18
lines changed

1 file changed

+23
-18
lines changed

.github/workflows/ci.yml

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -60,39 +60,45 @@ jobs:
6060
run: |
6161
echo "INSTALL_EXTRAS='[dev,parsl,dask,servicex]'" >> $GITHUB_ENV
6262
63+
- name: Install uv
64+
run: python -m pip install --upgrade uv
65+
6366
- name: Install dependencies (Linux)
6467
if: matrix.os == 'ubuntu-latest'
6568
run: |
66-
python -m pip install --upgrade pip setuptools wheel
69+
uv pip install --system --upgrade pip setuptools wheel
6770
# mltool installs
71+
# c.f. https://github.com/astral-sh/uv/issues/3437
6872
python -m pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
69-
python -m pip install xgboost
70-
python -m pip install 'tritonclient[grpc,http]!=2.41.0'
73+
uv pip install --system xgboost
74+
uv pip install --system 'tritonclient[grpc,http]!=2.41.0'
7175
# install checked out coffea
72-
python -m pip install -q -e '.[dev,parsl,dask,spark]' --upgrade --upgrade-strategy eager
73-
python -m pip list
76+
uv pip install --system -q '.[dev,parsl,dask,spark]' --upgrade
77+
uv pip list --system
7478
java -version
7579
- name: Install dependencies (MacOS)
7680
if: matrix.os == 'macOS-latest'
7781
run: |
78-
python -m pip install --upgrade pip setuptools wheel
82+
uv pip install --system --upgrade pip setuptools wheel
7983
# mltool installs
84+
# c.f. https://github.com/astral-sh/uv/issues/3437
8085
python -m pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
81-
python -m pip install xgboost
86+
uv pip install --system xgboost
8287
# install checked out coffea
83-
python -m pip install -q -e '.[dev,dask,spark]' --upgrade --upgrade-strategy eager
84-
python -m pip list
88+
uv pip install --system -q '.[dev,dask,spark]' --upgrade
89+
uv pip list --system
8590
java -version
8691
- name: Install dependencies (Windows)
8792
if: matrix.os == 'windows-latest'
8893
run: |
89-
python -m pip install --upgrade pip setuptools wheel
94+
uv pip install --system --upgrade pip setuptools wheel
9095
# mltool installs
96+
# c.f. https://github.com/astral-sh/uv/issues/3437
9197
python -m pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
92-
python -m pip install xgboost
98+
uv pip install --system xgboost
9399
# install checked out coffea
94-
python -m pip install -q -e '.[dev,dask]' --upgrade --upgrade-strategy eager
95-
python -m pip list
100+
uv pip install --system -q '.[dev,dask]' --upgrade
101+
uv pip list --system
96102
java -version
97103
98104
- name: Start triton server with example model
@@ -146,10 +152,10 @@ jobs:
146152
- name: Construct conda environment
147153
shell: bash -l {0}
148154
run: |
149-
conda create --yes --prefix ./coffea-conda-test-env -c conda-forge python=${{ matrix.python-version }} ndcctools
155+
conda create --yes --prefix ./coffea-conda-test-env -c conda-forge python=${{ matrix.python-version }} ndcctools uv
150156
conda activate ./coffea-conda-test-env
151-
python -m pip install .
152-
python -m pip install pytest
157+
uv pip install --system .
158+
uv pip install --system pytest
153159
- name: Test with pytest
154160
run: |
155161
conda run --prefix ./coffea-conda-test-env pytest tests/test_taskvine.py
@@ -192,8 +198,7 @@ jobs:
192198
python-version: ${{ matrix.python-version }}
193199
- name: Build package for PyPI
194200
run: |
195-
python -m pip install pip hatch --upgrade
196-
python -m hatch build -t sdist -t wheel
201+
pipx run hatch build -t sdist -t wheel
197202
- name: Publish package to PyPI
198203
uses: pypa/[email protected]
199204
with:

0 commit comments

Comments
 (0)