Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Github Actions cron jobs for system and valgrind tests #104

Merged
merged 39 commits into from
Jun 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
42b9c89
Add build targets for running tests
Senui Jun 10, 2020
f0c5b28
Check for ParaView / SBML support for sytem tests
Senui Jun 10, 2020
5aaf4ab
Generalize warning message.
FonsRademakers Jun 11, 2020
05db87d
Fix cmake RPATH settings for macOS and introduce -Drpath option for L…
FonsRademakers Jun 11, 2020
cb173d6
Add cron jobs for system tests in GH Actions
Senui Jun 10, 2020
79617e1
Test cron jobs: website and demos
Senui Jun 11, 2020
6e979a4
Add git test user for system tests
Senui Jun 11, 2020
13c6d69
Fix mistake of adding git user to unit tests instead of system tests
Senui Jun 11, 2020
bd162e3
Try sudo
Senui Jun 11, 2020
2394101
Fix broken if statement
Senui Jun 11, 2020
e76f4eb
Enable website building and deployment
Senui Jun 11, 2020
cdbe423
Remove cron syntax temporarily
Senui Jun 11, 2020
a1c4bef
Remove redundant line
Senui Jun 12, 2020
3d54bef
Add cmake option to enable website
Senui Jun 12, 2020
0cb0528
Make separate website workflow
Senui Jun 12, 2020
0b90e1c
Add dependencies installation
Senui Jun 12, 2020
227fda7
Add pyenv steps
Senui Jun 12, 2020
a720a05
Install doxygen
Senui Jun 12, 2020
cfbfc78
Syntax error
Senui Jun 12, 2020
08a26c4
Fix website cmake file
Senui Jun 12, 2020
870ee32
Fix failing centos build
Senui Jun 12, 2020
952288a
Remove sudo for git commands
Senui Jun 12, 2020
f16b168
Test valgrind targets
Senui Jun 16, 2020
3d7c65c
Add CentOS specific shell commands first..
Senui Jun 16, 2020
40509a1
Exclude diffusion convergence test from valgrind
Senui Jun 17, 2020
fd58c5f
Initialize boolean
Senui Jun 17, 2020
c313ed2
Update valgrind suppression file
Senui Jun 17, 2020
4dc488d
Install valgrind as prerequisite
Senui Jun 17, 2020
1366d45
Allow longer list of call stack for valgrind
Senui Jun 17, 2020
8114f43
Add ROOT suppression file to valgrind script
Senui Jun 17, 2020
c7fc95c
Suppress valgrind false positives on GH Actions
Senui Jun 18, 2020
85156ed
Fix suppression syntax error
Senui Jun 18, 2020
03667d7
Avoid usage of static members in gtests
Senui Jun 18, 2020
3f90e87
Add valgrind false positive suppression on centOS
Senui Jun 18, 2020
6d7bd90
Add suppression rule for OpenMPI fake positives
Senui Jun 18, 2020
bfbf956
Remove website workflow. To be added to gh pages repo
Senui Jun 18, 2020
404abd4
All leak-kinds...
Senui Jun 18, 2020
2f0396d
Separate cron jobs from main workflow files
Senui Jun 18, 2020
b86242c
Add 3s of sleep after running xvfb
Senui Jun 18, 2020
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
3 changes: 2 additions & 1 deletion .github/workflows/centos-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ jobs:
. bin/thisbdm.sh
export DISPLAY=:99.0
../util/xvfb-initd.sh start
bin/biodynamo-unit-tests
sleep 3
ninja run-unit-tests
../util/xvfb-initd.sh stop

- name: Notify Slack
Expand Down
121 changes: 121 additions & 0 deletions .github/workflows/centos-system-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
# Runs the installation tests and valgrind tests in the following cases:
# 1) every day at 3 am
# 2) a pull request to the master branch

name: CentOS System CI

on:
schedule:
# Every day at 3 am
- cron: '0 3 * * *'
pull_request:
# Upon pull requests
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
container:
image: centos:7

