diff --git a/.github/workflows/ci.yml.jinja b/.github/workflows/ci.yml.jinja index 828fdbd..0229be1 100755 --- a/.github/workflows/ci.yml.jinja +++ b/.github/workflows/ci.yml.jinja @@ -1,3 +1,4 @@ +{%- set effective_cuda_version = cuda_version if pytorch_cuda_preset == 'custom' else pytorch_cuda_preset.split('-cuda-')[1] -%} name: CI on: @@ -5,6 +6,13 @@ on: branches: [main] pull_request: branches: [main] +{%- if package_manager == "pixi" %} + +env: + # GPU-less runners cannot satisfy the cuda system-requirement; + # pixi >= 0.76 refuses to solve without this mock. + CONDA_OVERRIDE_CUDA: "{{ effective_cuda_version }}" +{%- endif %} jobs: {%- if use_ruff or use_ty %} diff --git a/.github/workflows/test-template.yml b/.github/workflows/test-template.yml index fe03466..5b8b232 100755 --- a/.github/workflows/test-template.yml +++ b/.github/workflows/test-template.yml @@ -6,6 +6,12 @@ on: pull_request: workflow_dispatch: +env: + # GPU-less runners cannot satisfy the generated project's cuda + # system-requirement; pixi >= 0.76 refuses to solve without this mock. + # Keep in sync with the CUDA version of the matrix pytorch-presets. + CONDA_OVERRIDE_CUDA: "12.6" + jobs: test-generation: name: Test Template Generation diff --git a/.github/workflows/test.yml.jinja b/.github/workflows/test.yml.jinja index dad2ac3..19be54b 100755 --- a/.github/workflows/test.yml.jinja +++ b/.github/workflows/test.yml.jinja @@ -1,3 +1,4 @@ +{%- set effective_cuda_version = cuda_version if pytorch_cuda_preset == 'custom' else pytorch_cuda_preset.split('-cuda-')[1] -%} name: Tests on: @@ -5,6 +6,13 @@ on: branches: [main] pull_request: branches: [main] +{%- if package_manager == "pixi" %} + +env: + # GPU-less runners cannot satisfy the cuda system-requirement; + # pixi >= 0.76 refuses to solve without this mock. + CONDA_OVERRIDE_CUDA: "{{ effective_cuda_version }}" +{%- endif %} jobs: {%- if use_pytest %}