diff --git a/.github/workflows/build_and_test_compiler_zoo.yml b/.github/workflows/build_and_test_compiler_zoo.yml index be32d71..6471de3 100644 --- a/.github/workflows/build_and_test_compiler_zoo.yml +++ b/.github/workflows/build_and_test_compiler_zoo.yml @@ -14,11 +14,26 @@ jobs: image: dbwy/chemistry strategy: matrix: - compiler: [ {suite: gnu, version: 12}, {suite: llvm, version: 14} ] + compiler: + - {suite: gnu, version: 12} + - {suite: llvm, version: 14} + - {suite: llvm, version: 19} + - {suite: llvm, version: 21} steps: - uses: actions/checkout@v3 + - name: Install LLVM toolchain + if: ${{ matrix.compiler.suite == 'llvm' }} + shell: bash + run: | + set -euo pipefail + apt-get update + apt-get install -y wget gnupg lsb-release software-properties-common + wget https://apt.llvm.org/llvm.sh + chmod +x llvm.sh + ./llvm.sh ${{ matrix.compiler.version }} -y + - name: Setup Compiler shell: bash run: $GITHUB_WORKSPACE/.github/workflows/scripts/compiler_setup.sh diff --git a/.github/workflows/scripts/compiler_setup.sh b/.github/workflows/scripts/compiler_setup.sh index 2d6fae0..467ed0f 100755 --- a/.github/workflows/scripts/compiler_setup.sh +++ b/.github/workflows/scripts/compiler_setup.sh @@ -1,10 +1,13 @@ -#/bin/bash +#!/bin/bash export CSUITE=$1 export CVER=$2 if [[ "${CSUITE}" == "llvm" ]] then + # register the specific clang version as an alternative (needed once per version) + update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${CVER} 50 + update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-${CVER} 50 update-alternatives --set clang /usr/bin/clang-${CVER} update-alternatives --set clang++ /usr/bin/clang++-${CVER} update-alternatives --install /usr/bin/cc cc /usr/bin/clang 30 @@ -20,3 +23,6 @@ else exit 125 fi +echo "Selected compilers:" +echo " cc -> $(command -v cc) | $(cc --version | head -1)" +echo " c++ -> $(command -v c++) | $(c++ --version | head -1)" diff --git a/include/integratorxx/quadratures/radial/radial_transform.hpp b/include/integratorxx/quadratures/radial/radial_transform.hpp index a319a49..89257ef 100644 --- a/include/integratorxx/quadratures/radial/radial_transform.hpp +++ b/include/integratorxx/quadratures/radial/radial_transform.hpp @@ -32,8 +32,13 @@ struct RadialTransformQuadrature : using point_container = typename base_type::point_container; using weight_container = typename base_type::weight_container; - RadialTransformQuadrature(const RadialTraitsType& traits = RadialTraitsType()) : - base_type(traits) { } + RadialTransformQuadrature(const RadialTraitsType& traits) + : base_type(traits) {} + + template::value>> + RadialTransformQuadrature() : base_type(T{}) {} + RadialTransformQuadrature(const RadialTraits& traits) : RadialTransformQuadrature(radial_traits_cast(traits)) { }