Skip to content

Commit

Permalink
FIX-#394: Fix CI running on Windows (#395)
Browse files Browse the repository at this point in the history
Signed-off-by: Igoshev, Iaroslav <[email protected]>
  • Loading branch information
YarShev authored Nov 14, 2023
1 parent 1e92702 commit 8342245
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 21 deletions.
37 changes: 19 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ on:
paths:
- .github/workflows/**
- unidist/**
- environment.yml
- environment_linux.yml
- environment_win.yml
- requirements.txt
- setup.cfg
- setup.py
Expand Down Expand Up @@ -46,17 +47,17 @@ jobs:

test-all:
needs: [lint-black, lint-flake8]
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
strategy:
matrix:
os:
- ubuntu
- windows
python-version: ["3.8", "3.9"]
backend: ["ray", "mpi", "dask", "pymp", "pyseq"]
runs-on: ${{ matrix.os }}-latest
defaults:
run:
shell: bash -l {0}
env:
UNIDIST_BACKEND: ${{matrix.backend}}
name: test-${{ matrix.os }} (backend ${{matrix.backend}}, python ${{matrix.python-version}})
Expand All @@ -67,7 +68,7 @@ jobs:
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: unidist
environment-file: environment.yml
environment-file: ${{ matrix.os == 'ubuntu' && 'environment_linux.yml' || matrix.os == 'windows' && 'environment_win.yml' }}
python-version: ${{matrix.python-version}}
channel-priority: strict
# we set use-only-tar-bz2 to false in order for conda to properly find new packages to be installed
Expand Down Expand Up @@ -98,18 +99,18 @@ jobs:
# disabled shared object store on Windows as
# msmpi doesn't support the shared memory feature.
- run: UNIDIST_MPI_SHARED_OBJECT_STORE=True mpiexec -n 1 --oversubscribe python -m pytest unidist/test/test_actor.py
if: matrix.backend == 'mpi' && matrix.os != 'windows'
- run: UNIDIST_MPI_SHARED_OBJECT_STORE=False mpiexec -n 1 --oversubscribe python -m pytest unidist/test/test_actor.py
if: matrix.backend == 'mpi'
if: matrix.backend == 'mpi' && matrix.os == 'ubuntu'
- run: UNIDIST_MPI_SHARED_OBJECT_STORE=False mpiexec -n 1 python -m pytest unidist/test/test_actor.py
if: matrix.backend == 'mpi' && matrix.os == 'windows'
- run: UNIDIST_MPI_SHARED_OBJECT_STORE=True mpiexec -n 1 --oversubscribe python -m pytest unidist/test/test_async_actor.py
if: matrix.backend == 'mpi' && matrix.os != 'windows'
- run: UNIDIST_MPI_SHARED_OBJECT_STORE=False mpiexec -n 1 --oversubscribe python -m pytest unidist/test/test_async_actor.py
if: matrix.backend == 'mpi'
if: matrix.backend == 'mpi' && matrix.os == 'ubuntu'
- run: UNIDIST_MPI_SHARED_OBJECT_STORE=False mpiexec -n 1 python -m pytest unidist/test/test_async_actor.py
if: matrix.backend == 'mpi' && matrix.os == 'windows'
- run: UNIDIST_MPI_SHARED_OBJECT_STORE=True mpiexec -n 1 --oversubscribe python -m pytest unidist/test/test_task.py
if: matrix.backend == 'mpi' && matrix.os != 'windows'
- run: UNIDIST_MPI_SHARED_OBJECT_STORE=False mpiexec -n 1 --oversubscribe python -m pytest unidist/test/test_task.py
if: matrix.backend == 'mpi'
if: matrix.backend == 'mpi' && matrix.os == 'ubuntu'
- run: UNIDIST_MPI_SHARED_OBJECT_STORE=False mpiexec -n 1 python -m pytest unidist/test/test_task.py
if: matrix.backend == 'mpi' && matrix.os == 'windows'
- run: UNIDIST_MPI_SHARED_OBJECT_STORE=True mpiexec -n 1 --oversubscribe python -m pytest unidist/test/test_general.py
if: matrix.backend == 'mpi' && matrix.os != 'windows'
- run: UNIDIST_MPI_SHARED_OBJECT_STORE=False mpiexec -n 1 --oversubscribe python -m pytest unidist/test/test_general.py
if: matrix.backend == 'mpi'
if: matrix.backend == 'mpi' && matrix.os == 'ubuntu'
- run: UNIDIST_MPI_SHARED_OBJECT_STORE=False mpiexec -n 1 python -m pytest unidist/test/test_general.py
if: matrix.backend == 'mpi' && matrix.os == 'windows'
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ formats:
# If we tried to install mpi4py from PyPI, installation would fail because
# mpi4py requires a working MPI implementation installed beforehand.
conda:
environment: environment.yml
environment: environment_linux.yml
5 changes: 3 additions & 2 deletions docs/developer/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ dependencies for running the tests and formatting the code:

.. code-block:: bash
conda env create --file environment.yml
conda env create --file environment_linux.yml # for Linux
conda env create --file environment_win.yml # for Windows
# or
pip install -r requirements.txt
Expand Down Expand Up @@ -170,7 +171,7 @@ Building documentation
----------------------

To build the documentation, please follow the steps below from the project root (it is supposed you have
dependencies from ``environment.yml`` or ``requirements.txt`` installed):
dependencies from ``environment_linux.yml`` or ``environment_win.yml`` or ``requirements.txt`` installed):

.. code-block:: bash
Expand Down
File renamed without changes.
27 changes: 27 additions & 0 deletions environment_win.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: unidist
channels:
- conda-forge
dependencies:
# for development
# https://github.com/modin-project/unidist/issues/324
- pydantic<2
- ray-default>=1.13.0
- dask>=2.22.0
- distributed>=2.22.0
- mpi4py>=3.0.3
- msmpi
- msgpack-python>=1.0.0
- cloudpickle
- packaging
- cython
- psutil
- pytest
# for downloading packages from PyPI
- pip
- pip:
# for building the documentation
- sphinx
- sphinx_rtd_theme
# for code checks
- black
- flake8

0 comments on commit 8342245

Please sign in to comment.