Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build and push CI Docker image

on:
push:
branches:
- develop
paths:
- "Dockerfile"
- "pyproject.toml"
workflow_dispatch:

jobs:
build-and-push:
name: Build and push Docker image
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Log in to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: precice/micro-manager-ci:latest
75 changes: 75 additions & 0 deletions .github/workflows/run-adaptivity-parallel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Test adaptivity functionality in parallel
on:
push:
branches:
- main
- develop
pull_request:
branches:
- "*"
jobs:
integration_tests:
name: Integration tests
runs-on: ubuntu-latest
container: precice/micro-manager-ci:latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: micro-manager

- name: Create a virtual environment and install Micro Manager in it
working-directory: micro-manager
run: |
python3 -m venv .venv
. .venv/bin/activate
pip install .

- name: Run integration test with global adaptivity in parallel
timeout-minutes: 3
working-directory: micro-manager
run: |
. .venv/bin/activate
cd tests/integration/test_unit_cube/
mpiexec -n 2 --allow-run-as-root micro-manager-precice micro-manager-config-global-adaptivity-parallel.json &
python3 unit_cube.py 2

unit_tests:
name: Unit tests
runs-on: ubuntu-latest
container: precice/micro-manager-ci:latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
path: micro-manager

- name: Create a virtual environment and install Micro Manager in it
working-directory: micro-manager
run: |
python3 -m venv .venv
. .venv/bin/activate
pip install .

- name: Run unit tests
working-directory: micro-manager
run: |
. .venv/bin/activate
cd tests/unit
mpiexec -n 2 --allow-run-as-root python3 -m unittest test_adaptivity_parallel.py

- name: Run load balancing unit tests with 2 ranks
timeout-minutes: 3
working-directory: micro-manager
run: |
. .venv/bin/activate
cd tests/unit
mpiexec -n 2 --allow-run-as-root python3 -m unittest test_global_adaptivity_lb.py

- name: Run load balancing tests with 4 ranks
timeout-minutes: 3
working-directory: micro-manager
run: |
. .venv/bin/activate
cd tests/unit
mpiexec -n 4 --allow-run-as-root --oversubscribe python3 -m unittest test_global_adaptivity_lb.py
51 changes: 51 additions & 0 deletions .github/workflows/run-adaptivity-serial.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Test adaptivity functionality in serial
on:
push:
branches:
- main
- develop
pull_request:
branches:
- "*"
jobs:
unit_and_integration_tests:
name: Unit and integration tests
runs-on: ubuntu-latest
container: precice/micro-manager-ci:latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: micro-manager

- name: Create a virtual environment and install the Micro Manager in it
working-directory: micro-manager
run: |
python3 -m venv .venv
. .venv/bin/activate
pip install .

- name: Run integration test with local adaptivity
timeout-minutes: 3
working-directory: micro-manager
run: |
. .venv/bin/activate
cd tests/integration/test_unit_cube
micro-manager-precice micro-manager-config-local-adaptivity.json &
python3 unit_cube.py 2

- name: Run integration test with global adaptivity
timeout-minutes: 3
working-directory: micro-manager
run: |
. .venv/bin/activate
cd tests/integration/test_unit_cube
micro-manager-precice micro-manager-config-global-adaptivity.json &
python3 unit_cube.py 2

- name: Run adaptivity unit tests in serial
working-directory: micro-manager
run: |
. .venv/bin/activate
cd tests/unit
python3 -m unittest test_adaptivity_serial.py
10 changes: 2 additions & 8 deletions .github/workflows/run-domain-decomposition-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,13 @@ jobs:
unit_tests:
name: Run domain decomposition unit tests
runs-on: ubuntu-latest
container: precice/precice:nightly
container: precice/micro-manager-ci:latest
steps:
- name: Checkout Repository
uses: actions/checkout@v6
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-venv git pkg-config

