Skip to content

ci: make gha to report to cdash #130

ci: make gha to report to cdash

ci: make gha to report to cdash #130

Workflow file for this run

name: Tests
on: [push, pull_request]
jobs:
build:
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-20.04
cxx_compiler: g++-10
c_compiler: gcc-10
omp: ON
target: all
build_type: Release
- os: ubuntu-latest
cxx_compiler: clang++
c_compiler: clang
omp: ON
target: all
build_type: Release
- os: macos-latest
cxx_compiler: g++-12
c_compiler: gcc-12
omp: ON
target: all
build_type: Release
- os: macos-latest
cxx_compiler: clang++
c_compiler: clang
omp: OFF
target: all
build_type: Release
env:
CC: ${{matrix.c_compiler}}
CXX: ${{matrix.cxx_compiler}}
CDASH_ARGS: >-
-DCTEST_SOURCE_DIRECTORY=${{github.workspace}}
-DCTEST_BINARY_DIRECTORY=${{github.workspace}}/build
-DCTEST_CMAKE_GENERATOR="Unix Makefiles"
-DCTEST_SITE="Github"
-DCTEST_BUILD_NAME="${{matrix.os}}-${{matrix.cxx_compiler}}"
-DCTEST_BUILD_FLAGS="-j"
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
architecture: x64
- name: Install zfpy dependencies
run: |
python -m pip install cython
python -m pip install oldest-supported-numpy
python -m pip install setuptools
- name: Setup OpenMP (Linux)
if: ${{matrix.os == 'ubuntu-latest' && matrix.cxx_compiler == 'clang++'}}
run: sudo apt-get update; sudo apt-get install -y libomp5 libomp-dev
- name: Setup OpenMP (MacOS)
if: ${{matrix.os == 'macos-latest'}}
run: |
brew install libomp
echo "CC=$(brew --prefix llvm)/bin/clang" >> $GITHUB_ENV
echo "CXX=$(brew --prefix llvm)/bin/clang++" >> $GITHUB_ENV
echo "LDFLAGS=\"-L$(brew --prefix llvm)/lib\"" >> $GITHUB_ENV
echo "CPPFLAGS=\"-I$(brew --prefix llvm)/include\"" >> $GITHUB_ENV
- name: Run CMake
id: cmake
run: >-
ctest -VV -S .github/ctest_configure.cmake ${{ env.CDASH_ARGS }}
-DCMAKE_BUILD_TYPE=${{matrix.build_type}}
-DCMAKE_C_COMPILER=${{matrix.c_compiler}}
-DCMAKE_CXX_COMPILER=${{matrix.cxx_compiler}}
-DBUILD_TESTING_FULL=ON
-DZFP_WITH_OPENMP=${{matrix.omp}}
-DBUILD_ZFPY=ON
-DPYTHON_INCLUDE_DIR=$(python -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())")
-DPYTHON_LIBRARY=$(python -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR'))")
- name: Build
id: build
run: ctest -VV -S .github/ctest_build.cmake ${{ env.CDASH_ARGS }}
- name: Run Tests
id: test
run: ctest -VV -S .github/ctest_test.cmake ${{ env.CDASH_ARGS }}