fix: add platform markers to GPU extras, use --extra cpu in CI, simplify lockfile workflow

- rocm/intel/gpu extras are x86_64-only; aarch64 wheels don't exist so uv
  failed to resolve them when required-environments includes aarch64
- test.yml: switch from --all-extras (broken by conflicts + missing wheels)
  to --extra cpu which is cross-platform and sufficient for unit tests
- update-lockfile.yml: drop old file-swap loop; single pyproject means a
  single uv lock run and a single uv.lock to commit
This commit is contained in:
2026-06-14 20:04:25 +00:00
parent e2a1924fb0
commit 02c56493f6
3 changed files with 14 additions and 31 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ jobs:
run: uv python install 3.13
- name: Install dependencies
run: uv sync --all-extras
run: uv sync --extra cpu
- name: Run tests
run: uv run pytest
+7 -27
View File
@@ -1,5 +1,5 @@
# .github/workflows/update-lockfile.yml
name: Update lockfiles
name: Update lockfile
on:
push:
@@ -7,9 +7,6 @@ on:
- '**'
paths:
- 'pyproject.toml'
- 'pyproject-cpu.toml'
- 'pyproject-rocm.toml'
- 'pyproject-intel.toml'
workflow_dispatch:
jobs:
@@ -18,14 +15,6 @@ jobs:
permissions:
contents: write
steps:
- name: Free up disk space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
echo "Disk space freed."
- name: Checkout repository
uses: actions/checkout@v6
@@ -35,32 +24,23 @@ jobs:
- name: Set up Python
run: uv python install 3.13
- name: Regenerate all lockfiles
run: |
cp pyproject.toml _pyproject_orig.toml
for variant in cpu rocm intel; do
cp pyproject-${variant}.toml pyproject.toml
uv lock
cp uv.lock uv-${variant}.lock
done
cp _pyproject_orig.toml pyproject.toml
uv lock
rm _pyproject_orig.toml
- name: Regenerate lockfile
run: uv lock
- name: Check for changes
id: diff
run: |
if git diff --quiet uv.lock uv-cpu.lock uv-rocm.lock uv-intel.lock; then
if git diff --quiet uv.lock; then
echo "changed=false" >> "$GITHUB_OUTPUT"
else
echo "changed=true" >> "$GITHUB_OUTPUT"
fi
- name: Commit and push updated lockfiles
- name: Commit and push updated lockfile
if: steps.diff.outputs.changed == 'true'
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add uv.lock uv-cpu.lock uv-rocm.lock uv-intel.lock
git commit -m "chore: update lockfiles"
git add uv.lock
git commit -m "chore: update lockfile"
git push
+6 -3
View File
@@ -26,9 +26,12 @@ dependencies = [
]
[project.optional-dependencies]
gpu = ["onnxruntime-gpu>=1.23.2", "nvidia-cudnn-cu12>=9.0.0"]
rocm = ["onnxruntime-rocm>=1.16.0"]
intel = ["onnxruntime-openvino>=1.20.0"]
gpu = [
"onnxruntime-gpu>=1.23.2; sys_platform == 'linux' and platform_machine == 'x86_64'",
"nvidia-cudnn-cu12>=9.0.0; sys_platform == 'linux' and platform_machine == 'x86_64'",
]
rocm = ["onnxruntime-rocm>=1.16.0; sys_platform == 'linux' and platform_machine == 'x86_64'"]
intel = ["onnxruntime-openvino>=1.20.0; sys_platform == 'linux' and platform_machine == 'x86_64'"]
cpu = ["onnxruntime>=1.23.2"]
[project.scripts]