Check for feature test macro in try_print #83
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build using Conan | |
on: | |
push: | |
branches: ["main", "develop"] | |
pull_request: | |
branches: ["main"] | |
jobs: | |
build: | |
runs-on: ${{ matrix.runner }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
# Linux/GCC | |
- runner: ubuntu-22.04 | |
arch: x86_64 | |
os: Linux | |
compiler: | |
name: gcc | |
version: 10 | |
cppstd: 20 | |
- runner: ubuntu-24.04 | |
arch: x86_64 | |
os: Linux | |
compiler: | |
name: gcc | |
version: 14 | |
cppstd: 23 | |
# Linux/Clang/libc++ | |
- runner: ubuntu-20.04 | |
arch: x86_64 | |
os: Linux | |
compiler: | |
name: clang | |
version: 10 | |
libcxx: libc++ | |
cppstd: 20 | |
- runner: ubuntu-22.04 | |
arch: x86_64 | |
os: Linux | |
compiler: | |
name: clang | |
version: 16 | |
libcxx: libc++ | |
cppstd: 23 | |
# Linux/Clang/libstdc++ | |
- runner: ubuntu-20.04 | |
arch: x86_64 | |
os: Linux | |
compiler: | |
name: clang | |
version: 10 | |
libcxx: libstdc++11 | |
cppstd: 20 | |
# Test before and after https://github.com/llvm/llvm-project/issues/62801 is fixed | |
- runner: ubuntu-22.04 | |
arch: x86_64 | |
os: Linux | |
compiler: | |
name: clang | |
version: 18 | |
libcxx: libstdc++11 | |
cppstd: 23 | |
- runner: ubuntu-22.04 | |
arch: x86_64 | |
os: Linux | |
compiler: | |
name: clang | |
version: 19 | |
libcxx: libstdc++11 | |
cppstd: 23 | |
# Windows/MSVC | |
- runner: windows-2019 | |
compiler: | |
name: msvc | |
version: 192 | |
cppstd: 20 | |
os: Windows | |
arch: x86_64 | |
- runner: windows-2022 | |
compiler: | |
name: msvc | |
version: 194 | |
cppstd: 23 | |
os: Windows | |
arch: x86_64 | |
# Mac/Apple Clang | |
- runner: macos-14 | |
compiler: | |
name: apple-clang | |
version: 15 | |
cppstd: 23 | |
os: Macos | |
arch: armv8 | |
- runner: macos-12 | |
compiler: | |
name: apple-clang | |
version: 13.1 | |
cppstd: 20 | |
os: Macos | |
arch: x86_64 | |
steps: | |
- name: Install compiler | |
if: ${{ matrix.os == 'Linux' }} | |
run: | | |
if [ ${{ matrix.compiler.name }} == "clang" ] | |
then | |
wget https://apt.llvm.org/llvm.sh | |
chmod +x llvm.sh | |
sudo ./llvm.sh ${{ matrix.compiler.version }} | |
rm llvm.sh | |
if [ ${{ matrix.compiler.libcxx }} == "libc++" ] | |
then | |
sudo apt install libc++-${{ matrix.compiler.version }}-dev libc++abi-${{ matrix.compiler.version }}-dev | |
fi | |
else | |
sudo apt install g++-${{ matrix.compiler.version }} -y | |
fi | |
# Step specifically for this version, probably fine since we likely won't test more than | |
# 2 Mac configs at the same time. | |
- name: Switch XCode version | |
if: ${{ matrix.os == 'Macos' && matrix.compiler.version == '13.1' }} | |
run: sudo xcode-select -switch /Applications/Xcode_13.1.app | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install Conan | |
run: | | |
pip install conan | |
conan config install conan/settings_user.yml | |
env: | |
# We're in a sandbox of some sort, so for simplicity just force install globally | |
PIP_BREAK_SYSTEM_PACKAGES: "1" | |
- name: Install Ninja | |
uses: seanmiddleditch/gha-setup-ninja@master | |
- name: Build | |
run: > | |
conan build . | |
-pr:a ./conan/profiles/${{ matrix.compiler.name }} | |
-s:a os=${{ matrix.os }} | |
-s:a arch=${{ matrix.arch }} | |
-s:a build_type=Release | |
-s:a compiler.cppstd=${{ matrix.compiler.cppstd }} | |
-b missing | |
env: | |
COMPILER_VERSION: ${{ matrix.compiler.version }} | |
LIBCXX: ${{ matrix.compiler.libcxx }} | |
- name: Test | |
shell: bash | |
run: ctest --preset conan-release --output-on-failure --verbose |