build: prepare for v0.5.0 #114
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: PyLops-MPI (CuPy) | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| build-mpi: | |
| strategy: | |
| matrix: | |
| rank: ['2','4'] | |
| runs-on: self-hosted | |
| steps: | |
| - name: Check out source repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python environment and Install dependencies and pylops | |
| run: | | |
| python3 -m venv .venv-pylops | |
| # write install scripts | |
| cat << 'EOF' > pylops_tests.sh | |
| #!/bin/bash | |
| PYTHON=.venv-pylops/bin/python3 | |
| PIP=.venv-pylops/bin/pip | |
| ls $PYTHON | |
| ls $PIP | |
| $PIP install --upgrade pip setuptools | |
| $PIP install flake8 pytest setuptools-scm | |
| $PIP install -r requirements-dev.txt | |
| $PIP install cupy-cuda12x | |
| $PYTHON -m setuptools_scm | |
| $PIP install . | |
| EOF | |
| srun --account=yuxilab -n 1 -N 1 --gres=gpu:L40S:1 bash pylops_tests.sh | |
| - name: Tests with pytest | |
| run: | | |
| export CUPY_PYLOPS=1; export TEST_CUPY_PYLOPS=1; export PYLOPS_MPI_CUDA_AWARE=0 | |
| export PYTEST=".venv-pylops/bin/pytest tests/ --with-mpi" | |
| srun --account=yuxilab --mpi=pmix -n ${{matrix.rank}} -N 1 --gres=gpu:L40S:${{matrix.rank}} $PYTEST | |
| echo "done!" | |
| build-nccl: | |
| strategy: | |
| matrix: | |
| rank: ['2','4'] | |
| runs-on: self-hosted | |
| steps: | |
| - name: Check out source repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python environment and Install dependencies and pylops | |
| run: | | |
| python3 -m venv .venv-pylops | |
| # write install scripts | |
| cat << 'EOF' > pylops_tests.sh | |
| #!/bin/bash | |
| PYTHON=.venv-pylops/bin/python3 | |
| PIP=.venv-pylops/bin/pip | |
| ls $PYTHON | |
| ls $PIP | |
| $PIP install --upgrade pip setuptools | |
| $PIP install flake8 pytest setuptools-scm | |
| $PIP install -r requirements-dev.txt | |
| $PIP install cupy-cuda12x nvidia-nccl-cu12 | |
| $PYTHON -m setuptools_scm | |
| $PIP install . | |
| EOF | |
| srun --account=yuxilab -n 1 -N 1 --gres=gpu:L40S:1 bash pylops_tests.sh | |
| - name: Tests with pytest | |
| run: | | |
| export CUPY_PYLOPS=1; | |
| export PYTEST=".venv-pylops/bin/pytest tests_nccl/ --with-mpi" | |
| srun --account=yuxilab --mpi=pmix -n ${{matrix.rank}} -N 1 --gres=gpu:L40S:${{matrix.rank}} $PYTEST | |
| echo "done!" |