Skip to content

Commit dde98dd

Browse files
committed
push self-hosted runner logic
1 parent b665330 commit dde98dd

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

.github/workflows/build_cupy.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: PyLops Testing (CuPy)
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
strategy:
8+
matrix:
9+
rank: ['2','4']
10+
runs-on: self-hosted
11+
steps:
12+
- name: Check out source repository
13+
uses: actions/checkout@v4
14+
- name: Set up Python environment and Install dependencies and pylops
15+
run: |
16+
python3 -m venv .venv-pylops
17+
# write install scripts
18+
cat << 'EOF' > pylops_tests.sh
19+
#!/bin/bash
20+
PYTHON=.venv-pylops/bin/python3
21+
PIP=.venv-pylops/bin/pip
22+
ls $PYTHON
23+
ls $PIP
24+
$PIP install --upgrade pip setuptools
25+
$PIP install flake8 pytest setuptools-scm
26+
$PIP install -r requirements-dev.txt
27+
$PIP install cupy-cuda12x
28+
$PYTHON -m setuptools_scm
29+
$PIP install .
30+
EOF
31+
srun --account=yuxilab -n 1 -N 1 --gres=gpu:L40S:1 bash pylops_tests.sh
32+
- name: Tests with pytest
33+
run: |
34+
export CUPY_PYLOPS=1; export TEST_CUPY_PYLOPS=1; export PYLOPS_MPI_CUDA_AWARE=0
35+
export PYTEST=.venv-pylops/bin/pytest
36+
srun --account=yuxilab -n ${{matrix.rank}} -N 1 --gres=gpu:L40S:${{matrix.rank}} $PYTEST
37+
echo "done!"

0 commit comments

Comments
 (0)