Skip to content

Improve workflows for CUDA availability #28

Description

@alecandido
          @liweintu the fix I proposed would work, but effectively they are the same of deleting the workflow file.

Here I have two alternatives:

  1. since not all tests require CUDA, just mark those for which is necessary with @pytest.mark.cuda, and filter them in conftest.py according to the value of the environment variable, within pytest_runtest_setup

  2. f you want to run this very same workflow file on a self-hosted runner, then you would have to do something more complex: I don't believe you can access the underlying env vars by default, since for the GitHub runners there are the Variables for that, and it is written explicitly in the docs for the env context

    It does not contain variables inherited by the runner process.

    However, you could run a first preliminary job, read the environment variable within bash code, and set in the $GITHUB_ENV file, this should make it available in the env context (I'm not completely sure myself, I should test it)

Option 1. is much more reasonable to me, because it is more flexible (you could still run some tests everywhere), it's defined in Python, so you're already familiar with it (instead of looking around in GitHub docs), and you can test it offline on various systems, without having to fiddle with GitHub actions.

Originally posted by @alecandido in #24 (review)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions