Skip to content
Draft
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
79 changes: 25 additions & 54 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,74 +1,45 @@
FROM ubuntu:20.04
FROM ubuntu:24.04

ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/Berlin
ENV PYENV_ROOT="/opt/.pyenv"
ENV PATH="$PYENV_ROOT/bin:$PATH"
ENV PATH="/opt/.pyenv/versions/3.9.1/bin/:$PATH"
ENV DISPLAY=:1
ENV XDG_RUNTIME_DIR=/tmp/runtime-root

RUN unset Qt5_DIR ParaView_DIR ROOT_INCLUDE_PATH CMAKE_PREFIX_PATH PYENV_ROOT BDMSYS CC CXX

RUN apt-get -y update && \
apt-get -y install apt-utils software-properties-common python python3 git curl make gcc g++ wget \
wamerican libffi-dev libncurses5-dev zlib1g zlib1g-dev bzip2 aptitude libreadline-dev libssl-dev \
libsqlite3-dev openmpi-bin libopenmpi-dev libxkbcommon-x11-dev bsdmainutils clang clang-format \
clang-tidy doxygen graphviz libxml2-dev llvm-7 llvm-7-dev llvm-7-runtime valgrind libgsl-dev \
freeglut3-dev libbz2-dev libnuma-dev libomp5 libomp-dev libpthread-stubs0-dev zlib1g-dev \
libffi-dev liblzma-dev libreadline-dev libsqlite3-dev libssl-dev python-openssl tk-dev xz-utils \
zlib1g-dev sudo libblas-dev liblapack-dev nano locales locales-all ninja-build python3-pip \
freeglut3-dev valgrind xvfb libtbb-dev \
x11vnc fluxbox websockify \
novnc dbus-x11 x11-utils x11-xserver-utils xterm && \
dpkg-reconfigure locales && locale-gen && \
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates cmake curl fluxbox g++ gcc git libblas-dev libboost-dev \
libdouble-conversion-dev liblapack-dev libnuma-dev libomp-dev \
libopenmpi-dev libutfcpp-dev ninja-build novnc openmpi-bin paraview \
paraview-dev python3 sudo websockify wget x11-utils x11vnc \
x11-xserver-utils xterm xvfb && \
apt-get clean && rm -rf /var/lib/apt/lists/*

RUN curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash && \
eval "$(pyenv init --path)" && \
eval "$(pyenv init -)" && \
PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install 3.9.1 && \
pyenv global 3.9.1 && \
pyenv shell 3.9.1

RUN wget https://bootstrap.pypa.io/get-pip.py && \
python3 get-pip.py && \
python3 -m pip install -U pip && \
python3 -m pip install numpy

RUN pip install 'cmake<4'

RUN git config --system user.name "Test User" && \
git config --system user.email user@test.com

RUN export BDM_BRANCH="master" && \
git clone https://github.com/BioDynaMo/biodynamo.git && \
cd biodynamo && \
git checkout $BDM_BRANCH && \
git rev-parse HEAD > /commit_hash.txt && \
cat /commit_hash.txt && \
mkdir build && \
cd build && \
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -Dtest=OFF -Dgtest=OFF -Dbenchmark=OFF \
-Dparaview=ON -DCMAKE_POLICY_DEFAULT_CMP0048=NEW -DCMAKE_POLICY_DEFAULT_CMP0054=NEW \
-DCMAKE_POLICY_DEFAULT_CMP0056=NEW -DCMAKE_POLICY_DEFAULT_CMP0066=NEW \
-DCMAKE_POLICY_DEFAULT_CMP0067=NEW -DCMAKE_POLICY_DEFAULT_CMP0074=NEW .. && \
ninja -j $(($(nproc) - 1))
RUN git clone --depth 1 --branch master https://github.com/BioDynaMo/biodynamo.git /biodynamo && \
cmake -S /biodynamo -B /biodynamo/build -G Ninja \
-Dbenchmark=OFF \
-Dcuda=OFF \
-Dlibgit2=OFF \
-Dopencl=OFF \
-Dparaview=ON \
-Dsbml=OFF \
-Dtest=OFF \
-Dvalgrind=OFF \
-DCMAKE_BUILD_TYPE=Release && \
cmake --build /biodynamo/build --parallel

RUN useradd -m -s /bin/bash codespace && \
echo "codespace ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers

RUN mkdir -p /tmp/runtime-root && chmod 700 /tmp/runtime-root
echo "codespace ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers && \
mkdir -p /tmp/runtime-root /opt/scripts && \
chmod 700 /tmp/runtime-root

RUN echo 'source /biodynamo/build/bin/thisbdm.sh 2>/dev/null' >> /etc/bash.bashrc

COPY novnc-index.html /usr/share/novnc/index.html

RUN mkdir -p /opt/scripts
COPY start-vnc.sh /opt/scripts/start-vnc.sh
RUN chmod +x /opt/scripts/start-vnc.sh
COPY demo-picker.sh /opt/scripts/demo-picker.sh
RUN chmod +x /opt/scripts/demo-picker.sh
COPY start-vnc.sh demo-picker.sh /opt/scripts/
RUN chmod +x /opt/scripts/start-vnc.sh /opt/scripts/demo-picker.sh

COPY paraview-wrapper.sh /usr/local/bin/paraview
RUN chmod +x /usr/local/bin/paraview
4 changes: 1 addition & 3 deletions .devcontainer/paraview-wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ echo "Switch to the port 6080 browser tab to see the GUI."
echo "If not open yet: Ports tab -> 6080 -> Open in Browser"
echo ""

# Find the real paraview binary (skip this wrapper)
REAL_PARAVIEW=$(which -a paraview | grep -v /usr/local/bin | head -1)
exec "$REAL_PARAVIEW" "$@"
exec /usr/bin/paraview "$@"
11 changes: 0 additions & 11 deletions .github/workflows/README.md

This file was deleted.

173 changes: 173 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
name: CI

on:
push:
pull_request:
branches: [master]
schedule:
- cron: '0 3 * * *'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
linux:
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, ubuntu-24.04]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
libblas-dev libboost-dev liblapack-dev libnuma-dev libomp-dev \
libopenmpi-dev ninja-build
- name: Configure
run: |
cmake -S . -B build -G Ninja \
-Dbenchmark=OFF \
-Dcuda=OFF \
-Dlibgit2=OFF \
-Dopencl=OFF \
-Dparaview=OFF \
-Dsbml=OFF \
-Dvalgrind=OFF \
-DCMAKE_BUILD_TYPE=Release
- name: Build
run: cmake --build build --parallel
- name: Test
run: cmake --build build --target run-unit-tests

macos:
strategy:
fail-fast: false
matrix:
os: [macos-14, macos-15]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: brew install boost cmake libomp ninja open-mpi
- name: Configure
run: |
cmake -S . -B build -G Ninja \
-Dbenchmark=OFF \
-Dcuda=OFF \
-Dlibgit2=OFF \
-Dopencl=OFF \
-Dparaview=OFF \
-Dsbml=OFF \
-Dvalgrind=OFF \
-DCMAKE_BUILD_TYPE=Release
- name: Build
run: cmake --build build --parallel
- name: Test
run: cmake --build build --target run-unit-tests

paraview:
runs-on: ubuntu-24.04
env:
QT_QPA_PLATFORM: offscreen
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
libblas-dev libboost-dev liblapack-dev libomp-dev \
libdouble-conversion-dev libopenmpi-dev libutfcpp-dev ninja-build \
paraview paraview-dev
- name: Configure
run: |
cmake -S . -B build -G Ninja \
-Dbenchmark=OFF \
-Dcuda=OFF \
-Dlibgit2=OFF \
-Dnuma=OFF \
-Dopencl=OFF \
-Dparaview=ON \
-Dsbml=OFF \
-Dvalgrind=OFF \
-DCMAKE_BUILD_TYPE=Release
- name: Build
run: cmake --build build --parallel
- name: Test
run: cmake --build build --target run-unit-tests

sanitizers:
runs-on: ubuntu-24.04
env:
ASAN_OPTIONS: detect_leaks=1:halt_on_error=1
UBSAN_OPTIONS: halt_on_error=1:print_stacktrace=1
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
libblas-dev libboost-dev liblapack-dev libomp-dev \
libopenmpi-dev ninja-build
- name: Configure
run: |
cmake -S . -B build -G Ninja \
-Dbenchmark=OFF \
-Dcuda=OFF \
-Dlibgit2=OFF \
-Dnuma=OFF \
-Dopencl=OFF \
-Dparaview=OFF \
-Dsbml=OFF \
-Dvalgrind=OFF \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_C_FLAGS='-fsanitize=address,undefined -fno-omit-frame-pointer' \
-DCMAKE_CXX_FLAGS='-fsanitize=address,undefined -fno-omit-frame-pointer' \
-DCMAKE_EXE_LINKER_FLAGS='-fsanitize=address,undefined' \
-DCMAKE_SHARED_LINKER_FLAGS='-fsanitize=address,undefined'
- name: Build
run: cmake --build build --parallel
- name: Test
run: cmake --build build --target run-unit-tests

singularity:
runs-on: ubuntu-24.04
container:
image: quay.io/singularity/singularity:v3.9.0
options: --privileged --workdir /data
steps:
- uses: actions/checkout@v4
- name: Configure fakeroot
run: |
echo root:100000:65536 >> /etc/subuid
echo root:100000:65536 >> /etc/subgid
- name: Build image
run: singularity build --fakeroot biodynamo.sif Singularity
- name: Run demo
run: |
singularity exec --cleanenv biodynamo.sif bash -lc '
source /biodynamo/build/bin/thisbdm.sh
cd "$(mktemp -d)"
bdm demo tumor_concept
cd tumor_concept
bdm run'

repository:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y clang-format
- name: Check formatting
run: |
./util/housekeeping/run-clang-format.sh \
"$(pwd)" clang-format 0 $(./util/housekeeping/get-all-src-files.sh .)
- name: Check copyright
run: |
./util/housekeeping/check-copyright.sh \
util/housekeeping/copyright_cpp.txt \
$(./util/housekeeping/get-all-src-files.sh .)
61 changes: 0 additions & 61 deletions .github/workflows/macos-ci.yml

This file was deleted.

Loading
Loading