582 lines
17 KiB
YAML
582 lines
17 KiB
YAML
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
|
|
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-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
|
|
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
|
|
- name: build
|
|
run: |
|
|
mkdir -p build
|
|
cd build
|
|
cmake .. -DCMAKE_CXX_COMPILER=${{matrix.compiler}} -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=foo
|
|
make -j
|
|
make install
|
|
mkdir -p ../test/speedtest/build
|
|
cd ../test/speedtest/build
|
|
cmake .. \
|
|
-DCMAKE_BUILD_TYPE=Debug \
|
|
${{matrix.config}}
|
|
make -j
|
|
- 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 .. -DCMAKE_BUILD_TYPE=Debug -DCPPTRACE_TAG=$tag -DBUILD_SHARED_LIBS=${{matrix.shared}} -DCPPTRACE_WERROR_BUILD=On
|
|
make
|
|
./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 .. -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=${{matrix.shared}} -DCPPTRACE_WERROR_BUILD=On
|
|
sudo make -j install
|
|
cd ../..
|
|
cp -rv cpptrace/test/findpackage-integration .
|
|
mkdir findpackage-integration/build
|
|
cd findpackage-integration/build
|
|
cmake .. -DCMAKE_BUILD_TYPE=Debug
|
|
make
|
|
./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 .. -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=${{matrix.shared}} -DCPPTRACE_WERROR_BUILD=On
|
|
make
|
|
./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 .. -DCMAKE_BUILD_TYPE=Debug -DCPPTRACE_TAG=$tag -DBUILD_SHARED_LIBS=${{matrix.shared}} -DCPPTRACE_WERROR_BUILD=On
|
|
make
|
|
./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 .. -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=${{matrix.shared}} -DCPPTRACE_WERROR_BUILD=On
|
|
sudo make -j install
|
|
cd ../..
|
|
cp -rv cpptrace/test/findpackage-integration .
|
|
mkdir findpackage-integration/build
|
|
cd findpackage-integration/build
|
|
cmake .. -DCMAKE_BUILD_TYPE=Debug
|
|
make
|
|
./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 .. -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=${{matrix.shared}} -DCPPTRACE_WERROR_BUILD=On
|
|
make
|
|
./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 .. -DCMAKE_BUILD_TYPE=Debug -DCPPTRACE_TAG="$tag" "-GUnix Makefiles" -DBUILD_SHARED_LIBS=${{matrix.shared}} -DCPPTRACE_WERROR_BUILD=On
|
|
make
|
|
.\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 .. -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=${{matrix.shared}} "-GUnix Makefiles" -DCMAKE_INSTALL_PREFIX=C:/foo -DCPPTRACE_WERROR_BUILD=On
|
|
make -j install
|
|
cd ../..
|
|
mv cpptrace/test/findpackage-integration .
|
|
mkdir findpackage-integration/build
|
|
cd findpackage-integration/build
|
|
cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=C:/foo "-GUnix Makefiles"
|
|
make
|
|
./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 .. -DCMAKE_BUILD_TYPE=Debug "-GUnix Makefiles" -DBUILD_SHARED_LIBS=${{matrix.shared}} -DCPPTRACE_WERROR_BUILD=On
|
|
make
|
|
.\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
|
|
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-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
|