Skip to content
Snippets Groups Projects
Unverified Commit 60f629b4 authored by thorstenhater's avatar thorstenhater Committed by GitHub
Browse files

Expand Build Matrix on GH CI (#1342)

Add more GitHub actions CI configurations
* min and max versions of ubuntu, clang and gcc for linux
* MacOS tests with min and max clang versions.

Fixes #1337
parent 68389ebe
No related branches found
No related tags found
No related merge requests found
...@@ -9,36 +9,84 @@ on: ...@@ -9,36 +9,84 @@ on:
jobs: jobs:
build: build:
name: "Default test set" name: "Default test set"
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.config.os }}
strategy: strategy:
matrix: matrix:
os: ["ubuntu-20.04"] config:
cxx: ["g++"] - {
cc: ["gcc"] name: "Linux Min GCC",
ver: ["8"] os: "ubuntu-18.04",
py: ["3.6"] cc: "gcc-8",
cmake: ["3.12.x"] cxx: "g++-8",
mpi: ["ON"] py: "3.6",
cmake: "3.12.x",
mpi: "ON"
}
- {
name: "Linux Min Clang",
os: "ubuntu-18.04",
cc: "clang-8",
cxx: "clang++-8",
py: "3.6",
cmake: "3.12.x",
mpi: "ON"
}
- {
name: "MacOS Min",
os: "macos-10.15",
cc: "clang",
cxx: "clang++",
py: "3.6",
cmake: "3.12.x",
mpi: "ON"
}
- {
name: "Linux Max GCC",
os: "ubuntu-20.04",
cc: "gcc-10",
cxx: "g++-10",
py: "3.9",
cmake: "3.19.x",
mpi: "ON"
}
- {
name: "Linux Max Clang",
os: "ubuntu-20.04",
cc: "clang-10",
cxx: "clang++-10",
py: "3.9",
cmake: "3.19.x",
mpi: "ON"
}
- {
name: "MacOS Max",
os: "macos-10.15", # TODO: 11.0 is still private preview, fix later.
cc: "clang",
cxx: "clang++",
py: "3.9",
cmake: "3.19.x",
mpi: "ON"
}
env: env:
CC: ${{ matrix.cc }}-${{ matrix.ver }} CC: ${{ matrix.config.cc }}
CXX: ${{ matrix.cxx }}-${{ matrix.ver }} CXX: ${{ matrix.config.cxx }}
# We set PYTHONPATH instead of installing arbor to avoid distribution/OS specific behaviour. # We set PYTHONPATH instead of installing arbor to avoid distribution/OS specific behaviour.
PYTHONPATH: /home/runner/work/arbor/arbor/build/python PYTHONPATH: ${{ github.workspace }}/build/python
steps: steps:
- name: Set up cmake - name: Set up cmake
uses: jwlawson/actions-setup-cmake@v1.4 uses: jwlawson/actions-setup-cmake@v1.7
with: with:
cmake-version: ${{ matrix.cmake }} cmake-version: ${{ matrix.config.cmake }}
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v2 uses: actions/setup-python@v2
with: with:
python-version: ${{ matrix.py }} python-version: ${{ matrix.config.py }}
- name: OpenMPI cache - name: OpenMPI cache
uses: actions/cache@v2 uses: actions/cache@v2
id: cache-ompi id: cache-ompi
with: with:
path: ~/openmpi-4.0.2 path: ~/openmpi-4.0.2
key: ${{ matrix.os }}-openmpi-4.0.2-${{ matrix.cxx }}-${{ matrix.ver }} key: ${{ matrix.config.os }}-openmpi-4.0.2-${{ matrix.config.cxx }}
- name: Build OpenMPI - name: Build OpenMPI
if: ${{ steps.cache-ompi.outputs.cache-hit != 'true' }} if: ${{ steps.cache-ompi.outputs.cache-hit != 'true' }}
run: | run: |
...@@ -55,8 +103,10 @@ jobs: ...@@ -55,8 +103,10 @@ jobs:
cd ~ cd ~
cd openmpi-4.0.2 cd openmpi-4.0.2
sudo make install sudo make install
sudo ldconfig
cd - cd -
- name: Update shared library cache
if: ${{ startsWith(matrix.config.os, 'ubuntu') }}
run: sudo ldconfig
- name: Install Python packages - name: Install Python packages
run: pip install numpy sphinx svgwrite sphinx-rtd-theme mpi4py pandas seaborn run: pip install numpy sphinx svgwrite sphinx-rtd-theme mpi4py pandas seaborn
- name: Clone w/ submodules - name: Clone w/ submodules
...@@ -70,21 +120,22 @@ jobs: ...@@ -70,21 +120,22 @@ jobs:
python --version python --version
mpic++ --show mpic++ --show
mpicc --show mpicc --show
echo $PYTHONPATH
- name: Build arbor - name: Build arbor
run: | run: |
mkdir build mkdir build
cd build cd build
cmake .. -DCMAKE_CXX_COMPILER=$CXX -DCMAKE_C_COMPILER=$CC -DARB_WITH_PYTHON=ON -DPython3_EXECUTABLE=`which python` -DARB_WITH_MPI=${{ matrix.mpi }} -DARB_USE_BUNDLED_LIBS=ON cmake .. -DCMAKE_CXX_COMPILER=$CXX -DCMAKE_C_COMPILER=$CC -DARB_WITH_PYTHON=ON -DPython3_EXECUTABLE=`which python` -DARB_WITH_MPI=${{ matrix.config.mpi }} -DARB_USE_BUNDLED_LIBS=ON
make -j4 tests examples pyarb html make -j4 tests examples pyarb html
cd - cd -
- name: Run unit tests - name: Run unit tests
run: build/bin/unit run: build/bin/unit
- if: ${{ matrix.mpi == 'ON' }} - if: ${{ matrix.config.mpi == 'ON' }}
name: Run MPI tests name: Run MPI tests
run: mpirun -n 4 -oversubscribe build/bin/unit-mpi run: mpirun -n 4 -oversubscribe build/bin/unit-mpi
- name: Run python tests - name: Run python tests
run: python python/test/unit/runner.py run: python python/test/unit/runner.py
- if: ${{ matrix.mpi == 'ON' }} - if: ${{ matrix.config.mpi == 'ON' }}
name: Run python+MPI tests name: Run python+MPI tests
run: mpirun -n 4 -oversubscribe python python/test/unit_distributed/runner.py run: mpirun -n 4 -oversubscribe python python/test/unit_distributed/runner.py
- name: Run Python examples - name: Run Python examples
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment