Build/CI: modernize build/doc/ci #320
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 Testing (CuPy) | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| push: | |
| branches: | |
| - main | |
| - dev | |
| jobs: | |
| build: | |
| 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 | |
| $PIP install --upgrade pip setuptools | |
| $PIP install install flake8 pytest setuptools-scm | |
| $PIP install -r requirements-dev-gpu.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 PYTEST=.venv-pylops/bin/pytest | |
| srun --account=yuxilab -n 1 -N 1 --gres=gpu:L40S:1 $PYTEST | |
| echo "done!" |