Stratify test ci
This commit is contained in:
parent
76aff1c30e
commit
c6a60f7172
80
.github/workflows/test.yml
vendored
80
.github/workflows/test.yml
vendored
@ -26,7 +26,7 @@ jobs:
|
||||
cpptrace/ci/setup-prerequisites.sh
|
||||
- name: build and test
|
||||
run: |
|
||||
python3 ci/test-all-configs.py --${{matrix.compiler}}
|
||||
python3 ci/test-all-configs.py --${{matrix.compiler}} --default-config
|
||||
test-macos:
|
||||
runs-on: macos-14
|
||||
strategy:
|
||||
@ -45,18 +45,7 @@ jobs:
|
||||
pip3 install colorama
|
||||
- name: build and test
|
||||
run: |
|
||||
python3 ci/test-all-configs.py --${{matrix.compiler}}
|
||||
# - name: bundle artifacts
|
||||
# if: always()
|
||||
# run: |
|
||||
# tar czfH bundle.tar.gz build
|
||||
# - name: upload artifacts
|
||||
# uses: actions/upload-artifact@v4
|
||||
# if: always()
|
||||
# with:
|
||||
# name: build-macos-${{matrix.compiler}}${{matrix.shared}}
|
||||
# path: bundle.tar.gz
|
||||
# retention-days: 2
|
||||
python3 ci/test-all-configs.py --${{matrix.compiler}} --default-config
|
||||
test-windows:
|
||||
runs-on: windows-2022
|
||||
strategy:
|
||||
@ -66,6 +55,71 @@ jobs:
|
||||
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: |
|
||||
pip3 install colorama
|
||||
- name: build and test
|
||||
run: |
|
||||
python3 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
|
||||
|
||||
@ -332,6 +332,164 @@ def build_and_test_full_or_auto(matrix):
|
||||
|
||||
return good
|
||||
|
||||
def run_linux_matrix(compilers: list, shared: bool):
|
||||
matrix = {
|
||||
"compiler": compilers,
|
||||
"target": ["Debug"],
|
||||
"std": ["11", "20"],
|
||||
"unwind": [
|
||||
"CPPTRACE_UNWIND_WITH_EXECINFO",
|
||||
"CPPTRACE_UNWIND_WITH_UNWIND",
|
||||
"CPPTRACE_UNWIND_WITH_LIBUNWIND",
|
||||
#"CPPTRACE_UNWIND_WITH_NOTHING",
|
||||
],
|
||||
"symbols": [
|
||||
# Disabled due to libbacktrace bug
|
||||
# "CPPTRACE_GET_SYMBOLS_WITH_LIBBACKTRACE",
|
||||
"CPPTRACE_GET_SYMBOLS_WITH_LIBDL",
|
||||
"CPPTRACE_GET_SYMBOLS_WITH_ADDR2LINE",
|
||||
"CPPTRACE_GET_SYMBOLS_WITH_LIBDWARF",
|
||||
#"CPPTRACE_GET_SYMBOLS_WITH_NOTHING",
|
||||
],
|
||||
"demangle": [
|
||||
"CPPTRACE_DEMANGLE_WITH_CXXABI",
|
||||
#"CPPTRACE_DEMANGLE_WITH_NOTHING",
|
||||
],
|
||||
"shared": ["On" if shared else "Off"]
|
||||
}
|
||||
exclude = []
|
||||
run_matrix(matrix, exclude, build_and_test)
|
||||
|
||||
def run_linux_default(compilers: list, shared: bool):
|
||||
matrix = {
|
||||
"compiler": compilers,
|
||||
"target": ["Debug"],
|
||||
"std": ["11", "20"],
|
||||
"config": [""],
|
||||
"shared": ["On" if shared else "Off"]
|
||||
}
|
||||
exclude = []
|
||||
run_matrix(matrix, exclude, build_and_test_full_or_auto)
|
||||
|
||||
def run_macos_matrix(compilers: list, shared: bool):
|
||||
matrix = {
|
||||
"compiler": compilers,
|
||||
"target": ["Debug"],
|
||||
"std": ["11", "20"],
|
||||
"unwind": [
|
||||
"CPPTRACE_UNWIND_WITH_EXECINFO",
|
||||
"CPPTRACE_UNWIND_WITH_UNWIND",
|
||||
#"CPPTRACE_UNWIND_WITH_NOTHING",
|
||||
],
|
||||
"symbols": [
|
||||
#"CPPTRACE_GET_SYMBOLS_WITH_LIBBACKTRACE",
|
||||
"CPPTRACE_GET_SYMBOLS_WITH_LIBDL",
|
||||
"CPPTRACE_GET_SYMBOLS_WITH_ADDR2LINE",
|
||||
"CPPTRACE_GET_SYMBOLS_WITH_LIBDWARF",
|
||||
#"CPPTRACE_GET_SYMBOLS_WITH_NOTHING",
|
||||
],
|
||||
"demangle": [
|
||||
"CPPTRACE_DEMANGLE_WITH_CXXABI",
|
||||
#"CPPTRACE_DEMANGLE_WITH_NOTHING",
|
||||
],
|
||||
"shared": ["On" if shared else "Off"]
|
||||
}
|
||||
exclude = []
|
||||
run_matrix(matrix, exclude, build_and_test)
|
||||
|
||||
def run_macos_default(compilers: list, shared: bool):
|
||||
matrix = {
|
||||
"compiler": compilers,
|
||||
"target": ["Debug"],
|
||||
"std": ["11", "20"],
|
||||
"config": [""],
|
||||
"shared": ["On" if shared else "Off"]
|
||||
}
|
||||
exclude = []
|
||||
run_matrix(matrix, exclude, build_and_test_full_or_auto)
|
||||
|
||||
def run_windows_matrix(compilers: list, shared: bool):
|
||||
matrix = {
|
||||
"compiler": compilers,
|
||||
"target": ["Debug"],
|
||||
"std": ["11", "20"],
|
||||
"unwind": [
|
||||
"CPPTRACE_UNWIND_WITH_WINAPI",
|
||||
"CPPTRACE_UNWIND_WITH_DBGHELP",
|
||||
"CPPTRACE_UNWIND_WITH_UNWIND", # Broken on github actions for some reason
|
||||
#"CPPTRACE_UNWIND_WITH_NOTHING",
|
||||
],
|
||||
"symbols": [
|
||||
"CPPTRACE_GET_SYMBOLS_WITH_DBGHELP",
|
||||
"CPPTRACE_GET_SYMBOLS_WITH_ADDR2LINE",
|
||||
"CPPTRACE_GET_SYMBOLS_WITH_LIBDWARF",
|
||||
#"CPPTRACE_GET_SYMBOLS_WITH_NOTHING",
|
||||
],
|
||||
"demangle": [
|
||||
"CPPTRACE_DEMANGLE_WITH_CXXABI",
|
||||
"CPPTRACE_DEMANGLE_WITH_NOTHING",
|
||||
],
|
||||
"shared": ["On" if shared else "Off"]
|
||||
}
|
||||
exclude = [
|
||||
{
|
||||
"demangle": "CPPTRACE_DEMANGLE_WITH_CXXABI",
|
||||
"compiler": "cl"
|
||||
},
|
||||
{
|
||||
"unwind": "CPPTRACE_UNWIND_WITH_UNWIND",
|
||||
"compiler": "cl"
|
||||
},
|
||||
{
|
||||
"unwind": "CPPTRACE_UNWIND_WITH_UNWIND",
|
||||
"compiler": "clang++"
|
||||
},
|
||||
{
|
||||
"symbols": "CPPTRACE_GET_SYMBOLS_WITH_ADDR2LINE",
|
||||
"compiler": "cl"
|
||||
},
|
||||
{
|
||||
"symbols": "CPPTRACE_GET_SYMBOLS_WITH_ADDR2LINE",
|
||||
"compiler": "clang++"
|
||||
},
|
||||
{
|
||||
"symbols": "CPPTRACE_GET_SYMBOLS_WITH_LIBDWARF",
|
||||
"compiler": "cl"
|
||||
},
|
||||
{
|
||||
"symbols": "CPPTRACE_GET_SYMBOLS_WITH_LIBDWARF",
|
||||
"compiler": "clang++"
|
||||
},
|
||||
{
|
||||
"symbols": "CPPTRACE_GET_SYMBOLS_WITH_DBGHELP",
|
||||
"compiler": "g++"
|
||||
},
|
||||
{
|
||||
"symbols": "CPPTRACE_GET_SYMBOLS_WITH_DBGHELP",
|
||||
"demangle": "CPPTRACE_DEMANGLE_WITH_CXXABI"
|
||||
},
|
||||
{
|
||||
"symbols": "CPPTRACE_GET_SYMBOLS_WITH_LIBDWARF",
|
||||
"demangle": "CPPTRACE_DEMANGLE_WITH_NOTHING"
|
||||
},
|
||||
{
|
||||
"symbols": "CPPTRACE_GET_SYMBOLS_WITH_ADDR2LINE",
|
||||
"demangle": "CPPTRACE_DEMANGLE_WITH_NOTHING"
|
||||
}
|
||||
]
|
||||
run_matrix(matrix, exclude, build_and_test)
|
||||
|
||||
def run_windows_default(compilers: list, shared: bool):
|
||||
matrix = {
|
||||
"compiler": compilers,
|
||||
"target": ["Debug"],
|
||||
"std": ["11", "20"],
|
||||
"config": [""],
|
||||
"shared": ["On" if shared else "Off"]
|
||||
}
|
||||
exclude = []
|
||||
run_matrix(matrix, exclude, build_and_test_full_or_auto)
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(
|
||||
prog="Build in all configs",
|
||||
@ -357,6 +515,10 @@ def main():
|
||||
"--shared",
|
||||
action="store_true"
|
||||
)
|
||||
parser.add_argument(
|
||||
"--default-config",
|
||||
action="store_true"
|
||||
)
|
||||
args = parser.parse_args()
|
||||
|
||||
if platform.system() == "Linux":
|
||||
@ -365,80 +527,20 @@ def main():
|
||||
compilers.append("clang++-14")
|
||||
if args.gcc or args.all:
|
||||
compilers.append("g++-10")
|
||||
matrix = {
|
||||
"compiler": compilers,
|
||||
"target": ["Debug"],
|
||||
"std": ["11", "20"],
|
||||
"unwind": [
|
||||
"CPPTRACE_UNWIND_WITH_EXECINFO",
|
||||
"CPPTRACE_UNWIND_WITH_UNWIND",
|
||||
"CPPTRACE_UNWIND_WITH_LIBUNWIND",
|
||||
#"CPPTRACE_UNWIND_WITH_NOTHING",
|
||||
],
|
||||
"symbols": [
|
||||
# Disabled due to libbacktrace bug
|
||||
# "CPPTRACE_GET_SYMBOLS_WITH_LIBBACKTRACE",
|
||||
"CPPTRACE_GET_SYMBOLS_WITH_LIBDL",
|
||||
"CPPTRACE_GET_SYMBOLS_WITH_ADDR2LINE",
|
||||
"CPPTRACE_GET_SYMBOLS_WITH_LIBDWARF",
|
||||
#"CPPTRACE_GET_SYMBOLS_WITH_NOTHING",
|
||||
],
|
||||
"demangle": [
|
||||
"CPPTRACE_DEMANGLE_WITH_CXXABI",
|
||||
#"CPPTRACE_DEMANGLE_WITH_NOTHING",
|
||||
],
|
||||
"shared": ["On" if args.shared else "Off"]
|
||||
}
|
||||
exclude = []
|
||||
run_matrix(matrix, exclude, build_and_test)
|
||||
matrix = {
|
||||
"compiler": compilers,
|
||||
"target": ["Debug"],
|
||||
"std": ["11", "20"],
|
||||
"config": [""],
|
||||
"shared": ["On" if args.shared else "Off"]
|
||||
}
|
||||
exclude = []
|
||||
run_matrix(matrix, exclude, build_and_test_full_or_auto)
|
||||
if args.default_config:
|
||||
run_linux_default(compilers, args.shared)
|
||||
else:
|
||||
run_linux_matrix(compilers, args.shared)
|
||||
if platform.system() == "Darwin":
|
||||
compilers = []
|
||||
if args.clang or args.all:
|
||||
compilers.append("clang++")
|
||||
if args.gcc or args.all:
|
||||
compilers.append("g++-12")
|
||||
matrix = {
|
||||
"compiler": compilers,
|
||||
"target": ["Debug"],
|
||||
"std": ["11", "20"],
|
||||
"unwind": [
|
||||
"CPPTRACE_UNWIND_WITH_EXECINFO",
|
||||
"CPPTRACE_UNWIND_WITH_UNWIND",
|
||||
#"CPPTRACE_UNWIND_WITH_NOTHING",
|
||||
],
|
||||
"symbols": [
|
||||
#"CPPTRACE_GET_SYMBOLS_WITH_LIBBACKTRACE",
|
||||
"CPPTRACE_GET_SYMBOLS_WITH_LIBDL",
|
||||
"CPPTRACE_GET_SYMBOLS_WITH_ADDR2LINE",
|
||||
"CPPTRACE_GET_SYMBOLS_WITH_LIBDWARF",
|
||||
#"CPPTRACE_GET_SYMBOLS_WITH_NOTHING",
|
||||
],
|
||||
"demangle": [
|
||||
"CPPTRACE_DEMANGLE_WITH_CXXABI",
|
||||
#"CPPTRACE_DEMANGLE_WITH_NOTHING",
|
||||
],
|
||||
"shared": ["On" if args.shared else "Off"]
|
||||
}
|
||||
exclude = []
|
||||
run_matrix(matrix, exclude, build_and_test)
|
||||
matrix = {
|
||||
"compiler": compilers,
|
||||
"target": ["Debug"],
|
||||
"std": ["11", "20"],
|
||||
"config": [""],
|
||||
"shared": ["On" if args.shared else "Off"]
|
||||
}
|
||||
exclude = []
|
||||
run_matrix(matrix, exclude, build_and_test_full_or_auto)
|
||||
if args.default_config:
|
||||
run_macos_default(compilers, args.shared)
|
||||
else:
|
||||
run_macos_matrix(compilers, args.shared)
|
||||
if platform.system() == "Windows":
|
||||
compilers = []
|
||||
if args.clang or args.all:
|
||||
@ -447,84 +549,10 @@ def main():
|
||||
compilers.append("cl")
|
||||
if args.gcc or args.all:
|
||||
compilers.append("g++")
|
||||
matrix = {
|
||||
"compiler": compilers,
|
||||
"target": ["Debug"],
|
||||
"std": ["11", "20"],
|
||||
"unwind": [
|
||||
"CPPTRACE_UNWIND_WITH_WINAPI",
|
||||
"CPPTRACE_UNWIND_WITH_DBGHELP",
|
||||
"CPPTRACE_UNWIND_WITH_UNWIND", # Broken on github actions for some reason
|
||||
#"CPPTRACE_UNWIND_WITH_NOTHING",
|
||||
],
|
||||
"symbols": [
|
||||
"CPPTRACE_GET_SYMBOLS_WITH_DBGHELP",
|
||||
"CPPTRACE_GET_SYMBOLS_WITH_ADDR2LINE",
|
||||
"CPPTRACE_GET_SYMBOLS_WITH_LIBDWARF",
|
||||
#"CPPTRACE_GET_SYMBOLS_WITH_NOTHING",
|
||||
],
|
||||
"demangle": [
|
||||
"CPPTRACE_DEMANGLE_WITH_CXXABI",
|
||||
"CPPTRACE_DEMANGLE_WITH_NOTHING",
|
||||
],
|
||||
"shared": ["On" if args.shared else "Off"]
|
||||
}
|
||||
exclude = [
|
||||
{
|
||||
"demangle": "CPPTRACE_DEMANGLE_WITH_CXXABI",
|
||||
"compiler": "cl"
|
||||
},
|
||||
{
|
||||
"unwind": "CPPTRACE_UNWIND_WITH_UNWIND",
|
||||
"compiler": "cl"
|
||||
},
|
||||
{
|
||||
"unwind": "CPPTRACE_UNWIND_WITH_UNWIND",
|
||||
"compiler": "clang++"
|
||||
},
|
||||
{
|
||||
"symbols": "CPPTRACE_GET_SYMBOLS_WITH_ADDR2LINE",
|
||||
"compiler": "cl"
|
||||
},
|
||||
{
|
||||
"symbols": "CPPTRACE_GET_SYMBOLS_WITH_ADDR2LINE",
|
||||
"compiler": "clang++"
|
||||
},
|
||||
{
|
||||
"symbols": "CPPTRACE_GET_SYMBOLS_WITH_LIBDWARF",
|
||||
"compiler": "cl"
|
||||
},
|
||||
{
|
||||
"symbols": "CPPTRACE_GET_SYMBOLS_WITH_LIBDWARF",
|
||||
"compiler": "clang++"
|
||||
},
|
||||
{
|
||||
"symbols": "CPPTRACE_GET_SYMBOLS_WITH_DBGHELP",
|
||||
"compiler": "g++"
|
||||
},
|
||||
{
|
||||
"symbols": "CPPTRACE_GET_SYMBOLS_WITH_DBGHELP",
|
||||
"demangle": "CPPTRACE_DEMANGLE_WITH_CXXABI"
|
||||
},
|
||||
{
|
||||
"symbols": "CPPTRACE_GET_SYMBOLS_WITH_LIBDWARF",
|
||||
"demangle": "CPPTRACE_DEMANGLE_WITH_NOTHING"
|
||||
},
|
||||
{
|
||||
"symbols": "CPPTRACE_GET_SYMBOLS_WITH_ADDR2LINE",
|
||||
"demangle": "CPPTRACE_DEMANGLE_WITH_NOTHING"
|
||||
}
|
||||
]
|
||||
run_matrix(matrix, exclude, build_and_test)
|
||||
matrix = {
|
||||
"compiler": compilers,
|
||||
"target": ["Debug"],
|
||||
"std": ["11", "20"],
|
||||
"config": [""],
|
||||
"shared": ["On" if args.shared else "Off"]
|
||||
}
|
||||
exclude = []
|
||||
run_matrix(matrix, exclude, build_and_test_full_or_auto)
|
||||
if args.default_config:
|
||||
run_windows_default(compilers, args.shared)
|
||||
else:
|
||||
run_windows_matrix(compilers, args.shared)
|
||||
|
||||
global failed
|
||||
if failed:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user