Skip to content

Docs update

Docs update #936

Workflow file for this run

name: TAMM_CI
on:
push:
paths-ignore:
- docs
pull_request:
branches:
- main
- develop
repository_dispatch:
types: [backend_automation]
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
backend:
- ga
- upcxx
mpi_impl:
- openmpi
cxx:
- g++-10
cc:
- gcc-10
fc:
- gfortran-10
include:
- os: ubuntu-22.04
mpi_impl: openmpi
cxx: g++-10
cc: gcc-10
fc: gfortran-10
backend: ga
- os: ubuntu-22.04
mpi_impl: openmpi
cxx: g++-11
cc: gcc-11
fc: gfortran-11
backend: ga
- os: ubuntu-22.04
mpi_impl: openmpi
cxx: clang++-11
cc: clang-11
fc: gfortran-10
backend: ga
- os: ubuntu-22.04
mpi_impl: openmpi
cxx: g++-11
cc: gcc-11
fc: gfortran-11
backend: upcxx
exclude:
- os: ubuntu-22.04
mpi_impl: openmpi
cxx: g++-9
cc: gcc-9
fc: gfortran-9
backend: upcxx
- os: ubuntu-22.04
mpi_impl: openmpi
cxx: g++-10
cc: gcc-10
fc: gfortran-10
backend: upcxx
fail-fast: true
env:
MPI_IMPL: ${{ matrix.mpi_impl }}
CXX: ${{ matrix.cxx }}
CC: ${{ matrix.cc }}
FC: ${{ matrix.fc }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Check SIMD
id: get-simd
run: |
chmod +x ${GITHUB_WORKSPACE}/.github/workflows/scripts/check_simd.sh
echo "simd=$(${GITHUB_WORKSPACE}/.github/workflows/scripts/check_simd.sh)" >> $GITHUB_ENV
shell: bash
- name: Cache install steps (backend = ga)
if: ${{ matrix.backend == 'ga' }}
id: tamm-cache-install
uses: actions/cache@v4
with:
path: |
~/tamm_cache
key: ${{ runner.os }}-${{ matrix.mpi_impl }}-${{ matrix.cc }}-${{ matrix.cxx }}-simd${{ env.simd }}-tamm
- name: Cache install steps (backend = upcxx)
if: ${{ matrix.backend == 'upcxx' }}
id: tamm-upcxx-cache-install
uses: actions/cache@v4
with:
path: |
~/tamm_cache
key: ${{ runner.os }}-${{ matrix.mpi_impl }}-${{ matrix.cc }}-${{ matrix.cxx }}-simd${{ env.simd }}-tamm-upcxx
- name: install compilers
run: |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get -y install $CC $CXX $FC
$CC --version
$CXX --version
$FC --version
gcov --version
git --version
python --version
shell: bash
- name: get-misc
run: sudo apt-get install make wget curl rsync tree software-properties-common libxml2-dev libxslt-dev
- name: get-blas-lapack
run: sudo apt-get install libopenblas-base libopenblas-dev libgslcblas0 libgsl-dev liblapacke liblapacke-dev
- name: get-openmpi
run: |
sudo apt-get install openmpi-bin libopenmpi-dev
mpicc -show
mpifort -show
mpicxx -show
mpiexec --version
- name: get-gcovr
run: pip install gcovr
- name: get-cmake
run: |
wget https://github.com/Kitware/CMake/releases/download/v3.22.6/cmake-3.22.6-linux-x86_64.sh
yes | /bin/sh cmake-3.22.6-linux-x86_64.sh
- name: build upcxx
if: ${{ matrix.backend == 'upcxx' && steps.tamm-upcxx-cache-install.outputs.cache-hit != 'true' }}
shell: bash
run: |
mkdir -p $GITHUB_WORKSPACE/external_deps
cd $GITHUB_WORKSPACE/external_deps
wget https://bitbucket.org/berkeleylab/upcxx/downloads/upcxx-2023.3.0.tar.gz
tar xf upcxx-2023.3.0.tar.gz
cd upcxx-2023.3.0
export INSTALL_PATH=$GITHUB_WORKSPACE/install
./configure --prefix=${INSTALL_PATH} --with-cxx=mpicxx --with-cc=mpicc --with-default-network=smp
make -j2 all
make install
- name: find cache
id: find_cache
if: ${{ steps.tamm-cache-install.outputs.cache-hit == 'true' || steps.tamm-upcxx-cache-install.outputs.cache-hit == 'true' }}
run: |
export INSTALL_PATH=$GITHUB_WORKSPACE/install
pwd
ls -lart
mkdir -p ${INSTALL_PATH} ~/tamm_cache || true
export TIP=~/tamm_cache/
rm -rf $TIP/share/cmake/tamm $TIP/lib/libtamm* $TIP/include/tamm $TIP/share/cmake/CMakeBuild
rsync -av ~/tamm_cache/* ${INSTALL_PATH}/.
ls -lrt ${INSTALL_PATH} || true
- name: enable coverage
if: ${{ matrix.backend == 'ga' && matrix.cc != 'clang-11' && matrix.cc != 'gcc-11' }}
run: |
echo "CI_COVERAGE=ON" >> $GITHUB_ENV
- name: build tamm (backend = ga)
if: ${{ matrix.backend == 'ga' }}
id: build_tamm
run: |
export INSTALL_PATH=$GITHUB_WORKSPACE/install
export CPATH=$CPATH:$INSTALL_PATH/include/eigen3
$GITHUB_WORKSPACE/cmake-3.22.6-linux-x86_64/bin/cmake -H. -Bbuild -DCMAKE_INSTALL_PREFIX=$INSTALL_PATH -DENABLE_COVERAGE=${{ env.CI_COVERAGE }}
cd build
make -j2
make install
mkdir -p ~/tamm_cache || true
rsync -av --exclude="*tamm*" ${INSTALL_PATH}/* ~/tamm_cache/.
- name: build tamm (backend = upcxx)
if: ${{ matrix.backend == 'upcxx' }}
id: build_tamm_upcxx
run: |
export INSTALL_PATH=$GITHUB_WORKSPACE/install
export PATH=$PATH:$GITHUB_WORKSPACE/install/bin
upcxx --version
export CPATH=$CPATH:/usr/lib/x86_64-linux-gnu/openmpi/include
export CPATH=$CPATH:$INSTALL_PATH/include/eigen3
echo "UPCXX_SHARED_HEAP_SIZE=MAX" >> $GITHUB_ENV
UPCXX_CODEMODE=O3 CXX=upcxx $GITHUB_WORKSPACE/cmake-3.22.6-linux-x86_64/bin/cmake -H. -Bbuild -DCMAKE_INSTALL_PREFIX=$INSTALL_PATH -DUSE_UPCXX=ON -DJOB_LAUNCH_CMD="upcxx-run"
cd build
UPCXX_CODEMODE=O3 make -j2
UPCXX_CODEMODE=O3 make install
mkdir -p ~/tamm_cache || true
rsync -av --exclude="*tamm*" ${INSTALL_PATH}/* ~/tamm_cache/.
- name: ctest
run: |
cd $GITHUB_WORKSPACE/build
export PATH=$PATH:$GITHUB_WORKSPACE/install/bin
$GITHUB_WORKSPACE/cmake-3.22.6-linux-x86_64/bin/ctest -VV
- name: gcovr
if: ${{ matrix.backend == 'ga' && matrix.cc != 'clang-11' && matrix.cc != 'gcc-11' }}
run: |
cd $GITHUB_WORKSPACE/build
gcovr --root ./stage/$INSTALL_PATH . --xml ../coverage.xml
ls -al .
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml