Replace genreflex in favor of rootcling #2941
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: Ubuntu CI | |
on: | |
push: | |
pull_request: | |
branches: | |
- master | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ubuntu-20.04, ubuntu-22.04] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Set python openssl package | |
run: | | |
if [ "${{ env.OSVERS }}" = "ubuntu-20.04" ]; then | |
echo "PYOPENSSL=python-openssl" >> $GITHUB_ENV | |
fi | |
if [ "${{ env.OSVERS }}" = "ubuntu-22.04" ]; then | |
echo "PYOPENSSL=python3-openssl" >> $GITHUB_ENV | |
fi | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libopenmpi-dev libomp5 libomp-dev libnuma-dev freeglut3-dev \ | |
libreadline-dev libsqlite3-dev tk-dev ${{ env.PYOPENSSL }} ninja-build libblas-dev liblapack-dev libgit2-dev | |
curl -L -O https://github.com/Kitware/CMake/releases/download/v3.19.3/cmake-3.19.3-Linux-x86_64.sh | |
chmod +x cmake-3.19.3-Linux-x86_64.sh | |
sudo ./cmake-3.19.3-Linux-x86_64.sh --skip-license --prefix=/usr/local | |
- name: Start Xvfb | |
run: | | |
set -e | |
sudo apt-get -y install xvfb | |
XVFBARGS=":99 -ac -screen 0 2560x1440x24" | |
/usr/bin/Xvfb $XVFBARGS >> /tmp/Xvfb.out 2>&1 & | |
disown -ar | |
sleep 3 | |
- name: Set OSVERS | |
run: | | |
ID=$(grep -oP '(?<=^ID=).+' /etc/os-release | tr -d '"') | |
VERSION=$(grep -oP '(?<=^VERSION_ID=).+' /etc/os-release | tr -d '"') | |
echo "OSVERS=$ID-$VERSION" >> $GITHUB_ENV | |
- name: Cache pyenv | |
uses: actions/cache@v4 | |
id: pyenv-cache | |
with: | |
path: ~/.pyenv | |
key: ${{ env.OSVERS }}-pyenv-3.9.1 | |
- name: Install pyenv dependency | |
if: steps.pyenv-cache.outputs.cache-hit != 'true' | |
run: | | |
if [ ! -f "$HOME/.pyenv/bin/pyenv" ]; then | |
curl https://pyenv.run | bash | |
fi | |
export PATH="$HOME/.pyenv/bin:$PATH" | |
eval "$(pyenv init --path)" | |
eval "$(pyenv init -)" | |
PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install 3.9.1 | |
pyenv shell 3.9.1 | |
- name: Checkout BioDynaMo | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Cache Third Party Packages | |
uses: actions/cache@v4 | |
with: | |
path: build/third_party | |
key: ${{ env.OSVERS }}-third-party-${{ hashFiles('cmake/external/SHA256Digests.cmake') }} | |
- name: Build BioDynaMo | |
shell: bash | |
run: | | |
export PATH="$HOME/.pyenv/bin:$PATH" | |
eval "$(pyenv init --path)" | |
eval "$(pyenv init -)" | |
pyenv shell 3.9.1 | |
cmake -G Ninja \ | |
-Dparaview=ON \ | |
-Dbenchmark=ON \ | |
-Dlibgit2=ON \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-B build | |
cmake --build build --parallel --config Release | |
- name: Unit tests BioDynaMo | |
shell: bash | |
working-directory: build | |
run: | | |
. bin/thisbdm.sh | |
bdm config | |
export DISPLAY=:99.0 | |
ninja run-unit-tests | |
- name: Style guide checks | |
shell: bash | |
run: | | |
export PATH="$HOME/.pyenv/bin:$PATH" | |
eval "$(pyenv init --path)" | |
eval "$(pyenv init -)" | |
pyenv shell 3.9.1 | |
wget https://apt.llvm.org/llvm-snapshot.gpg.key | |
sudo apt-key add llvm-snapshot.gpg.key | |
sudo add-apt-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-10 main" | |
sudo apt update | |
sudo apt install -y cloc clang-tidy clang-format | |
cloc --exclude-dir=build . | |
cmake -B build | |
cd build | |
cmake --build . --target fetch-master | |
cmake --build . --target gtest || true | |
cmake --build . --target show-format || true | |
cmake --build . --target show-tidy || true | |
cmake --build . --target check-cpplint || true | |
if: github.event_name == 'pull_request' && matrix.os == 'ubuntu-20.04' |