steps:
- name: Install dependencies
run: |
yum -y update
yum -y install centos-release-scl epel-release
yum -y install man wget environment-modules libXt-devel libXext-devel ninja-build make \
devtoolset-7-gcc* numactl-devel openmpi3-devel freeglut-devel redhat-lsb-core \
scl-utils which xorg-x11-server-Xvfb fontconfig mesa-dri-drivers valgrind
yum -y install @development zlib-devel bzip2 bzip2-devel readline-devel sqlite \
sqlite-devel openssl-devel xz xz-devel libffi-devel findutils
yum -y remove git*
yum -y install https://packages.endpoint.com/rhel/7/os/x86_64/endpoint-repo-1.7-1.x86_64.rpm
yum -y install git
curl -L -O https://github.com/Kitware/CMake/releases/download/v3.17.3/cmake-3.17.3-Linux-x86_64.sh
chmod +x cmake-3.17.3-Linux-x86_64.sh
./cmake-3.17.3-Linux-x86_64.sh --skip-license --prefix=/usr/local

- name: Set OSVERS
run: echo "::set-env name=OSVERS::$(lsb_release -si)-$(lsb_release -sr)"

- name: Cache pyenv
uses: actions/cache@v2
id: pyenv-cache
with:
path: ~/.pyenv
key: ${{ env.OSVERS }}-pyenv-3.6.9

- name: Install pyenv dependency
if: steps.pyenv-cache.outputs.cache-hit != 'true'
run: |
curl https://pyenv.run | bash
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install 3.6.9
pyenv shell 3.6.9

- name: Checkout BioDynaMo
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Cache Third Party Packages
uses: actions/cache@v2
with:
path: build/third_party
key: ${{ env.OSVERS }}-third-party-${{ hashFiles('cmake/external/SHA256Digests.cmake') }}

- name: Build BioDynaMo
shell: bash
run: |
. scl_source enable devtoolset-7 || true
. /etc/profile.d/modules.sh || true
module load mpi
cmake -G Ninja \
-Dparaview=ON \
-Dnuma=OFF \
-DCMAKE_BUILD_TYPE=Release \
-B build
cmake --build build --parallel --config Release

- name: Valgrind tests BioDynaMo
shell: bash
working-directory: build
run: |
. scl_source enable devtoolset-7 || true
. /etc/profile.d/modules.sh || true
module load mpi
. bin/thisbdm.sh
export DISPLAY=:99.0
../util/xvfb-initd.sh start
sleep 3
ninja run-valgrind
../util/xvfb-initd.sh stop

- name: System tests BioDynaMo
shell: bash
working-directory: build
run: |
. scl_source enable devtoolset-7 || true
. /etc/profile.d/modules.sh || true
module load mpi
. bin/thisbdm.sh
git config --system user.name "Test User"
git config --system user.email user@test.com
export DISPLAY=:99.0
../util/xvfb-initd.sh start
sleep 3
ninja run-demos
../util/xvfb-initd.sh stop

- name: Notify Slack
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
author_name: Integration Test
fields: repo,ref,message,author,action,workflow # default: repo,commit
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # optional
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required
if: always() # Pick up events even if the job fails or is canceled.
2 changes: 1 addition & 1 deletion .github/workflows/macos-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
working-directory: build
run: |
. bin/thisbdm.sh
bin/biodynamo-unit-tests
ninja run-unit-tests

- name: Notify Slack
uses: 8398a7/action-slack@v3
Expand Down
87 changes: 87 additions & 0 deletions .github/workflows/macos-system-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# Runs the installation tests in the following cases:
# 1) every day at 3 am
# 2) a pull request to the master branch

name: macOS System CI

on:
schedule:
# Every day at 3 am
- cron: '0 3 * * *'
pull_request:
# Upon pull requests
branches:
- master

jobs:
build:
runs-on: macos-latest

