Skip to content

Commit

Permalink
Merge pull request #1090 from matthewfeickert/ci/use-uv-for-pip-installs
Browse files Browse the repository at this point in the history
ci: Use uv for all pip installs
  • Loading branch information
lgray committed May 8, 2024
2 parents f529771 + c309b62 commit 5e94b87
Showing 1 changed file with 23 additions and 18 deletions.
41 changes: 23 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,39 +60,45 @@ jobs:
run: |
echo "INSTALL_EXTRAS='[dev,parsl,dask,servicex]'" >> $GITHUB_ENV
- name: Install uv
run: python -m pip install --upgrade uv

- name: Install dependencies (Linux)
if: matrix.os == 'ubuntu-latest'
run: |
python -m pip install --upgrade pip setuptools wheel
uv pip install --system --upgrade pip setuptools wheel
# mltool installs
# c.f. https://github.com/astral-sh/uv/issues/3437
python -m pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
python -m pip install xgboost
python -m pip install 'tritonclient[grpc,http]!=2.41.0'
uv pip install --system xgboost
uv pip install --system 'tritonclient[grpc,http]!=2.41.0'
# install checked out coffea
python -m pip install -q -e '.[dev,parsl,dask,spark]' --upgrade --upgrade-strategy eager
python -m pip list
uv pip install --system -q '.[dev,parsl,dask,spark]' --upgrade
uv pip list --system
java -version
- name: Install dependencies (MacOS)
if: matrix.os == 'macOS-latest'
run: |
python -m pip install --upgrade pip setuptools wheel
uv pip install --system --upgrade pip setuptools wheel
# mltool installs
# c.f. https://github.com/astral-sh/uv/issues/3437
python -m pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
python -m pip install xgboost
uv pip install --system xgboost
# install checked out coffea
python -m pip install -q -e '.[dev,dask,spark]' --upgrade --upgrade-strategy eager
python -m pip list
uv pip install --system -q '.[dev,dask,spark]' --upgrade
uv pip list --system
java -version
- name: Install dependencies (Windows)
if: matrix.os == 'windows-latest'
run: |
python -m pip install --upgrade pip setuptools wheel
uv pip install --system --upgrade pip setuptools wheel
# mltool installs
# c.f. https://github.com/astral-sh/uv/issues/3437
python -m pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
python -m pip install xgboost
uv pip install --system xgboost
# install checked out coffea
python -m pip install -q -e '.[dev,dask]' --upgrade --upgrade-strategy eager
python -m pip list
uv pip install --system -q '.[dev,dask]' --upgrade
uv pip list --system
java -version
- name: Start triton server with example model
Expand Down Expand Up @@ -146,10 +152,10 @@ jobs:
- name: Construct conda environment
shell: bash -l {0}
run: |
conda create --yes --prefix ./coffea-conda-test-env -c conda-forge python=${{ matrix.python-version }} ndcctools
conda create --yes --prefix ./coffea-conda-test-env -c conda-forge python=${{ matrix.python-version }} ndcctools uv
conda activate ./coffea-conda-test-env
python -m pip install .
python -m pip install pytest
uv pip install --system .
uv pip install --system pytest
- name: Test with pytest
run: |
conda run --prefix ./coffea-conda-test-env pytest tests/test_taskvine.py
Expand Down Expand Up @@ -192,8 +198,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Build package for PyPI
run: |
python -m pip install pip hatch --upgrade
python -m hatch build -t sdist -t wheel
pipx run hatch build -t sdist -t wheel
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@v1.8.14
with:
Expand Down

0 comments on commit 5e94b87

Please sign in to comment.