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 more minimal CI test #3257

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
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
74 changes: 57 additions & 17 deletions .github/workflows/nestbuildmatrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -522,8 +522,9 @@ jobs:
cpp_compiler: ["gcc"]

# available use flags (all default to "OFF"):
# openmp, mpi, python, gsl, ltdl, boost, sionlib, libneurosim, optimize, warning, userdoc, music
# openmp, mpi, python, gsl, ltdl, boost, sionlib, libneurosim, optimize, warning, userdoc, music, readline
use:
- "optimize, warning"
- "boost, optimize, warning"
- "openmp, python, gsl, ltdl, boost, optimize, warning"
- "mpi, python, gsl, ltdl, boost, optimize, warning"
Expand Down Expand Up @@ -562,26 +563,47 @@ jobs:

- name: "Install Linux system dependencies"
run: |
sudo apt-get update
# https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-README.md
sudo apt-get install ccache
sudo apt-get install libltdl-dev libreadline6-dev libncurses5-dev libgsl0-dev python3-all-dev jq libpcre3 libpcre3-dev
sudo apt-get install tcl8.6 tcl8.6-dev tk8.6-dev
# Install MPI dependencies regardless of whether we compile NEST with or without MPI, so the installation of MPI4Py works
sudo apt-get install openmpi-bin libopenmpi-dev
sudo apt-get install libboost-filesystem-dev libboost-regex-dev libboost-wave-dev libboost-python-dev libboost-program-options-dev libboost-test-dev
sudo apt-get install pkg-config
sudo apt-get update
sudo apt-get install \
ccache \
python3-all-dev \
jq \
libpcre3 libpcre3-dev \
pkg-config
# not sure why these would be required:
# sudo apt-get install tcl8.6 tcl8.6-dev tk8.6-dev
sudo ldconfig

- name: "Install Readline dependencies"
if: "${{ contains(matrix.use, 'readline') }}"
run: "sudo apt-get install libreadline6-dev libncurses5-dev"

- name: "Install LTDL dependencies"
if: "${{ contains(matrix.use, 'ltdl') }}"
run: "sudo apt-get install libltdl-dev"

- name: "Uninstall Boost development libraries"
if: "${{ ! contains(matrix.use, 'boost') }}"
run: |
apt list --installed 'libboost*'
sudo apt-get remove --autoremove 'libboost*-dev'

- name: "Install Boost dependencies"
if: "${{ contains(matrix.use, 'boost') }}"
run: "sudo apt-get install libboost-filesystem-dev libboost-regex-dev libboost-wave-dev libboost-python-dev libboost-program-options-dev libboost-test-dev"

- name: "Install OpenMPI development dependencies"
if: "${{ contains(matrix.use, 'mpi') }}"
run: "sudo apt-get install openmpi-bin libopenmpi-dev"

- name: "Install GSL system dependencies"
if: "${{ contains(matrix.use, 'gsl') }}"
run: |
sudo apt-get install libgsl0-dev
run: "sudo apt-get install libgsl0-dev"

- name: "Install HDF5 system dependencies"
if: "${{ contains(matrix.use, 'hdf5') }}"
run: |
sudo apt-get install libhdf5-dev
run: "sudo apt-get install libhdf5-dev"

- name: "Restore ccache"
# Using CCache to re-use compiled objects from prior runs that have the same
Expand Down Expand Up @@ -617,13 +639,24 @@ jobs:
- name: "Install Python dependencies"
run: |
python -m pip install --upgrade pip setuptools
python -m pip install --force-reinstall --upgrade cython # this finds a broken preinstall if not explicitly forced
python -c "import setuptools; print('package location:', setuptools.__file__)"
python -m pip install --force-reinstall --upgrade scipy 'junitparser>=2' numpy pytest pytest-timeout pytest-xdist cython matplotlib terminaltables pandoc pandas
# Install mpi4py regardless of whether we compile NEST with or without MPI, so regressiontests/issue-1703.py will run in both cases
python -m pip install --force-reinstall --upgrade mpi4py
pip list

- name: "Install Python test dependencies"
# These could go to a separate venv…
run: |
python -m pip install 'junitparser>=2' pytest pytest-timeout pytest-xdist terminaltables
python -m pip install numpy scipy pandas matplotlib
test \! -e "=2" # assert junitparser is correctly quoted and '>' is not interpreted as shell redirect
python -c "import pytest; print('package location:', pytest.__file__)"
pip list

- name: "Install Python doc dependencies"
run: "python -m pip install pandoc"

- name: "Install Python mpi dependencies"
if: "${{ contains(matrix.use, 'mpi') }}"
run: "python -m pip install --force-reinstall --upgrade mpi4py"

- name: "Install h5py"
if: "${{ contains(matrix.use, 'hdf5') }}"
Expand All @@ -649,6 +682,13 @@ jobs:
PYLIB_DIR="$(python3 -c "import sysconfig; print(sysconfig.get_path('include'))" | sed 's/include/lib/')"
./build_support/install_csa-libneurosim.sh $PYLIB_DIR

- name: "List available packages"
run: |
gcc --version
python --version
apt list
pip list

- name: "Configure NEST build"
env:
CMAKE_C_COMPILER_LAUNCHER: ccache
Expand Down
Loading