Allow more comparisons #118
Workflow file for this run
This file contains hidden or 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: ci | |
| on: | |
| push: | |
| pull_request: | |
| # TODO: Check different standards? | |
| # TODO: Re-enable testing in release | |
| jobs: | |
| test-linux: | |
| runs-on: ubuntu-22.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| compiler: [g++-10, clang++-14] | |
| cxx_version: [ cxx_std_17, cxx_std_20 ] | |
| target: [Debug, Release] | |
| shared: [ON, OFF] | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: dependencies | |
| run: | | |
| sudo apt install gcc-10 g++-10 libgcc-10-dev | |
| python3 -m pip install git+https://github.com/jeffkaufman/icdiff.git | |
| - name: build | |
| run: | | |
| mkdir -p build | |
| cd build | |
| cmake .. \ | |
| -GNinja \ | |
| -DCMAKE_BUILD_TYPE=${{matrix.target}} \ | |
| -DCMAKE_CXX_COMPILER=${{matrix.compiler}} \ | |
| -DLIBASSERT_DESIRED_CXX_STANDARD="${{matrix.cxx_version}}" \ | |
| -DLIBASSERT_BUILD_SHARED=${{matrix.shared}} \ | |
| -DCPPTRACE_BUILD_SHARED=ON \ | |
| -DLIBASSERT_BUILD_TESTING=On \ | |
| -DLIBASSERT_WERROR_BUILD=On \ | |
| -DLIBASSERT_DISABLE_CXX_20_MODULES=On | |
| ninja | |
| - name: test | |
| working-directory: build | |
| run: | | |
| CTEST_OUTPUT_ON_FAILURE=1 ninja test | |
| test-linux-modules: | |
| runs-on: ubuntu-24.04 | |
| needs: test-linux | |
| strategy: | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: dependencies | |
| run: | | |
| sudo apt install ninja-build clang-19 clang-tools-19 | |
| python3 -m pip install git+https://github.com/jeffkaufman/icdiff.git | |
| - name: build | |
| run: | | |
| mkdir -p build | |
| cd build | |
| cmake .. \ | |
| -GNinja \ | |
| -DCMAKE_BUILD_TYPE=Debug \ | |
| -DCMAKE_CXX_COMPILER=clang++-19 \ | |
| -DCMAKE_C_COMPILER=clang-19 \ | |
| -DCMAKE_CXX_STANDARD=20 \ | |
| -DLIBASSERT_DESIRED_CXX_STANDARD=cxx_std_20 \ | |
| -DCPPTRACE_BUILD_SHARED=ON \ | |
| -DLIBASSERT_BUILD_TESTING=On \ | |
| -DLIBASSERT_WERROR_BUILD=On | |
| ninja | |
| - name: test | |
| working-directory: build | |
| run: | | |
| CTEST_OUTPUT_ON_FAILURE=1 ninja test | |
| test-linux-enchantum: | |
| runs-on: ubuntu-24.04 | |
| needs: test-linux | |
| strategy: | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: dependencies | |
| run: | | |
| sudo apt install ninja-build clang-19 clang-tools-19 | |
| python3 -m pip install git+https://github.com/jeffkaufman/icdiff.git | |
| - name: build | |
| run: | | |
| mkdir -p build | |
| cd build | |
| cmake .. \ | |
| -GNinja \ | |
| -DCMAKE_BUILD_TYPE=Debug \ | |
| -DCMAKE_CXX_STANDARD=20 \ | |
| -DLIBASSERT_DESIRED_CXX_STANDARD=cxx_std_20 \ | |
| -DCPPTRACE_BUILD_SHARED=ON \ | |
| -DLIBASSERT_BUILD_TESTING=On \ | |
| -DLIBASSERT_WERROR_BUILD=On \ | |
| -DLIBASSERT_USE_ENCHANTUM=On \ | |
| -DLIBASSERT_DISABLE_CXX_20_MODULES=On | |
| ninja | |
| - name: test | |
| working-directory: build | |
| run: | | |
| CTEST_OUTPUT_ON_FAILURE=1 ninja test | |
| # test-linux-gcc-8: | |
| # runs-on: ubuntu-20.04 | |
| # strategy: | |
| # fail-fast: false | |
| # matrix: | |
| # compiler: [g++-8] | |
| # target: [Debug, Release] | |
| # steps: | |
| # - uses: actions/checkout@v2 | |
| # - name: dependencies | |
| # run: | | |
| # sudo apt install gcc-8 g++-8 libgcc-8-dev | |
| # python3 -m pip install git+https://github.com/jeffkaufman/icdiff.git | |
| # - name: build | |
| # run: | | |
| # mkdir -p build | |
| # cd build | |
| # cmake .. \ | |
| # -DCMAKE_BUILD_TYPE=${{matrix.target}} \ | |
| # -DCMAKE_CXX_COMPILER=${{matrix.compiler}} \ | |
| # -DLIBASSERT_BUILD_TESTING=On \ | |
| # -DLIBASSERT_WERROR_BUILD=On | |
| # make -j | |
| # - name: test | |
| # working-directory: build | |
| # run: | | |
| # CTEST_OUTPUT_ON_FAILURE=1 make test | |
| test-macos: | |
| runs-on: macos-14 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| compiler: [g++-12, clang++] | |
| cxx_version: [ cxx_std_17, cxx_std_20 ] | |
| target: [Debug, Release] | |
| shared: [ON, OFF] | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: dependencies | |
| run: | | |
| brew install icdiff | |
| - name: build | |
| run: | | |
| mkdir -p build | |
| cd build | |
| cmake .. \ | |
| -GNinja \ | |
| -DCMAKE_BUILD_TYPE=${{matrix.target}} \ | |
| -DCMAKE_CXX_COMPILER=${{matrix.compiler}} \ | |
| -DLIBASSERT_DESIRED_CXX_STANDARD="${{matrix.cxx_version}}" \ | |
| -DLIBASSERT_BUILD_SHARED=${{matrix.shared}} \ | |
| -DCPPTRACE_BUILD_SHARED=ON \ | |
| -DLIBASSERT_BUILD_TESTING=On \ | |
| -DLIBASSERT_WERROR_BUILD=On | |
| ninja | |
| - name: test | |
| working-directory: build | |
| run: | | |
| CTEST_OUTPUT_ON_FAILURE=1 ninja test | |
| test-windows: | |
| runs-on: windows-2022 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| compiler: [cl, clang++] | |
| cxx_version: [ cxx_std_17, cxx_std_20 ] | |
| target: [Debug, Release] | |
| shared: [ON, OFF] | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Enable Developer Command Prompt | |
| uses: ilammy/msvc-dev-cmd@v1.10.0 | |
| - name: dependencies | |
| run: | | |
| pip install icdiff | |
| - name: build msvc | |
| # if: ${{ matrix.compiler == 'cl' }} | |
| run: | | |
| mkdir -p build | |
| cd build | |
| cmake .. ` | |
| -DCMAKE_BUILD_TYPE=${{matrix.target}} ` | |
| -DCMAKE_CXX_COMPILER=${{matrix.compiler}} ` | |
| -DLIBASSERT_DESIRED_CXX_STANDARD="${{matrix.cxx_version}}" ` | |
| -DLIBASSERT_BUILD_SHARED=${{matrix.shared}} ` | |
| -DCPPTRACE_BUILD_SHARED=ON ` | |
| -DLIBASSERT_BUILD_TESTING=On ` | |
| -DLIBASSERT_WERROR_BUILD=On ` | |
| -DLIBASSERT_DISABLE_CXX_20_MODULES=On | |
| cmake --build . --config ${{matrix.target}} | |
| # - name: build clang | |
| # if: ${{ matrix.compiler == 'clang++' }} | |
| # run: | | |
| # mkdir -p build | |
| # cd build | |
| # cmake .. ` | |
| # -DCMAKE_BUILD_TYPE=${{matrix.target}} ` | |
| # -DCMAKE_CXX_COMPILER="C:\msys64\mingw64\bin\clang++" ` | |
| # -DCMAKE_C_COMPILER="C:\msys64\mingw64\bin\clang" ` | |
| # -DLIBASSERT_BUILD_TESTING=On \ | |
| # -DLIBASSERT_WERROR_BUILD=On | |
| # msbuild .\libassert.sln | |
| - name: test | |
| working-directory: build | |
| run: | | |
| ctest -C ${{matrix.target}} --output-on-failure | |
| test-mingw: | |
| runs-on: windows-2022 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| compiler: [g++] | |
| cxx_version: [ cxx_std_17, cxx_std_20 ] | |
| target: [Debug, Release] | |
| shared: [ON, OFF] | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Enable Developer Command Prompt | |
| uses: ilammy/msvc-dev-cmd@v1.10.0 | |
| - name: dependencies | |
| run: | | |
| pip install icdiff | |
| - name: build | |
| run: | | |
| mkdir -p build | |
| cd build | |
| cmake .. ` | |
| -GNinja ` | |
| -DCMAKE_BUILD_TYPE=${{matrix.target}} ` | |
| -DCMAKE_CXX_COMPILER=${{matrix.compiler}} ` | |
| -DLIBASSERT_DESIRED_CXX_STANDARD="${{matrix.cxx_version}}" ` | |
| -DLIBASSERT_BUILD_SHARED=${{matrix.shared}} ` | |
| -DCPPTRACE_BUILD_SHARED=ON ` | |
| -DLIBASSERT_BUILD_TESTING=On ` | |
| -DLIBASSERT_USE_CI_WRAPPER=On ` | |
| -DLIBASSERT_WERROR_BUILD=On ` | |
| -DLIBASSERT_DISABLE_CXX_20_MODULES=On | |
| ninja | |
| - name: test | |
| working-directory: build | |
| run: | | |
| $env:CTEST_OUTPUT_ON_FAILURE=1 | |
| ninja test | |
| clang-tidy: | |
| runs-on: ubuntu-22.04 | |
| needs: test-linux | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: dependencies | |
| run: | | |
| sudo apt install clang-tidy | |
| mkdir build | |
| cd build | |
| cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_CXX_COMPILER=clang++-14 -DCMAKE_C_COMPILER=clang-14 | |
| - name: clang-tidy | |
| run: | | |
| chmod +x lint.sh | |
| # ./lint.sh | |
| prevent-dev-tag: | |
| runs-on: ubuntu-22.04 | |
| if: github.ref == 'refs/heads/main' | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: check | |
| run: | | |
| ! grep 'LIBASSERT_CPPTRACE_TAG "origin/dev"' CMakeLists.txt | |
| test-linux-fetchcontent: | |
| runs-on: ubuntu-22.04 | |
| needs: test-linux | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: test | |
| run: | | |
| tag=$(git rev-parse --abbrev-ref HEAD) | |
| cd .. | |
| cp -rv libassert/tests/fetchcontent-integration . | |
| mkdir fetchcontent-integration/build | |
| cd fetchcontent-integration/build | |
| cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug -DLIBASSERT_TAG=$tag -DLIBASSERT_WERROR_BUILD=On | |
| ninja | |
| ./main | |
| test-linux-findpackage: | |
| runs-on: ubuntu-22.04 | |
| needs: test-linux | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: build | |
| run: | | |
| tag=$(git rev-parse --abbrev-ref HEAD) | |
| mkdir build | |
| cd build | |
| cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug -DLIBASSERT_WERROR_BUILD=On | |
| sudo ninja install | |
| sudo /sbin/ldconfig | |
| cd ../.. | |
| cp -rv libassert/tests/findpackage-integration . | |
| mkdir findpackage-integration/build | |
| cd findpackage-integration/build | |
| cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug | |
| ninja | |
| ./main | |
| test-linux-add_subdirectory: | |
| runs-on: ubuntu-22.04 | |
| needs: test-linux | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: build | |
| run: | | |
| cd .. | |
| cp -rv libassert/tests/add_subdirectory-integration . | |
| cp -rv libassert add_subdirectory-integration | |
| mkdir add_subdirectory-integration/build | |
| cd add_subdirectory-integration/build | |
| cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug -DLIBASSERT_WERROR_BUILD=On | |
| ninja | |
| ./main | |
| test-macos-fetchcontent: | |
| runs-on: macos-14 | |
| needs: test-macos | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: test | |
| run: | | |
| tag=$(git rev-parse --abbrev-ref HEAD) | |
| cd .. | |
| cp -rv libassert/tests/fetchcontent-integration . | |
| mkdir fetchcontent-integration/build | |
| cd fetchcontent-integration/build | |
| cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug -DLIBASSERT_TAG=$tag -DLIBASSERT_WERROR_BUILD=On | |
| ninja | |
| ./main | |
| test-macos-findpackage: | |
| runs-on: macos-14 | |
| needs: test-macos | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: build | |
| run: | | |
| tag=$(git rev-parse --abbrev-ref HEAD) | |
| mkdir build | |
| cd build | |
| cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug -DLIBASSERT_WERROR_BUILD=On | |
| sudo ninja install | |
| cd ../.. | |
| cp -rv libassert/tests/findpackage-integration . | |
| mkdir findpackage-integration/build | |
| cd findpackage-integration/build | |
| cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug | |
| ninja | |
| ./main | |
| test-macos-add_subdirectory: | |
| runs-on: macos-14 | |
| needs: test-macos | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: test | |
| run: | | |
| cd .. | |
| cp -rv libassert/tests/add_subdirectory-integration . | |
| cp -rv libassert add_subdirectory-integration | |
| mkdir add_subdirectory-integration/build | |
| cd add_subdirectory-integration/build | |
| cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug -DLIBASSERT_WERROR_BUILD=On | |
| ninja | |
| ./main | |
| test-mingw-fetchcontent: | |
| runs-on: windows-2022 | |
| needs: test-mingw | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: test | |
| run: | | |
| $tag=$(git rev-parse --abbrev-ref HEAD) | |
| cd .. | |
| cp -Recurse libassert/tests/fetchcontent-integration . | |
| mkdir fetchcontent-integration/build | |
| cd fetchcontent-integration/build | |
| cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug -DLIBASSERT_TAG="$tag" -DLIBASSERT_WERROR_BUILD=On | |
| ninja | |
| .\main.exe | |
| test-mingw-findpackage: | |
| runs-on: windows-2022 | |
| needs: test-mingw | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: test | |
| run: | | |
| $tag=$(git rev-parse --abbrev-ref HEAD) | |
| mkdir build | |
| cd build | |
| cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=C:/foo -DLIBASSERT_WERROR_BUILD=On | |
| ninja install | |
| cd ../.. | |
| cp -Recurse libassert/tests/findpackage-integration . | |
| mkdir findpackage-integration/build | |
| cd findpackage-integration/build | |
| cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=C:/foo | |
| ninja | |
| ./main.exe | |
| test-mingw-add_subdirectory: | |
| runs-on: windows-2022 | |
| needs: test-mingw | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: test | |
| run: | | |
| cd .. | |
| cp -Recurse libassert/tests/add_subdirectory-integration . | |
| cp -Recurse libassert add_subdirectory-integration | |
| mkdir add_subdirectory-integration/build | |
| cd add_subdirectory-integration/build | |
| cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug -DLIBASSERT_WERROR_BUILD=On | |
| ninja | |
| .\main.exe | |
| test-windows-fetchcontent: | |
| runs-on: windows-2022 | |
| needs: test-windows | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Enable Developer Command Prompt | |
| uses: ilammy/msvc-dev-cmd@v1.10.0 | |
| - name: test | |
| run: | | |
| $tag=$(git rev-parse --abbrev-ref HEAD) | |
| cd .. | |
| cp -Recurse libassert/tests/fetchcontent-integration . | |
| mkdir fetchcontent-integration/build | |
| cd fetchcontent-integration/build | |
| cmake .. -DCMAKE_BUILD_TYPE=Debug -DLIBASSERT_TAG="$tag" -DLIBASSERT_WERROR_BUILD=On | |
| msbuild demo_project.sln | |
| .\Debug\main.exe | |
| test-windows-findpackage: | |
| runs-on: windows-2022 | |
| needs: test-windows | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Enable Developer Command Prompt | |
| uses: ilammy/msvc-dev-cmd@v1.10.0 | |
| - name: test | |
| run: | | |
| $tag=$(git rev-parse --abbrev-ref HEAD) | |
| mkdir build | |
| cd build | |
| cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=C:/foo -DLIBASSERT_WERROR_BUILD=On | |
| msbuild .\libassert.sln | |
| msbuild INSTALL.vcxproj | |
| cd ../.. | |
| cp -Recurse libassert/tests/findpackage-integration . | |
| mkdir findpackage-integration/build | |
| cd findpackage-integration/build | |
| cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=C:/foo | |
| msbuild demo_project.sln | |
| .\Debug\main.exe | |
| test-windows-add_subdirectory: | |
| runs-on: windows-2022 | |
| needs: test-windows | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Enable Developer Command Prompt | |
| uses: ilammy/msvc-dev-cmd@v1.10.0 | |
| - name: test | |
| run: | | |
| cd .. | |
| cp -Recurse libassert/tests/add_subdirectory-integration . | |
| cp -Recurse libassert add_subdirectory-integration | |
| mkdir add_subdirectory-integration/build | |
| cd add_subdirectory-integration/build | |
| cmake .. -DCMAKE_BUILD_TYPE=Debug -DLIBASSERT_WERROR_BUILD=On | |
| msbuild demo_project.sln | |
| .\Debug\main.exe | |