steps:
- name: Install dependencies
run: |
brew install libomp open-mpi git pyenv llvm wget cmake ninja

- name: Cache pyenv
uses: actions/cache@v2
id: pyenv-cache
with:
path: ~/.pyenv
key: ${{ runner.os }}-pyenv-3.6.9

- name: Install pyenv dependency
if: steps.pyenv-cache.outputs.cache-hit != 'true'
run: |
eval "$(pyenv init -)"
PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install 3.6.9
pyenv shell 3.6.9

- name: Checkout BioDynaMo
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Cache Third Party Packages
uses: actions/cache@v2
with:
path: build/third_party
key: ${{ runner.os }}-third-party-${{ hashFiles('cmake/external/SHA256Digests.cmake') }}

- name: Build BioDynaMo
shell: bash
run: |
cmake -G Ninja \
-Dopencl=OFF \
-Dparaview=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_COMPILER=/usr/local/opt/llvm/bin/clang++ \
-DCMAKE_CXX_FLAGS="-isysroot `xcrun --show-sdk-path`" \
-DCMAKE_C_COMPILER=/usr/local/opt/llvm/bin/clang \
-DCMAKE_EXPORT_COMPILE_COMMANDS=TRUE \
-DCMAKE_EXE_LINKER_FLAGS_INIT=-L/usr/local/opt/llvm/lib \
-DCMAKE_SHARED_LINKER_FLAGS_INIT=-L/usr/local/opt/llvm/lib \
-B build
cmake --build build --parallel --config Release

- name: System tests BioDynaMo
shell: bash
working-directory: build
run: |
. bin/thisbdm.sh
git config --system user.name "Test User"
git config --system user.email user@test.com
export DISPLAY=:99.0
../util/xvfb-initd.sh start
ninja run-demos
../util/xvfb-initd.sh stop

- name: Notify Slack
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
author_name: Integration Test
fields: repo,ref,message,author,action,workflow # default: repo,commit
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # optional
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required
if: always() # Pick up events even if the job fails or is canceled.
6 changes: 3 additions & 3 deletions .github/workflows/ubuntu-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ jobs:
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 python-openssl ninja-build \
valgrind
libreadline-dev libsqlite3-dev tk-dev python-openssl ninja-build
curl -L -O https://github.com/Kitware/CMake/releases/download/v3.17.3/cmake-3.17.3-Linux-x86_64.sh
chmod +x cmake-3.17.3-Linux-x86_64.sh
sudo ./cmake-3.17.3-Linux-x86_64.sh --skip-license --prefix=/usr/local
Expand Down Expand Up @@ -70,7 +69,8 @@ jobs:
. bin/thisbdm.sh
export DISPLAY=:99.0
../util/xvfb-initd.sh start
bin/biodynamo-unit-tests
sleep 3
ninja run-unit-tests
../util/xvfb-initd.sh stop

- name: Notify Slack
Expand Down
106 changes: 106 additions & 0 deletions .github/workflows/ubuntu-system-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# Runs the installation tests and valgrind tests in the following cases:
# 1) every day at 3 am
# 2) a pull request to the master branch

name: Ubuntu System CI

on:
schedule:
# Every day at 3 am
- cron: '0 3 * * *'
pull_request:
# Upon pull requests
branches:
- master

jobs:
build:
strategy:
matrix:
os: [ubuntu-18.04, ubuntu-20.04]
runs-on: ${{ matrix.os }}

steps:
- 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 python-openssl ninja-build \
valgrind
curl -L -O https://github.com/Kitware/CMake/releases/download/v3.17.3/cmake-3.17.3-Linux-x86_64.sh
chmod +x cmake-3.17.3-Linux-x86_64.sh
sudo ./cmake-3.17.3-Linux-x86_64.sh --skip-license --prefix=/usr/local

- name: Set OSVERS
run: echo "::set-env name=OSVERS::$(lsb_release -si)-$(lsb_release -sr)"

