Skip to content

Building and Testing #992

Building and Testing

Building and Testing #992

name: Building and Testing
on:
pull_request:
branches:
- master
schedule:
- cron: '0 1 * * *'
jobs:
build-and-test-linux:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
compiler: [g++, clang++, icpc, icpx]
timeout-minutes: 15
steps:
- uses: actions/checkout@v2
- name: Install valgrind
run: |
sudo apt-get update
sudo apt-get install valgrind
- name: Install clang
if: ${{ matrix.compiler == 'clang++' }}
run: |
sudo apt-get install clang
- name: Install intel compiler
if: "contains(matrix.compiler, 'icp')"
run: |
# see https://software.intel.com/content/www/us/en/develop/articles/installing-intel-oneapi-toolkits-via-apt.html#pkgtable
cd /tmp
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
sudo apt-get update
sudo apt-get install intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic
- name: Building
run: |
if [ ${{ matrix.compiler }} = icpc ] || [ ${{ matrix.compiler }} = icpx ]; then
source /opt/intel/oneapi/setvars.sh
fi
export CXX=${{ matrix.compiler }}
cmake -H"." -DVTU11_ENABLE_TESTS=ON -B"build"
cmake --build "build" -j2
- name: Run tests
shell: bash
run: |
cd build
ctest -T memcheck
build-and-test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, macOS-latest]
timeout-minutes: 15
steps:
- uses: actions/checkout@v2
- name: Building
run: |
cmake -H"." -DVTU11_ENABLE_TESTS=ON -B"build"
cmake --build "build"
- name: Run tests
shell: bash
run: |
cd build
ctest