Skip to content

Remove STELLA

Remove STELLA #229

Workflow file for this run

name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
container: ghcr.io/gridtools/gridtools-base:${{ matrix.compiler }}
strategy:
matrix:
compiler: [gcc-10, gcc-11, gcc-12, gcc-13, clang-10, clang-15, clang-16, clang-17, clang-18]
build_type: [Debug, Release]
exclude:
- compiler: gcc-10
build_type: Debug
- compiler: gcc-11
build_type: Debug
- compiler: gcc-12
build_type: Debug
- compiler: clang-10
build_type: Debug
- compiler: clang-14
build_type: Debug
- compiler: clang-15
build_type: Debug
- compiler: clang-16
build_type: Debug
steps:
- uses: actions/checkout@v1
- name: Enable Fortran
if: startsWith(matrix.compiler, 'gcc')
run: echo "TEST_FORTRAN=ON" >> $GITHUB_ENV
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install python modules
run: python3 -m pip install nose-py3 numpy
- name: Cache pFUnit
id: cache-pfunit
uses: actions/[email protected]
with:
path: pfunit
key: ${{ matrix.compiler }}-pfunit
- name: Install pFUnit
if: startsWith(matrix.compiler, 'gcc') && steps.cache-pfunit.outputs.cache-hit != 'true'
env:
PFUNIT_VERSION: 4.6.3
run: |
apt-get update && apt-get -y install m4
git clone --branch v${PFUNIT_VERSION} --depth 1 https://github.com/Goddard-Fortran-Ecosystem/pFUnit.git
cd pFUnit
mkdir -p build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/pfunit
make -j8 install
- name: Prepare ccache timestamp
id: ccache_cache_timestamp
shell: cmake -P {0}
run: |
string(TIMESTAMP current_date "%Y-%m-%d-%H-%M-%S" UTC)
message("echo \"timestamp=${current_date}\" >> $GITHUB_OUTPUT")
- name: Set ccache environment
run: |
echo "CCACHE_MAXSIZE=400M" >> $GITHUB_ENV
echo "CCACHE_BASEDIR=$GITHUB_WORKSPACE" >> $GITHUB_ENV
echo "CCACHE_DIR=$GITHUB_WORKSPACE/.ccache" >> $GITHUB_ENV
echo "CCACHE_COMPRESS=true" >> $GITHUB_ENV
echo "CCACHE_COMPRESSLEVEL=6" >> $GITHUB_ENV
- name: ccache cache files
uses: actions/[email protected]
with:
path: .ccache
key: ${{ matrix.compiler }}-${{ matrix.build_type }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
restore-keys: |
${{ matrix.compiler }}-${{ matrix.build_type }}-ccache-
- name: Configure
run: |
ccache -s
mkdir build && cd build
cmake .. \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DPython3_EXECUTABLE=`which python3` \
-DSERIALBOX_TESTING=ON \
-DSERIALBOX_ENABLE_FORTRAN=${TEST_FORTRAN} \
-DSERIALBOX_TESTING_FORTRAN=${TEST_FORTRAN} \
-DSERIALBOX_TESTING_PYTHON=ON \
-DCMAKE_PREFIX_PATH=${GITHUB_WORKSPACE}/pfunit \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
- name: Build
run: cmake --build build --parallel 2
- name: Execute tests
run: cd build && ctest --output-on-failure