name: ci on: push: pull_request: jobs: test-linux: runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: compiler: [gcc, clang] shared: [--shared, ""] steps: - uses: actions/checkout@v4 - name: dependencies run: | sudo apt install gcc-10 g++-10 libgcc-10-dev libunwind8-dev ninja-build pip3 install colorama - name: libdwarf run: | cd .. cpptrace/ci/setup-prerequisites.sh - name: build and test run: | python3 ci/test-all-configs.py --${{matrix.compiler}} --default-config test-linux-arm: runs-on: ubuntu-22.04-arm strategy: fail-fast: false matrix: compiler: [gcc, clang] shared: [--shared, ""] steps: - uses: actions/checkout@v4 - name: dependencies run: | sudo apt install gcc-10 g++-10 libgcc-10-dev libunwind8-dev ninja-build pip3 install colorama - name: libdwarf run: | cd .. cpptrace/ci/setup-prerequisites.sh - name: build and test run: | python3 ci/test-all-configs.py --${{matrix.compiler}} --default-config test-macos: runs-on: macos-14 strategy: fail-fast: false matrix: compiler: [gcc, clang] shared: [--shared, ""] steps: - uses: actions/checkout@v4 - name: libdwarf run: | cd .. cpptrace/ci/setup-prerequisites.sh - name: dependencies run: | python3 -m venv env env/bin/pip install colorama - name: build and test run: | env/bin/python ci/test-all-configs.py --${{matrix.compiler}} --default-config test-windows: runs-on: windows-2022 strategy: fail-fast: false matrix: compiler: [msvc, clang, gcc] shared: [--shared, ""] steps: - uses: actions/checkout@v4 - name: Enable Developer Command Prompt uses: ilammy/msvc-dev-cmd@v1.13.0 - name: dependencies run: | pip3 install colorama - name: libdwarf run: | if("${{matrix.compiler}}" -eq "gcc") { cd .. cpptrace/ci/setup-prerequisites-mingw.ps1 } - name: build and test run: | python3 ci/test-all-configs.py --${{matrix.compiler}} --default-config test-windows-old: runs-on: windows-2022 strategy: fail-fast: false matrix: compiler: [msvc] shared: [--shared, ""] steps: - uses: actions/checkout@v4 - name: Enable Developer Command Prompt uses: ilammy/msvc-dev-cmd@v1.13.0 with: toolset: 14.29 # vc 2019 - name: dependencies run: | pip3 install colorama - name: libdwarf run: | if("${{matrix.compiler}}" -eq "gcc") { cd .. cpptrace/ci/setup-prerequisites-mingw.ps1 } - name: build and test run: | python3 ci/test-all-configs.py --${{matrix.compiler}} --default-config test-linux-all-configurations: runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: compiler: [gcc, clang] shared: [--shared, ""] needs: test-linux steps: - uses: actions/checkout@v4 - name: dependencies run: | sudo apt install gcc-10 g++-10 libgcc-10-dev libunwind8-dev ninja-build pip3 install colorama - name: libdwarf run: | cd .. cpptrace/ci/setup-prerequisites.sh - name: build and test run: | python3 ci/test-all-configs.py --${{matrix.compiler}} test-macos-all-configurations: runs-on: macos-14 strategy: fail-fast: false matrix: compiler: [gcc, clang] shared: [--shared, ""] needs: test-macos steps: - uses: actions/checkout@v4 - name: libdwarf run: | cd .. cpptrace/ci/setup-prerequisites.sh - name: dependencies run: | python3 -m venv env env/bin/pip install colorama - name: build and test run: | env/bin/python ci/test-all-configs.py --${{matrix.compiler}} test-windows-all-configurations: runs-on: windows-2022 strategy: fail-fast: false matrix: compiler: [msvc, clang, gcc] shared: [--shared, ""] needs: test-windows steps: - uses: actions/checkout@v4 - name: Enable Developer Command Prompt uses: ilammy/msvc-dev-cmd@v1.13.0 - name: dependencies run: | pip3 install colorama - name: libdwarf run: | if("${{matrix.compiler}}" -eq "gcc") { cd .. cpptrace/ci/setup-prerequisites-mingw.ps1 } - name: build and test run: | python3 ci/test-all-configs.py --${{matrix.compiler}} build-linux-all-remaining-configurations: runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: compiler: [gcc, clang] needs: test-linux-all-configurations steps: - uses: actions/checkout@v4 - name: dependencies run: | sudo apt install gcc-10 g++-10 libgcc-10-dev libunwind8-dev ninja-build pip3 install colorama - name: libdwarf run: | cd .. cpptrace/ci/setup-prerequisites.sh - name: build run: | python3 ci/build-in-all-remaining-configs.py --${{matrix.compiler}} build-macos-all-remaining-configurations: runs-on: macos-14 strategy: fail-fast: false matrix: compiler: [gcc, clang] needs: test-macos-all-configurations steps: - uses: actions/checkout@v4 - name: dependencies run: | brew install ninja python3 -m venv env env/bin/pip install colorama - name: libdwarf run: | cd .. cpptrace/ci/setup-prerequisites.sh - name: build run: | env/bin/python ci/build-in-all-remaining-configs.py --${{matrix.compiler}} build-windows-all-remaining-configurations: runs-on: windows-2022 strategy: fail-fast: false matrix: compiler: [msvc, clang, gcc] needs: test-windows-all-configurations steps: - uses: actions/checkout@v4 - name: Enable Developer Command Prompt uses: ilammy/msvc-dev-cmd@v1.13.0 - name: dependencies run: | pip3 install colorama - name: libdwarf run: | if("${{matrix.compiler}}" -eq "gcc") { cd .. cpptrace/ci/setup-prerequisites-mingw.ps1 } - name: build run: | python3 ci/build-in-all-remaining-configs.py --${{matrix.compiler}} performancetest-linux: runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: compiler: [g++-11, clang++-14] config: [ -DSPEEDTEST_DWARF4=On, -DSPEEDTEST_DWARF5=On ] needs: test-linux-all-configurations steps: - uses: actions/checkout@v4 - name: dependencies run: sudo apt install gcc-11 g++-11 libgcc-11-dev ninja-build - name: build run: | mkdir -p build cd build cmake .. -GNinja -DCMAKE_CXX_COMPILER=${{matrix.compiler}} -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=foo ninja ninja install mkdir -p ../test/speedtest/build cd ../test/speedtest/build cmake .. \ -GNinja \ -DCMAKE_BUILD_TYPE=Debug \ ${{matrix.config}} ninja - name: speedtest working-directory: test/speedtest/build run: | ./speedtest | python3 ../../../ci/speedtest.py ${{matrix.compiler}} ${{matrix.config}} test-linux-fetchcontent: runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: shared: [On, Off] needs: test-linux-all-configurations steps: - uses: actions/checkout@v4 - name: test run: | tag=$(git rev-parse --abbrev-ref HEAD) echo $tag cd .. cp -rv cpptrace/test/fetchcontent-integration . mkdir fetchcontent-integration/build cd fetchcontent-integration/build cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug -DCPPTRACE_TAG=$tag -DBUILD_SHARED_LIBS=${{matrix.shared}} -DCPPTRACE_WERROR_BUILD=On ninja ./main test-linux-findpackage: runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: shared: [On, Off] needs: test-linux-all-configurations steps: - uses: actions/checkout@v4 - name: test run: | tag=$(git rev-parse --abbrev-ref HEAD) mkdir build cd build cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=${{matrix.shared}} -DCPPTRACE_WERROR_BUILD=On sudo ninja install cd ../.. cp -rv cpptrace/test/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 strategy: fail-fast: false matrix: shared: [On, Off] needs: test-linux-all-configurations steps: - uses: actions/checkout@v4 - name: build run: | cd .. cp -rv cpptrace/test/add_subdirectory-integration . cp -rv cpptrace add_subdirectory-integration mkdir add_subdirectory-integration/build cd add_subdirectory-integration/build cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=${{matrix.shared}} -DCPPTRACE_WERROR_BUILD=On ninja ./main test-macos-fetchcontent: runs-on: macos-14 strategy: fail-fast: false matrix: shared: [On, Off] needs: test-macos-all-configurations steps: - uses: actions/checkout@v4 - name: test run: | tag=$(git rev-parse --abbrev-ref HEAD) echo $tag cd .. cp -rv cpptrace/test/fetchcontent-integration . mkdir fetchcontent-integration/build cd fetchcontent-integration/build cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug -DCPPTRACE_TAG=$tag -DBUILD_SHARED_LIBS=${{matrix.shared}} -DCPPTRACE_WERROR_BUILD=On ninja ./main test-macos-findpackage: runs-on: macos-14 strategy: fail-fast: false matrix: shared: [On, Off] needs: test-macos-all-configurations steps: - uses: actions/checkout@v4 - name: test run: | tag=$(git rev-parse --abbrev-ref HEAD) echo $tag mkdir build cd build cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=${{matrix.shared}} -DCPPTRACE_WERROR_BUILD=On sudo ninja install cd ../.. cp -rv cpptrace/test/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 strategy: fail-fast: false matrix: shared: [On, Off] needs: test-macos-all-configurations steps: - uses: actions/checkout@v4 - name: test run: | cd .. cp -rv cpptrace/test/add_subdirectory-integration . cp -rv cpptrace add_subdirectory-integration mkdir add_subdirectory-integration/build cd add_subdirectory-integration/build cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=${{matrix.shared}} -DCPPTRACE_WERROR_BUILD=On ninja ./main test-mingw-fetchcontent: runs-on: windows-2022 strategy: fail-fast: false matrix: shared: [On, Off] needs: test-windows-all-configurations steps: - uses: actions/checkout@v4 - name: test run: | $tag=$(git rev-parse --abbrev-ref HEAD) echo $tag cd .. cp -Recurse cpptrace/test/fetchcontent-integration . mkdir fetchcontent-integration/build cd fetchcontent-integration/build cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug -DCPPTRACE_TAG="$tag" -DBUILD_SHARED_LIBS=${{matrix.shared}} -DCPPTRACE_WERROR_BUILD=On ninja .\main.exe test-mingw-findpackage: runs-on: windows-2022 strategy: fail-fast: false matrix: shared: [On, Off] needs: test-windows-all-configurations steps: - uses: actions/checkout@v4 - name: test run: | $tag=$(git rev-parse --abbrev-ref HEAD) echo $tag mkdir build cd build cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=${{matrix.shared}} -DCMAKE_INSTALL_PREFIX=C:/foo -DCPPTRACE_WERROR_BUILD=On ninja install cd ../.. mv cpptrace/test/findpackage-integration . mkdir findpackage-integration/build cd findpackage-integration/build cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=C:/foo ninja ./main test-mingw-add_subdirectory: runs-on: windows-2022 strategy: fail-fast: false matrix: shared: [On, Off] needs: test-windows-all-configurations steps: - uses: actions/checkout@v4 - name: test run: | cd .. cp -Recurse cpptrace/test/add_subdirectory-integration . cp -Recurse cpptrace add_subdirectory-integration mkdir add_subdirectory-integration/build cd add_subdirectory-integration/build cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=${{matrix.shared}} -DCPPTRACE_WERROR_BUILD=On ninja .\main.exe test-windows-fetchcontent: runs-on: windows-2022 strategy: fail-fast: false matrix: shared: [On, Off] needs: test-windows-all-configurations steps: - uses: actions/checkout@v4 - name: Enable Developer Command Prompt uses: ilammy/msvc-dev-cmd@v1.13.0 - name: test run: | $tag=$(git rev-parse --abbrev-ref HEAD) echo $tag cd .. cp -Recurse cpptrace/test/fetchcontent-integration . mkdir fetchcontent-integration/build cd fetchcontent-integration/build cmake .. -DCMAKE_BUILD_TYPE=Debug -DCPPTRACE_TAG="$tag" -DBUILD_SHARED_LIBS=${{matrix.shared}} -DCPPTRACE_WERROR_BUILD=On msbuild demo_project.sln .\Debug\main.exe test-windows-findpackage: runs-on: windows-2022 strategy: fail-fast: false matrix: shared: [On, Off] needs: test-windows-all-configurations steps: - uses: actions/checkout@v4 - name: Enable Developer Command Prompt uses: ilammy/msvc-dev-cmd@v1.13.0 - name: test run: | $tag=$(git rev-parse --abbrev-ref HEAD) echo $tag mkdir build cd build cmake .. -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=${{matrix.shared}} -DCMAKE_INSTALL_PREFIX=C:/foo -DCPPTRACE_WERROR_BUILD=On msbuild cpptrace.sln msbuild INSTALL.vcxproj cd ../.. mv cpptrace/test/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 strategy: fail-fast: false matrix: shared: [On, Off] needs: test-windows-all-configurations steps: - uses: actions/checkout@v4 - name: Enable Developer Command Prompt uses: ilammy/msvc-dev-cmd@v1.13.0 - name: test run: | cd .. cp -Recurse cpptrace/test/add_subdirectory-integration . cp -Recurse cpptrace add_subdirectory-integration mkdir add_subdirectory-integration/build cd add_subdirectory-integration/build cmake .. -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=${{matrix.shared}} -DCPPTRACE_WERROR_BUILD=On msbuild demo_project.sln .\Debug\main.exe unittest-linux: runs-on: ubuntu-24.04 strategy: fail-fast: false matrix: compiler: [g++-10, clang++-18] stdlib: [libstdc++, libc++] dwarf_version: [4, 5] split_dwarf: [OFF, ON] exclude: - compiler: g++-10 stdlib: libc++ steps: - uses: actions/checkout@v4 - name: dependencies run: | sudo apt install gcc-10 g++-10 libgcc-10-dev ninja-build libc++-dev ninja-build cd .. cpptrace/ci/setup-prerequisites-unittest.sh - name: build and test run: | python3 ci/unittest.py \ --slice=compiler:${{matrix.compiler}} \ --slice=stdlib:${{matrix.stdlib}} \ --slice=dwarf_version:${{matrix.dwarf_version}} \ --slice=split_dwarf:${{matrix.split_dwarf}} unittest-linux-bazel: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 - name: dependencies run: | sudo apt install -y libtool libncurses5 - name: test dbg run: | bazel test //... -c dbg - name: test opt run: | bazel test //... -c opt unittest-linux-arm: runs-on: ubuntu-24.04-arm strategy: fail-fast: false matrix: compiler: [g++-10, clang++-18] stdlib: [libstdc++, libc++] dwarf_version: [4, 5] split_dwarf: [OFF, ON] exclude: - compiler: g++-10 stdlib: libc++ steps: - uses: actions/checkout@v4 - name: dependencies run: | sudo apt install gcc-10 g++-10 libgcc-10-dev ninja-build libc++-dev ninja-build cd .. cpptrace/ci/setup-prerequisites-unittest.sh - name: build and test run: | python3 ci/unittest.py \ --slice=compiler:${{matrix.compiler}} \ --slice=stdlib:${{matrix.stdlib}} \ --slice=dwarf_version:${{matrix.dwarf_version}} \ --slice=split_dwarf:${{matrix.split_dwarf}} unittest-macos: runs-on: macos-14 steps: - uses: actions/checkout@v4 - uses: maxim-lobanov/setup-xcode@v1 with: xcode-version: "15.4" - name: dependencies run: | brew install ninja python3 -m venv env env/bin/pip install colorama cd .. cpptrace/ci/setup-prerequisites-unittest-macos.sh - name: build and test run: | env/bin/python ci/unittest.py unittest-windows: runs-on: windows-2022 strategy: fail-fast: false matrix: compiler: [cl, clang++] shared: [OFF] # TODO: Re-enable shared build_type: [Debug, RelWithDebInfo] steps: - uses: actions/checkout@v4 - name: Enable Developer Command Prompt uses: ilammy/msvc-dev-cmd@v1.13.0 - name: build and test run: | mkdir build cd build cmake .. ` -DCMAKE_CXX_COMPILER=${{matrix.compiler}} ` -DCMAKE_C_COMPILER=${{matrix.compiler == 'clang++' && 'clang' || matrix.compiler}} ` -DBUILD_SHARED_LIBS=${{matrix.shared}} ` -DCPPTRACE_WERROR_BUILD=On ` -DCPPTRACE_BUILD_TESTING=On cmake --build . --config ${{matrix.build_type}} ./${{matrix.build_type}}/unittest # TODO: Macos, mingw unittest-linux-modules: runs-on: ubuntu-24.04 needs: unittest-linux strategy: fail-fast: false steps: - uses: actions/checkout@v4 - name: dependencies run: | sudo apt install ninja-build clang-19 clang-tools-19 - name: build and test run: | mkdir build cd build cmake .. \ -GNinja \ -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_CXX_COMPILER=clang++-19 \ -DCMAKE_C_COMPILER=clang-19 \ -DCMAKE_CXX_STANDARD=20 \ -DCPPTRACE_WERROR_BUILD=On \ -DCPPTRACE_STD_FORMAT=Off \ -DCPPTRACE_BUILD_TESTING=On ninja ./unittest_module unittest-linux-32-bit: runs-on: ubuntu-24.04 needs: unittest-linux strategy: fail-fast: false matrix: compiler: [g++-10, clang++-18] steps: - uses: actions/checkout@v4 - name: dependencies run: | sudo apt update sudo apt install gcc-10 g++-10 libgcc-10-dev clang-19 clang-tools-19 ninja-build gcc-multilib g++-multilib g++-10-multilib - name: build and test run: | mkdir build cd build cmake .. \ -GNinja \ -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_CXX_COMPILER=${{matrix.compiler}} \ -DCMAKE_C_COMPILER=${{matrix.compiler == 'clang++-18' && 'clang' || 'gcc'}} \ -DCPPTRACE_WERROR_BUILD=On \ -DCPPTRACE_STD_FORMAT=Off \ -DCPPTRACE_BUILD_TESTING=On \ -DCMAKE_C_FLAGS=-m32 \ -DCMAKE_CXX_FLAGS=-m32 ninja ./unittest unittest-linux-gcc-4-8-5: runs-on: ubuntu-24.04 needs: unittest-linux steps: - uses: actions/checkout@v4 - name: dependencies run: | sudo apt update wget http://mirrors.kernel.org/ubuntu/pool/universe/g/gcc-4.8/g++-4.8_4.8.5-4ubuntu8_amd64.deb wget http://mirrors.kernel.org/ubuntu/pool/universe/g/gcc-4.8/libstdc++-4.8-dev_4.8.5-4ubuntu8_amd64.deb wget http://mirrors.kernel.org/ubuntu/pool/universe/g/gcc-4.8/gcc-4.8-base_4.8.5-4ubuntu8_amd64.deb wget http://mirrors.kernel.org/ubuntu/pool/universe/g/gcc-4.8/gcc-4.8_4.8.5-4ubuntu8_amd64.deb wget http://mirrors.kernel.org/ubuntu/pool/universe/g/gcc-4.8/libgcc-4.8-dev_4.8.5-4ubuntu8_amd64.deb wget http://mirrors.kernel.org/ubuntu/pool/universe/g/gcc-4.8/cpp-4.8_4.8.5-4ubuntu8_amd64.deb wget http://mirrors.kernel.org/ubuntu/pool/universe/g/gcc-4.8/libasan0_4.8.5-4ubuntu8_amd64.deb sudo apt install ./gcc-4.8_4.8.5-4ubuntu8_amd64.deb ./gcc-4.8-base_4.8.5-4ubuntu8_amd64.deb ./libstdc++-4.8-dev_4.8.5-4ubuntu8_amd64.deb ./cpp-4.8_4.8.5-4ubuntu8_amd64.deb ./libgcc-4.8-dev_4.8.5-4ubuntu8_amd64.deb ./libasan0_4.8.5-4ubuntu8_amd64.deb ./g++-4.8_4.8.5-4ubuntu8_amd64.deb - name: build and test run: | mkdir build cd build cmake .. \ -GNinja \ -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_CXX_COMPILER=g++-4.8 \ -DCMAKE_C_COMPILER=gcc-4.8 \ -DCPPTRACE_WERROR_BUILD=On \ -DCPPTRACE_STD_FORMAT=Off ninja unittest-windows-32-bit: runs-on: windows-2022 needs: unittest-windows strategy: fail-fast: false matrix: build_type: [Debug] steps: - uses: actions/checkout@v4 - name: Enable Developer Command Prompt uses: ilammy/msvc-dev-cmd@v1.13.0 - name: build and test run: | mkdir build cd build cmake .. ` -A Win32 ` -DCPPTRACE_WERROR_BUILD=On ` -DCPPTRACE_BUILD_TESTING=On cmake --build . --config ${{matrix.build_type}} ./${{matrix.build_type}}/unittest unittest-windows-clangcl: runs-on: windows-2022 needs: unittest-windows strategy: fail-fast: false matrix: build_type: [Debug] arch: [x64, Win32] steps: - uses: actions/checkout@v4 - name: Enable Developer Command Prompt uses: ilammy/msvc-dev-cmd@v1.13.0 - name: build and test run: | mkdir build cd build cmake .. ` -T ClangCL ` -A ${{matrix.arch}} ` -DCPPTRACE_WERROR_BUILD=On ` -DCPPTRACE_BUILD_TESTING=On cmake --build . --config ${{matrix.build_type}} ./${{matrix.build_type}}/unittest