From 51b0a0bcf03d3950021ba31d790c53290058e437 Mon Sep 17 00:00:00 2001 From: Leif Denby Date: Mon, 3 Jun 2024 18:15:34 +0200 Subject: [PATCH] check versions --- .github/workflows/ci-pdm-install-and-test.yml | 5 ----- .github/workflows/ci-pip-install-and-test-gpu.yml | 5 +++++ .github/workflows/ci-pip-install-and-test.yml | 5 +++++ 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci-pdm-install-and-test.yml b/.github/workflows/ci-pdm-install-and-test.yml index 308cc49b..69fc29d3 100644 --- a/.github/workflows/ci-pdm-install-and-test.yml +++ b/.github/workflows/ci-pdm-install-and-test.yml @@ -27,11 +27,6 @@ jobs: pdm run python -m pip install torch --index-url https://download.pytorch.org/whl/cpu # check that the CPU version is installed - - name: Print and check torch version - run: | - pdm run python -c "import torch; print(torch.__version__)" - pdm run python -c "import torch; assert torch.__version__.endswith('+cpu')" - - name: Install package (including dev dependencies) run: | pdm install diff --git a/.github/workflows/ci-pip-install-and-test-gpu.yml b/.github/workflows/ci-pip-install-and-test-gpu.yml index 2cc168f0..b05b2ecf 100644 --- a/.github/workflows/ci-pip-install-and-test-gpu.yml +++ b/.github/workflows/ci-pip-install-and-test-gpu.yml @@ -22,6 +22,11 @@ jobs: python -m pip install . python -m pip install pytest + - name: Print and check torch version + run: | + python -c "import torch; print(torch.__version__)" + python -c "import torch; assert not torch.__version__.endswith('+cpu')" + - name: Run tests run: | python -m pytest diff --git a/.github/workflows/ci-pip-install-and-test.yml b/.github/workflows/ci-pip-install-and-test.yml index 66ac95ac..b7d0afee 100644 --- a/.github/workflows/ci-pip-install-and-test.yml +++ b/.github/workflows/ci-pip-install-and-test.yml @@ -22,6 +22,11 @@ jobs: python -m pip install . python -m pip install pytest + - name: Print and check torch version + run: | + pdm run python -c "import torch; print(torch.__version__)" + pdm run python -c "import torch; assert torch.__version__.endswith('+cpu')" + - name: Run tests run: | python -m pytest