Skip to content

Commit f3d0038

Browse files
authored
Merge pull request #102 from Pressio/develop
merge Develop into main
2 parents 5b96867 + 176af0f commit f3d0038

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+4546
-1783
lines changed

.github/workflows/install-and-test.yaml

+50-5
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ on:
77
branches: [main, develop]
88

99
concurrency:
10-
group: CI-${{ github.head_ref }}
11-
cancel-in-progress: true
10+
group: ${{ github.event.repository.name }}-${{ github.ref }}-${{ github.workflow }}
11+
cancel-in-progress: True
1212

1313
jobs:
1414
test:
@@ -17,15 +17,42 @@ jobs:
1717
fail-fast: false # true -> cancel all jobs if any fails
1818
matrix:
1919
python-version: ["3.8", "3.9", "3.10", "3.11"]
20+
mpi: ['mpich','openmpi']
21+
exclude:
22+
- python-version: "3.8"
23+
mpi: 'mpich'
24+
- python-version: "3.9"
25+
mpi: 'mpich'
2026

2127
steps:
22-
- uses: actions/checkout@v3
28+
- name: Check out code
29+
uses: actions/checkout@v3
30+
with:
31+
fetch-depth: 0
32+
33+
- name: Check for MPI tests with invalid rank count
34+
run: |
35+
python $GITHUB_WORKSPACE/helper_scripts/check-mpi-size.py
2336
2437
- name: Set up Python ${{ matrix.python-version }}
2538
uses: actions/setup-python@v4
2639
with:
2740
python-version: ${{ matrix.python-version }}
2841

42+
- name: Setup MPI
43+
uses: mpi4py/setup-mpi@v1
44+
with:
45+
mpi: ${{ matrix.mpi }}
46+
47+
- name: Install mpi4py
48+
run: |
49+
python -m pip install mpi4py
50+
51+
- name: Set Environment Variables
52+
run: |
53+
echo "OMPI_ALLOW_RUN_AS_ROOT=1" >> $GITHUB_ENV
54+
echo "OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1" >> $GITHUB_ENV
55+
2956
- name: Check environment
3057
run: |
3158
echo ======================================================
@@ -49,6 +76,24 @@ jobs:
4976
pip list
5077
pip install .
5178
52-
- name: Run tests
79+
- name: Check Formatting (Pylint)
80+
run: |
81+
pip install pylint
82+
pylint --recursive y --rcfile .pylintrc --output-format=colorized ./romtools
83+
continue-on-error: false
84+
85+
- name: Run tests (Serial)
86+
run: |
87+
pytest --timeout=300
88+
89+
- name: Run tests (MPI, n=1)
90+
run: |
91+
mpirun -n 1 python -m pytest tests/romtools/* --with-mpi --timeout=300
92+
93+
- name: Run tests (MPI, n=3)
94+
run: |
95+
mpirun -n 3 python -m pytest tests/romtools/* --with-mpi --timeout=300
96+
97+
- name: Run tests (MPI, n=4)
5398
run: |
54-
pytest -s
99+
mpirun -n 4 python -m pytest tests/romtools/* --with-mpi --timeout=300

0 commit comments

Comments
 (0)