- name: Create a virtual environment and install the Micro Manager in it
working-directory: micro-manager
run: |
Expand Down
70 changes: 70 additions & 0 deletions .github/workflows/run-dummy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Run Python and C++ dummy
on:
push:
branches:
- main
- develop
pull_request:
branches:
- "*"
jobs:
run_dummy:
name: Run dummy
runs-on: ubuntu-latest
container: precice/micro-manager-ci:latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
path: micro-manager

- name: Create a virtual environment and install Micro Manager in it
timeout-minutes: 6
working-directory: micro-manager
run: |
python3 -m venv .venv
. .venv/bin/activate
pip install .

- name: Run python dummy
timeout-minutes: 3
working-directory: micro-manager
run: |
. .venv/bin/activate
cd examples/
micro-manager-precice micro-manager-python-config.json &
python3 macro_dummy.py no_adaptivity
./clean-example.sh

- name: Run python dummy with adaptivity
timeout-minutes: 3
working-directory: micro-manager
run: |
. .venv/bin/activate
cd examples/
micro-manager-precice micro-manager-python-adaptivity-config.json &
python3 macro_dummy.py adaptivity
./clean-example.sh

- name: Run C++ dummy
timeout-minutes: 3
working-directory: micro-manager
run: |
. .venv/bin/activate
cd examples/cpp-dummy/
pip install pybind11
c++ -O3 -Wall -shared -std=c++11 -fPIC $(python3 -m pybind11 --includes) micro_cpp_dummy.cpp -o micro_dummy$(python3-config --extension-suffix)
cd ../
micro-manager-precice micro-manager-cpp-config.json &
python3 macro_dummy.py no_adaptivity
./clean-example.sh

- name: Run adaptive C++ dummy
timeout-minutes: 3
working-directory: micro-manager
run: |
. .venv/bin/activate
cd examples/
micro-manager-precice micro-manager-cpp-adaptivity-config.json &
python3 macro_dummy.py adaptivity
./clean-example.sh
42 changes: 2 additions & 40 deletions .github/workflows/run-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,50 +10,12 @@ on:
jobs:
unit_tests:
runs-on: ubuntu-latest
container: precice/precice:nightly
container: precice/micro-manager-ci:latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v4
with:
path: micro-manager

- name: Install dependencies
run: |
apt-get -qq update
apt-get -qq install python3-dev python3-venv git pkg-config
apt-get -qq install wget build-essential

- name: Load Cache OpenMPI 5
id: ompi-cache-load
uses: actions/cache/restore@v5
with:
path: ~/openmpi
key: openmpi-v5-${{ runner.os }}-build

- name: Build OpenMPI 5
if: steps.ompi-cache-load.outputs.cache-hit != 'true'
run: |
wget https://download.open-mpi.org/release/open-mpi/v5.0/openmpi-5.0.5.tar.gz
tar -xzf openmpi-5.0.5.tar.gz
cd openmpi-5.0.5
mkdir -p ~/openmpi
./configure --prefix=$HOME/openmpi
make -j$(nproc)
make install

- name: Save OpenMPI 5 to cache
if: steps.ompi-cache.outputs.cache-hit != 'true'
id: ompi-cache-store
uses: actions/cache/save@v5
with:
path: ~/openmpi
key: openmpi-v5-${{ runner.os }}-build

- name: Configure OpenMPI
run: |
cp -r ~/openmpi/* /usr/local/
ldconfig
which mpiexec
mpiexec --version

- name: Create a virtual environment and install Micro Manager in it
timeout-minutes: 6
Expand Down
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM precice/precice:nightly

RUN apt-get -qq update && apt-get -qq install -y \
sudo \
python3-dev \
python3-venv \
git \
pkg-config \
pybind11-dev \
libopenmpi-dev \
openmpi-bin \
&& rm -rf /var/lib/apt/lists/*

RUN pip install mpi4py

WORKDIR /micro-manager
Loading