Skip to content

Commit

Permalink
(fix): gpu ci uses max version from pyproject.toml (#1714)
Browse files Browse the repository at this point in the history
* (fix): gpu ci uses max version from `pyproject.toml`

* (fix): add back comments

* (fix): install cargo

* (chore): `apt-get update`

* (fix): do extraction + package fetch in one step

* (fix): use cargo install action

* (fix): add to path and install via `apt-get`

* (Fix): try `/home/runnerx`

* (fix): try expporting cargo path ahead of time

* (fix): try something new

* (fix): try yq

* (fix): right, cant use python first

* (fix): sudo snap

* (fix): remove redirection

* (fix): multiple quotes

* (fix): use full args + capture group

* (fix): simplify regex a bit more

* (fix): remove `crate`
  • Loading branch information
ilan-gold authored Oct 15, 2024
1 parent 27eaf39 commit 996b172
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/test-gpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,20 @@ jobs:
- name: Nvidia SMI sanity check
run: nvidia-smi

- name: Install yq
run: |
sudo snap install yq
- name: Extract max Python version from classifiers
run: |
classifiers=$(yq .project.classifiers pyproject.toml -oy | grep --only-matching --perl-regexp '(?<=Python :: )(\d\.\d+)')
max_version=$(echo "$classifiers" | sort -V | tail -1)
echo "max_python_version=$max_version" >> $GITHUB_ENV
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
python-version: ${{ env.max_python_version }}

- name: Install UV
uses: hynek/setup-cached-uv@v2
Expand Down

0 comments on commit 996b172

Please sign in to comment.