Skip to content

CI: Fix broken OSX tests #13

CI: Fix broken OSX tests

CI: Fix broken OSX tests #13

Workflow file for this run

name: linux-ci
on:
push:
branches: [ master, main, develop, '*.x' ]
pull_request:
branches: [ master, main, develop, '*.x' ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
BUILD_TYPE: Release
ASAN_OPTIONS: "detect_leaks=0"
jobs:
ci:
runs-on: ubuntu-${{ matrix.os-release }}
strategy:
matrix:
include:
- build_type: 'Debug'
build_libs: 'shared'
compiler: 'gcc'
extra_args: '--coverage --tbb --num-tasks=64'
extra_packages: 'clang-tidy'
standard: '11'
os-release: '22.04'
- build_type: 'RelWithDebInfo'
build_libs: 'shared'
compiler: 'clang-15'
extra_args: '--num-tasks=256 --sanitizer --sanitizer-type=leak --static-analysis'
extra_packages: 'clang-tidy-15'
standard: '11'
os-release: '22.04'
- build_type: 'RelWithDebInfo'
build_libs: 'shared'
compiler: 'clang-15'
extra_args: '--num-tasks=256 --tbb --sanitizer --sanitizer-type=address --static-analysis'
extra_packages: 'clang-tidy-15'
standard: '14'
os-release: '22.04'
- build_type: 'RelWithDebInfo'
build_libs: 'shared'
compiler: 'clang-15'
extra_args: '--num-tasks=256 --tbb --sanitizer --sanitizer-type=thread --static-analysis'
extra_cmake: '-DPTL_USE_LOCKS=ON'
extra_packages: 'clang-tidy-15'
standard: '17'
os-release: '22.04'
build_libs: ['shared static']
build_type: ['Release']
compiler: ['gcc-10', 'gcc-11', 'gcc-12', 'gcc-13', 'clang-13', 'clang-14', 'clang-15']
extra_args: ['--num-tasks=256 --tbb']
extra_ctest: ['']
os-release: ['22.04']
standard: ['11', '17']
steps:
- uses: actions/checkout@v2
- name: Install Conda
run:
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh &&
bash miniconda.sh -b -p /opt/conda &&
export PATH="/opt/conda/bin:${PATH}" &&
conda config --set always_yes yes --set changeps1 yes &&
conda update -c defaults -n base conda &&
conda create -n pyctest -c defaults -c conda-forge python=3.7 pyctest &&
source activate &&
conda activate pyctest
- name: Configure Repos
if: matrix.os-release == '20.04'
run:
DISTRIB_CODENAME=$(cat /etc/lsb-release | grep DISTRIB_CODENAME | awk -F '=' '{print $NF}') &&
sudo apt-get update &&
sudo apt-get install -y software-properties-common wget curl &&
sudo add-apt-repository -u -y ppa:ubuntu-toolchain-r/test &&
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - &&
echo "deb http://apt.llvm.org/${DISTRIB_CODENAME}/ llvm-toolchain-${DISTRIB_CODENAME}-9 main" >> llvm-toolchain.list &&
echo "deb-src http://apt.llvm.org/${DISTRIB_CODENAME}/ llvm-toolchain-${DISTRIB_CODENAME}-9 main" >> llvm-toolchain.list &&
echo "deb http://apt.llvm.org/${DISTRIB_CODENAME}/ llvm-toolchain-${DISTRIB_CODENAME}-10 main" >> llvm-toolchain.list &&
echo "deb-src http://apt.llvm.org/${DISTRIB_CODENAME}/ llvm-toolchain-${DISTRIB_CODENAME}-10 main" >> llvm-toolchain.list &&
echo "deb http://apt.llvm.org/${DISTRIB_CODENAME}/ llvm-toolchain-${DISTRIB_CODENAME}-11 main" >> llvm-toolchain.list &&
echo "deb-src http://apt.llvm.org/${DISTRIB_CODENAME}/ llvm-toolchain-${DISTRIB_CODENAME}-11 main" >> llvm-toolchain.list &&
echo "deb http://apt.llvm.org/${DISTRIB_CODENAME}/ llvm-toolchain-${DISTRIB_CODENAME}-12 main" >> llvm-toolchain.list &&
echo "deb-src http://apt.llvm.org/${DISTRIB_CODENAME}/ llvm-toolchain-${DISTRIB_CODENAME}-12 main" >> llvm-toolchain.list &&
cat llvm-toolchain.list &&
sudo mv llvm-toolchain.list /etc/apt/sources.list.d/
- name: Configure Repos
if: matrix.os-release == '22.04'
run:
sudo apt-get update &&
sudo apt-get install -y software-properties-common wget curl &&
sudo add-apt-repository -u -y ppa:ubuntu-toolchain-r/test
- name: Install Repos
run:
export CC=${{ matrix.compiler }} &&
export CXX=$(echo "${{ matrix.compiler }}" | sed 's/gcc/g++/1' | sed 's/clang/clang++/1') &&
echo "C compiler is ${CC}" &&
echo "C++ compiler is ${CXX}" &&
sudo apt-get update &&
sudo apt-get install -y lcov libtbb-dev ${{ matrix.extra_packages }} &&
sudo apt-get install -y build-essential ${CC} ${CXX}
- name: Build and Test
run:
export PATH="/opt/conda/bin:${PATH}" &&
source activate &&
conda activate pyctest &&
export CMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH}:${CONDA_PREFIX}" &&
export CC=$(which ${{ matrix.compiler }}) &&
export CXX=$(which $(echo "${{ matrix.compiler }}" | sed 's/gcc/g++/1' | sed 's/clang/clang++/1')) &&
echo "C compiler is ${CC}" &&
echo "C++ compiler is ${CXX}" &&
python ./pyctest-runner.py -SF
--pyctest-model=Continuous
--pyctest-site=GitHub-Linux
--pyctest-build-type=${{ matrix.build_type }}
--build-libs ${{ matrix.build_libs }}
${{ matrix.extra_args }}
-- -VV ${{ matrix.extra_ctest }}
-- -DCMAKE_INSTALL_PREFIX=${HOME}/ptl-install -DCMAKE_CXX_STANDARD=${{ matrix.standard }} ${{ matrix.extra_cmake }}
- name: Install
run:
export PATH="/opt/conda/bin:${PATH}" &&
source activate &&
conda activate pyctest &&
export CMAKE_PREFIX_PATH="${HOME}/ptl-install:${CMAKE_PREFIX_PATH}:${CONDA_PREFIX}" &&
cmake --build build-PTL --target install &&
cmake -B ${HOME}/ptl-examples-build ${PWD}/examples &&
cmake --build ${HOME}/ptl-examples-build --target all