Merge pull request #9 from VladimirShaleev/upgrade-versions #118
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: Tests | |
on: | |
push: | |
branches: [ "main" ] | |
paths: [ "**.hpp", "**.cpp", "**.ixx", "**.txt", "!doc/**" ] | |
pull_request: | |
branches: [ "main" ] | |
paths: [ "**.hpp", "**.cpp", "**.ixx", "**.txt", "!doc/**" ] | |
jobs: | |
# Clang tests | |
clang: | |
strategy: | |
fail-fast: false | |
matrix: | |
clang: [ 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 ] | |
stdlib: [ "libc++", "libstdc++" ] | |
standard: [ 11, 14, 17, 20, 23 ] | |
exception: [ "exceptions" ] | |
cppmodule: [ "OFF" ] | |
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" | |
cppmodule: "OFF" | |
- clang: 17 | |
stdlib: libstdc++ | |
standard: 23 | |
exception: "no-exceptions" | |
cppmodule: "OFF" | |
- clang: 17 | |
stdlib: libc++ | |
standard: 20 | |
exception: "exceptions" | |
cppmodule: "ON" | |
- clang: 17 | |
stdlib: libstdc++ | |
standard: 23 | |
exception: "exceptions" | |
cppmodule: "ON" | |
name: "Clang ${{ matrix.clang }} [C++${{ matrix.standard }}, ${{ matrix.stdlib }}, ${{ matrix.exception }}, cppmodule=${{ matrix.cppmodule }}]" | |
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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- 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_BUILD_MODULE=${{ matrix.cppmodule }} | |
-DIPADDRESS_TEST_MODULE=${{ matrix.cppmodule }} | |
-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: [ 13, 14, 15 ] | |
standard: [ 11, 14, 17, 20, 23 ] | |
exception: [ "exceptions" ] | |
include: | |
- macos: 13 | |
standard: 11 | |
exception: "no-exceptions" | |
- macos: 13 | |
standard: 23 | |
exception: "no-exceptions" | |
name: "AppleClang MacOS ${{ matrix.macos }} [C++${{ matrix.standard }}, ${{ matrix.exception }}]" | |
runs-on: macos-${{ matrix.macos }} | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- 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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- 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", "" ] | |
standard: [ 14, 17, 20, 23 ] | |
exception: [ "exceptions" ] | |
cppmodule: [ "OFF" ] | |
include: | |
- version: "14.29" | |
standard: 14 | |
exception: "no-exceptions" | |
cppmodule: "OFF" | |
- version: "14.29" | |
standard: 23 | |
exception: "no-exceptions" | |
cppmodule: "OFF" | |
- version: "" | |
standard: 20 | |
exception: "exceptions" | |
cppmodule: "ON" | |
- version: "" | |
standard: 23 | |
exception: "exceptions" | |
cppmodule: "ON" | |
name: "MSVC ${{ matrix.version }} [C++${{ matrix.standard }}, ${{ matrix.exception }}, cppmodule=${{ matrix.cppmodule }}]" | |
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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- 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_BUILD_MODULE=${{ matrix.cppmodule }} | |
-DIPADDRESS_TEST_MODULE=${{ matrix.cppmodule }} | |
-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 }} |