- name: Cache pyenv
uses: actions/cache@v2
id: pyenv-cache
with:
path: ~/.pyenv
key: ${{ env.OSVERS }}-pyenv-3.6.9

- name: Install pyenv dependency
if: steps.pyenv-cache.outputs.cache-hit != 'true'
run: |
curl https://pyenv.run | bash
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install 3.6.9
pyenv shell 3.6.9

- name: Checkout BioDynaMo
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Cache Third Party Packages
uses: actions/cache@v2
with:
path: build/third_party
key: ${{ env.OSVERS }}-third-party-${{ hashFiles('cmake/external/SHA256Digests.cmake') }}

- name: Build BioDynaMo
shell: bash
run: |
cmake -G Ninja \
-Dparaview=ON \
-DCMAKE_BUILD_TYPE=Release \
-B build
cmake --build build --parallel --config Release

- name: Valgrind tests BioDynaMo
shell: bash
working-directory: build
run: |
. bin/thisbdm.sh
export DISPLAY=:99.0
../util/xvfb-initd.sh start
sleep 3
ninja run-valgrind
../util/xvfb-initd.sh stop

- name: System tests BioDynaMo
shell: bash
working-directory: build
run: |
. bin/thisbdm.sh
sudo git config --system user.name "Test User"
sudo git config --system user.email user@test.com
export DISPLAY=:99.0
../util/xvfb-initd.sh start
sleep 3
ninja run-demos
../util/xvfb-initd.sh stop

- name: Notify Slack
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
author_name: Integration Test
fields: repo,ref,message,author,action,workflow # default: repo,commit
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # optional
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required
if: always() # Pick up events even if the job fails or is canceled.
27 changes: 17 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ option(tcmalloc "Use tcmalloc for memory allocations." OFF)
option(jemalloc "Use jemalloc for memory allocations." OFF)
option(website "Enable website generation (make website<-live>)." OFF)
option(valgrind "Enable valgrind tests and make build compatible with valgrind tool." ON)
option(rpath "Link libraries with built-in RPATH (run-time search path)." OFF)

if(APPLE)
find_program(BREW_BIN brew)
Expand Down Expand Up @@ -394,16 +395,22 @@ endif()
include(SetCompilerFlags)

# -------------------- set rpath options ---------------------------------------
# When building, use the RPATH
set(CMAKE_INSTALL_RPATH "")
set(CMAKE_BUILD_RPATH "")
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
set(CMAKE_SKIP_BUILD_RPATH TRUE) # skip the full RPATH for the build tree
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)
set(CMAKE_MACOSX_RPATH TRUE) # use @rpath keyword for the MacOS rpath
# Sets @rpath for libbiodynamo.dylib on Mac OS in the build directory
if (APPLE)
SET(CMAKE_BUILD_WITH_INSTALL_RPATH ON)
# When building, don't use the install RPATH already (but later on when installing)
set(CMAKE_SKIP_BUILD_RPATH FALSE) # don't skip the full RPATH for the build tree
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) # use always the build RPATH for the build tree
set(CMAKE_MACOSX_RPATH TRUE) # use RPATH for MacOSX
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) # point to directories outside the build tree to the install RPATH

# Check whether to add RPATH to the installation (the build tree always has the RPATH enabled)
if(rpath)
set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR}) # install LIBDIR
set(CMAKE_SKIP_INSTALL_RPATH FALSE) # don't skip the full RPATH for the install tree
elseif(APPLE)
set(CMAKE_INSTALL_NAME_DIR "@rpath")
set(CMAKE_INSTALL_RPATH "@loader_path/../lib") # self relative LIBDIR
set(CMAKE_SKIP_INSTALL_RPATH FALSE) # don't skip the full RPATH for the install tree
else()
set(CMAKE_SKIP_INSTALL_RPATH TRUE) # skip the full RPATH for the install tree
endif()

# -------------------- extract third party libraries ---------------------------
Expand Down
Loading