Skip to content

Update macros in config file #100

Update macros in config file

Update macros in config file #100

Workflow file for this run

name: Tests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
# Clang tests
clang:
strategy:
fail-fast: false
matrix:
clang: [ 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 ]
stdlib: [ "libc++", "libstdc++" ]
standard: [ 11, 14, 17, 20, 23 ]
exception: [ "exceptions" ]
exclude:
- clang: 6
stdlib: libc++
- clang: 6
standard: 20
- clang: 6
standard: 23
- clang: 7
stdlib: libstdc++
standard: 20
- clang: 7
stdlib: libstdc++
standard: 23
- clang: 8
stdlib: libstdc++
standard: 20
- clang: 8
stdlib: libstdc++
standard: 23
- clang: 12
stdlib: libc++
include:
- clang: 14
stdlib: "libc++"
standard: 11
exception: "no-exceptions"
- clang: 17
stdlib: "libstdc++"
standard: 23
exception: "no-exceptions"
name: "Clang ${{ matrix.clang }} [C++${{ matrix.standard }}, ${{ matrix.stdlib }}, ${{ matrix.exception }}]"
runs-on: ubuntu-20.04
steps:
- name: "Install Clang"
uses: egor-tensin/setup-clang@ef434b41eb33a70396fb336b1bae39c76d740c3d # v1.4
with:
version: ${{ matrix.clang }}
- name: "Install libc++"
if: ${{ matrix.stdlib == 'libc++' }}
run: sudo apt-get install libc++abi-${{ matrix.clang }}-dev libc++1-${{ matrix.clang }} libc++-${{ matrix.clang }}-dev
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- run: c++ -v
- name: Set reusable strings
id: strings
shell: bash
run: |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
- name: Configure CMake
run: >
cmake -B ${{ steps.strings.outputs.build-output-dir }} -S ${{ github.workspace }}
-DCMAKE_CXX_STANDARD=${{ matrix.standard }}
-DCMAKE_CXX_FLAGS="-stdlib=${{ matrix.stdlib }} -f${{ matrix.exception }}"
-DCMAKE_CXX_COMPILER=c++
-DCMAKE_BUILD_TYPE=Release
-DIPADDRESS_ENABLE_CLANG_TIDY=OFF
-DIPADDRESS_BUILD_TESTS=ON
-DIPADDRESS_BUILD_DOC=OFF
-DIPADDRESS_BUILD_PACKAGES=OFF
-DIPADDRESS_NO_EXCEPTIONS=${{ matrix.exception == 'no-exceptions' }}
- name: Build
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config Release -j2
- name: Run tests
run: ctest --output-on-failure --test-dir ${{ steps.strings.outputs.build-output-dir }}
# Apple Clang tests
appleclang:
strategy:
fail-fast: false
matrix:
macos: [ 11, 12, 13 ]
standard: [ 11, 14, 17, 20, 23 ]
exception: [ "exceptions" ]
include:
- macos: 11
standard: 11
exception: "no-exceptions"
- macos: 11
standard: 23
exception: "no-exceptions"
name: "AppleClang MacOS ${{ matrix.macos }} [C++${{ matrix.standard }}, ${{ matrix.exception }}]"
runs-on: macos-${{ matrix.macos }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- run: c++ -v
- name: Set reusable strings
id: strings
shell: bash
run: |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
- name: Configure CMake
run: >
cmake -B ${{ steps.strings.outputs.build-output-dir }} -S ${{ github.workspace }}
-DCMAKE_CXX_STANDARD=${{ matrix.standard }}
-DCMAKE_CXX_COMPILER=c++
-DCMAKE_CXX_FLAGS=-f${{ matrix.exception }}
-DCMAKE_BUILD_TYPE=Release
-DIPADDRESS_ENABLE_CLANG_TIDY=OFF
-DIPADDRESS_BUILD_TESTS=ON
-DIPADDRESS_BUILD_DOC=OFF
-DIPADDRESS_BUILD_PACKAGES=OFF
-DIPADDRESS_NO_EXCEPTIONS=${{ matrix.exception == 'no-exceptions' }}
- name: Build
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config Release -j2
- name: Run tests
run: ctest --output-on-failure --test-dir ${{ steps.strings.outputs.build-output-dir }}
# GCC tests
gcc:
strategy:
fail-fast: false
matrix:
gcc: [ 7, 8, 9, 10, 11, 13 ]
standard: [ 11, 14, 17, 20, 23 ]
exception: [ "exceptions" ]
include:
- gcc: 7
standard: 11
exception: "no-exceptions"
- gcc: 13
standard: 23
exception: "no-exceptions"
name: "GCC ${{ matrix.gcc }} [C++${{ matrix.standard }}, ${{ matrix.exception }}]"
runs-on: ubuntu-20.04
steps:
- name: "Install GCC"
uses: egor-tensin/setup-gcc@eaa888eb19115a521fa72b65cd94fe1f25bbcaac # v1.3
with:
version: ${{ matrix.gcc }}
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- run: c++ -v
- name: Set reusable strings
id: strings
shell: bash
run: |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
- name: Configure CMake
run: >
cmake -B ${{ steps.strings.outputs.build-output-dir }} -S ${{ github.workspace }}
-DCMAKE_CXX_STANDARD=${{ matrix.standard }}
-DCMAKE_CXX_COMPILER=c++
-DCMAKE_CXX_FLAGS=-f${{ matrix.exception }}
-DCMAKE_BUILD_TYPE=Release
-DIPADDRESS_ENABLE_CLANG_TIDY=OFF
-DIPADDRESS_BUILD_TESTS=ON
-DIPADDRESS_BUILD_DOC=OFF
-DIPADDRESS_BUILD_PACKAGES=OFF
-DIPADDRESS_NO_EXCEPTIONS=${{ matrix.exception == 'no-exceptions' }}
- name: Build
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config Release -j2
- name: Run tests
run: ctest --output-on-failure --test-dir ${{ steps.strings.outputs.build-output-dir }}
# MSVC tests
msvc:
strategy:
fail-fast: false
matrix:
version: [ "14.29", "14.39" ]
standard: [ 14, 17, 20, 23 ]
exception: [ "exceptions" ]
include:
- version: "14.29"
standard: 14
exception: "no-exceptions"
- version: "14.29"
standard: 23
exception: "no-exceptions"
name: "MSVC ${{ matrix.version }} [C++${{ matrix.standard }}, ${{ matrix.exception }}]"
runs-on: windows-2022
steps:
- name: Add MSVC ${{ matrix.version }} to PATH
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
with:
toolset: ${{ matrix.version }}
arch: amd64_x86
- name: "Install Ninja & CMake"
run: choco install ninja cmake
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set reusable strings
id: strings
shell: bash
run: |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
- name: Configure CMake
run: >
cmake -B ${{ steps.strings.outputs.build-output-dir }} -S ${{ github.workspace }}
-G Ninja
-DCMAKE_CXX_STANDARD=${{ matrix.standard }}
-DCMAKE_BUILD_TYPE=Release
-DIPADDRESS_ENABLE_CLANG_TIDY=OFF
-DIPADDRESS_BUILD_TESTS=ON
-DIPADDRESS_BUILD_DOC=OFF
-DIPADDRESS_BUILD_PACKAGES=OFF
-DIPADDRESS_NO_EXCEPTIONS=${{ matrix.exception == 'no-exceptions' }}
- name: Build
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config Release -j2
- name: Run tests
run: ctest --output-on-failure --test-dir ${{ steps.strings.outputs.build-output-dir }}