Add switch to turn adaptivity on and off in configuration #587
Workflow file for this run
This file contains 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: Test adaptivity functionality | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
pull_request: | |
branches: | |
- "*" | |
jobs: | |
adaptivity_integration_tests: | |
name: Run adaptivity integration tests | |
runs-on: ubuntu-latest | |
container: precice/precice:nightly | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
path: micro-manager | |
- name: Install dependencies | |
working-directory: micro-manager | |
run: | | |
apt-get -qq update | |
apt-get -qq install python3-dev python3-pip git python-is-python3 pkg-config | |
python -m pip install --upgrade pip | |
pip install setuptools wheel | |
- name: Install Micro Manager | |
working-directory: micro-manager | |
run: pip3 install --user . | |
- name: Run integration test with local adaptivity | |
timeout-minutes: 3 | |
working-directory: micro-manager/tests/integration/test_unit_cube | |
run: | | |
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH | |
python3 unit_cube.py & python3 run_micro_manager.py --config micro-manager-config-local-adaptivity.json | |
- name: Run integration test with global adaptivity | |
timeout-minutes: 3 | |
working-directory: micro-manager/tests/integration/test_unit_cube | |
run: | | |
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH | |
python3 unit_cube.py & python3 run_micro_manager.py --config micro-manager-config-global-adaptivity.json | |
adaptivity_unit_tests_serial: | |
name: Run adaptivity unit tests in serial | |
runs-on: ubuntu-latest | |
container: precice/precice:nightly | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
path: micro-manager | |
- name: Install Dependencies | |
working-directory: micro-manager | |
run: | | |
apt-get -qq update | |
apt-get -qq install python3-dev python3-pip git python-is-python3 pkg-config | |
python -m pip install --upgrade pip | |
pip install setuptools wheel | |
- name: Install Micro Manager | |
working-directory: micro-manager | |
run: pip3 install --user . | |
- name: Run unit tests | |
working-directory: micro-manager/tests/unit | |
run: python3 -m unittest test_adaptivity_serial.py | |
adaptivity_unit_tests_parallel: | |
name: Run adaptivity unit tests in parallel | |
runs-on: ubuntu-latest | |
container: precice/precice:nightly | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
path: micro-manager | |
- name: Install sudo for MPI | |
working-directory: micro-manager | |
run: | | |
apt-get -qq update | |
apt-get -qq install sudo | |
- name: Use mpi4py | |
uses: mpi4py/setup-mpi@v1 | |
- name: Install Dependencies | |
working-directory: micro-manager | |
run: | | |
apt-get -qq update | |
apt-get -qq install python3-dev python3-pip git python-is-python3 pkg-config | |
python -m pip install --upgrade pip | |
pip install setuptools wheel twine | |
- name: Install Micro Manager | |
working-directory: micro-manager | |
run: pip3 install --user . | |
- name: Run unit tests | |
working-directory: micro-manager/tests/unit | |
run: mpiexec -n 2 --allow-run-as-root python3 -m unittest test_adaptivity_parallel.py |