Add gcc-11 and 12, plus clang-11, 12, 13 and 14

This commit is contained in:
jzmaddock
2022-05-10 17:56:56 +01:00
committed by GitHub
parent c11afa5ffa
commit 2fb424497c
3 changed files with 105 additions and 1 deletions

View File

@ -7,6 +7,94 @@
name: CI
on: [ push, pull_request ]
jobs:
ubuntu-jammy:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
compiler: [ g++-11, g++-12, clang++-14 ]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- uses: mstachniuk/ci-skip@v1
with:
commit-filter: '[skip ci];[ci skip];[CI SKIP];[SKIP CI];***CI SKIP***;***SKIP CI***;[windows];[Windows];[WINDOWS];[apple];[Apple];[APPLE]'
commit-filter-separator: ';'
fail-fast: true
- name: Set TOOLSET
run: echo ${{ matrix.compiler }} | awk '/^g/ { print "TOOLSET=gcc" } /^clang/ { print "TOOLSET=clang" }' >> $GITHUB_ENV
- name: Add repository
run: sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
- name: Install packages
run: sudo apt install g++-11 g++-12 clang-14
- name: Checkout main boost
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
- name: Update Dependencies
run: git submodule update --init tools/build tools/boost_install libs/headers libs/detail libs/core libs/assert libs/type_traits
working-directory: ../boost-root
- name: Copy files
run: cp -r $GITHUB_WORKSPACE/* libs/config
working-directory: ../boost-root
- name: Bootstrap
run: ./bootstrap.sh
working-directory: ../boost-root
- name: Generate headers
run: ./b2 headers
working-directory: ../boost-root
- name: Generate user config
run: 'echo "using $TOOLSET : : ${{ matrix.compiler }} ;" > ~/user-config.jam'
working-directory: ../boost-root
- name: Config info
run: ../../../b2 print_config_info toolset=$TOOLSET cxxstd=03,11,14,17,20
working-directory: ../boost-root/libs/config/test
- name: Test
run: ../../../b2 toolset=$TOOLSET cxxstd=03,11,14,17,20
working-directory: ../boost-root/libs/config/test
ubuntu-jammy-clang:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
compiler: [ clang++-11, clang++-12, clang++-13 ]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- uses: mstachniuk/ci-skip@v1
with:
commit-filter: '[skip ci];[ci skip];[CI SKIP];[SKIP CI];***CI SKIP***;***SKIP CI***;[windows];[Windows];[WINDOWS];[apple];[Apple];[APPLE]'
commit-filter-separator: ';'
fail-fast: true
- name: Set TOOLSET
run: echo ${{ matrix.compiler }} | awk '/^g/ { print "TOOLSET=gcc" } /^clang/ { print "TOOLSET=clang" }' >> $GITHUB_ENV
- name: Add repository
run: sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
- name: Install packages
run: sudo apt install clang-11 clang-12 clang-13
- name: Checkout main boost
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
- name: Update Dependencies
run: git submodule update --init tools/build tools/boost_install libs/headers libs/detail libs/core libs/assert libs/type_traits
working-directory: ../boost-root
- name: Copy files
run: cp -r $GITHUB_WORKSPACE/* libs/config
working-directory: ../boost-root
- name: Bootstrap
run: ./bootstrap.sh
working-directory: ../boost-root
- name: Generate headers
run: ./b2 headers
working-directory: ../boost-root
- name: Generate user config
run: 'echo "using $TOOLSET : : ${{ matrix.compiler }} ;" > ~/user-config.jam'
working-directory: ../boost-root
- name: Config info
run: ../../../b2 print_config_info toolset=$TOOLSET cxxstd=03,11,14,17,20
working-directory: ../boost-root/libs/config/test
- name: Test
run: ../../../b2 toolset=$TOOLSET cxxstd=03,11,14,17,20
working-directory: ../boost-root/libs/config/test
ubuntu-focal:
runs-on: ubuntu-20.04
strategy:

View File

@ -409,6 +409,17 @@ extern "C" char *gets (char *__s);
#endif
#endif
#if defined(__clang__)
#if (__clang_major__ < 11) && !defined(BOOST_NO_CXX20_HDR_RANGES)
# define BOOST_NO_CXX20_HDR_RANGES
#endif
#if (__clang_major__ < 10) && (BOOST_LIBSTDCXX_VERSION >= 110000) && !defined(BOOST_NO_CXX11_HDR_CHRONO)
// Old clang can't parse <chrono>:
# define BOOST_NO_CXX11_HDR_CHRONO
# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
#endif
#endif
//
// Headers not present on Solaris with the Oracle compiler:
#if defined(__SUNPRO_CC) && (__SUNPRO_CC < 0x5140)

View File

@ -31,7 +31,7 @@ struct is_abstract_test
template<class U>
static char check_sig(...);
#ifdef __GNUC__
#if defined(__GNUC__) && (__GNUC__ < 10)
enum{ s1 = sizeof(is_abstract_test<T>::template check_sig<T>(0)) };
#else
enum{ s1 = sizeof(check_sig<T>(0)) };
@ -46,7 +46,12 @@ struct abstract{ virtual void foo() = 0; };
int test()
{
#if defined(__GNUC__) && (__GNUC__ > 10)
// GCC-11 fails the above test, but this is irrelevant in any case:
return 0;
#else
return static_cast<bool>(is_abstract_test<non_abstract>::value) == static_cast<bool>(is_abstract_test<abstract>::value);
#endif
}
}