Try to rework ci to test first the default configuration, then test all configs after that passes. Also refactor the build in all tests script.
This commit is contained in:
parent
e0b50c96b4
commit
6e01f7225d
66
.github/workflows/build.yml
vendored
66
.github/workflows/build.yml
vendored
@ -23,7 +23,7 @@ jobs:
|
|||||||
cpptrace/ci/setup-prerequisites.sh
|
cpptrace/ci/setup-prerequisites.sh
|
||||||
- name: build
|
- name: build
|
||||||
run: |
|
run: |
|
||||||
python3 ci/build-in-all-configs.py --${{matrix.compiler}}
|
python3 ci/build-in-all-configs.py --${{matrix.compiler}} --default-config
|
||||||
build-macos:
|
build-macos:
|
||||||
runs-on: macos-14
|
runs-on: macos-14
|
||||||
strategy:
|
strategy:
|
||||||
@ -41,7 +41,7 @@ jobs:
|
|||||||
cpptrace/ci/setup-prerequisites.sh
|
cpptrace/ci/setup-prerequisites.sh
|
||||||
- name: build
|
- name: build
|
||||||
run: |
|
run: |
|
||||||
python3 ci/build-in-all-configs.py --${{matrix.compiler}}
|
python3 ci/build-in-all-configs.py --${{matrix.compiler}} --default-config
|
||||||
build-windows:
|
build-windows:
|
||||||
runs-on: windows-2022
|
runs-on: windows-2022
|
||||||
strategy:
|
strategy:
|
||||||
@ -50,6 +50,68 @@ jobs:
|
|||||||
compiler: [msvc, clang, gcc]
|
compiler: [msvc, clang, gcc]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- 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-configs.py --${{matrix.compiler}} --default-config
|
||||||
|
build-linux-all-configurations:
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
needs: build-linux
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
compiler: [gcc, clang]
|
||||||
|
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
|
||||||
|
run: |
|
||||||
|
python3 ci/build-in-all-configs.py --${{matrix.compiler}}
|
||||||
|
build-macos-all-configurations:
|
||||||
|
runs-on: macos-14
|
||||||
|
needs: build-macos
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
compiler: [gcc, clang]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: dependencies
|
||||||
|
run: |
|
||||||
|
pip3 install colorama
|
||||||
|
- name: libdwarf
|
||||||
|
run: |
|
||||||
|
cd ..
|
||||||
|
cpptrace/ci/setup-prerequisites.sh
|
||||||
|
- name: build
|
||||||
|
run: |
|
||||||
|
python3 ci/build-in-all-configs.py --${{matrix.compiler}}
|
||||||
|
build-windows-all-configurations:
|
||||||
|
runs-on: windows-2022
|
||||||
|
needs: build-windows
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
compiler: [msvc, clang, gcc]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
- name: Enable Developer Command Prompt
|
- name: Enable Developer Command Prompt
|
||||||
uses: ilammy/msvc-dev-cmd@v1.13.0
|
uses: ilammy/msvc-dev-cmd@v1.13.0
|
||||||
- name: dependencies
|
- name: dependencies
|
||||||
|
|||||||
@ -138,6 +138,145 @@ def build_full_or_auto(matrix):
|
|||||||
|
|
||||||
return succeeded
|
return succeeded
|
||||||
|
|
||||||
|
def run_linux_matrix(compilers: list):
|
||||||
|
matrix = {
|
||||||
|
"compiler": compilers,
|
||||||
|
"target": ["Debug"],
|
||||||
|
"std": ["11", "20"],
|
||||||
|
"unwind": [
|
||||||
|
"CPPTRACE_UNWIND_WITH_UNWIND",
|
||||||
|
"CPPTRACE_UNWIND_WITH_EXECINFO",
|
||||||
|
"CPPTRACE_UNWIND_WITH_LIBUNWIND",
|
||||||
|
"CPPTRACE_UNWIND_WITH_NOTHING",
|
||||||
|
],
|
||||||
|
"symbols": [
|
||||||
|
"CPPTRACE_GET_SYMBOLS_WITH_LIBBACKTRACE",
|
||||||
|
"CPPTRACE_GET_SYMBOLS_WITH_LIBDL",
|
||||||
|
"CPPTRACE_GET_SYMBOLS_WITH_LIBDWARF",
|
||||||
|
"CPPTRACE_GET_SYMBOLS_WITH_ADDR2LINE",
|
||||||
|
"CPPTRACE_GET_SYMBOLS_WITH_NOTHING",
|
||||||
|
],
|
||||||
|
"demangle": [
|
||||||
|
"CPPTRACE_DEMANGLE_WITH_CXXABI",
|
||||||
|
"CPPTRACE_DEMANGLE_WITH_NOTHING",
|
||||||
|
],
|
||||||
|
}
|
||||||
|
exclude = []
|
||||||
|
run_matrix(matrix, exclude, build)
|
||||||
|
|
||||||
|
def run_linux_default(compilers: list):
|
||||||
|
matrix = {
|
||||||
|
"compiler": compilers,
|
||||||
|
"target": ["Debug"],
|
||||||
|
"std": ["11", "20"],
|
||||||
|
"config": [""]
|
||||||
|
}
|
||||||
|
exclude = []
|
||||||
|
run_matrix(matrix, exclude, build_full_or_auto)
|
||||||
|
|
||||||
|
def run_macos_matrix(compilers: list):
|
||||||
|
matrix = {
|
||||||
|
"compiler": compilers,
|
||||||
|
"target": ["Debug"],
|
||||||
|
"std": ["11", "20"],
|
||||||
|
"unwind": [
|
||||||
|
"CPPTRACE_UNWIND_WITH_UNWIND",
|
||||||
|
"CPPTRACE_UNWIND_WITH_EXECINFO",
|
||||||
|
"CPPTRACE_UNWIND_WITH_NOTHING",
|
||||||
|
],
|
||||||
|
"symbols": [
|
||||||
|
#"CPPTRACE_GET_SYMBOLS_WITH_LIBBACKTRACE",
|
||||||
|
"CPPTRACE_GET_SYMBOLS_WITH_LIBDL",
|
||||||
|
"CPPTRACE_GET_SYMBOLS_WITH_LIBDWARF",
|
||||||
|
"CPPTRACE_GET_SYMBOLS_WITH_ADDR2LINE",
|
||||||
|
"CPPTRACE_GET_SYMBOLS_WITH_NOTHING",
|
||||||
|
],
|
||||||
|
"demangle": [
|
||||||
|
"CPPTRACE_DEMANGLE_WITH_CXXABI",
|
||||||
|
"CPPTRACE_DEMANGLE_WITH_NOTHING",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
exclude = []
|
||||||
|
run_matrix(matrix, exclude, build)
|
||||||
|
|
||||||
|
def run_macos_default(compilers: list):
|
||||||
|
matrix = {
|
||||||
|
"compiler": compilers,
|
||||||
|
"target": ["Debug"],
|
||||||
|
"std": ["11", "20"],
|
||||||
|
"config": [""]
|
||||||
|
}
|
||||||
|
exclude = []
|
||||||
|
run_matrix(matrix, exclude, build_full_or_auto)
|
||||||
|
|
||||||
|
def run_windows_matrix(compilers: list):
|
||||||
|
matrix = {
|
||||||
|
"compiler": compilers,
|
||||||
|
"target": ["Debug"],
|
||||||
|
"std": ["11", "20"],
|
||||||
|
"unwind": [
|
||||||
|
"CPPTRACE_UNWIND_WITH_WINAPI",
|
||||||
|
"CPPTRACE_UNWIND_WITH_DBGHELP",
|
||||||
|
"CPPTRACE_UNWIND_WITH_UNWIND",
|
||||||
|
"CPPTRACE_UNWIND_WITH_NOTHING",
|
||||||
|
],
|
||||||
|
"symbols": [
|
||||||
|
"CPPTRACE_GET_SYMBOLS_WITH_DBGHELP",
|
||||||
|
"CPPTRACE_GET_SYMBOLS_WITH_LIBDWARF",
|
||||||
|
"CPPTRACE_GET_SYMBOLS_WITH_ADDR2LINE",
|
||||||
|
"CPPTRACE_GET_SYMBOLS_WITH_NOTHING",
|
||||||
|
],
|
||||||
|
"demangle": [
|
||||||
|
#"CPPTRACE_DEMANGLE_WITH_CXXABI",
|
||||||
|
"CPPTRACE_DEMANGLE_WITH_NOTHING",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
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++"
|
||||||
|
},
|
||||||
|
]
|
||||||
|
run_matrix(matrix, exclude, build)
|
||||||
|
|
||||||
|
def run_windows_default(compilers: list):
|
||||||
|
matrix = {
|
||||||
|
"compiler": compilers,
|
||||||
|
"target": ["Debug"],
|
||||||
|
"std": ["11", "20"],
|
||||||
|
"config": [""]
|
||||||
|
}
|
||||||
|
exclude = []
|
||||||
|
run_matrix(matrix, exclude, build_full_or_auto)
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
prog="Build in all configs",
|
prog="Build in all configs",
|
||||||
@ -159,6 +298,10 @@ def main():
|
|||||||
"--all",
|
"--all",
|
||||||
action="store_true"
|
action="store_true"
|
||||||
)
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--default-config",
|
||||||
|
action="store_true"
|
||||||
|
)
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
if platform.system() == "Linux":
|
if platform.system() == "Linux":
|
||||||
@ -167,75 +310,20 @@ def main():
|
|||||||
compilers.append("clang++-14")
|
compilers.append("clang++-14")
|
||||||
if args.gcc or args.all:
|
if args.gcc or args.all:
|
||||||
compilers.append("g++-10")
|
compilers.append("g++-10")
|
||||||
matrix = {
|
if args.default_config:
|
||||||
"compiler": compilers,
|
run_linux_default(compilers)
|
||||||
"target": ["Debug"],
|
else:
|
||||||
"std": ["11", "20"],
|
run_linux_matrix(compilers)
|
||||||
"unwind": [
|
|
||||||
"CPPTRACE_UNWIND_WITH_UNWIND",
|
|
||||||
"CPPTRACE_UNWIND_WITH_EXECINFO",
|
|
||||||
"CPPTRACE_UNWIND_WITH_LIBUNWIND",
|
|
||||||
"CPPTRACE_UNWIND_WITH_NOTHING",
|
|
||||||
],
|
|
||||||
"symbols": [
|
|
||||||
"CPPTRACE_GET_SYMBOLS_WITH_LIBBACKTRACE",
|
|
||||||
"CPPTRACE_GET_SYMBOLS_WITH_LIBDL",
|
|
||||||
"CPPTRACE_GET_SYMBOLS_WITH_LIBDWARF",
|
|
||||||
"CPPTRACE_GET_SYMBOLS_WITH_ADDR2LINE",
|
|
||||||
"CPPTRACE_GET_SYMBOLS_WITH_NOTHING",
|
|
||||||
],
|
|
||||||
"demangle": [
|
|
||||||
"CPPTRACE_DEMANGLE_WITH_CXXABI",
|
|
||||||
"CPPTRACE_DEMANGLE_WITH_NOTHING",
|
|
||||||
],
|
|
||||||
}
|
|
||||||
exclude = []
|
|
||||||
run_matrix(matrix, exclude, build)
|
|
||||||
matrix = {
|
|
||||||
"compiler": compilers,
|
|
||||||
"target": ["Debug"],
|
|
||||||
"std": ["11", "20"],
|
|
||||||
"config": [""]
|
|
||||||
}
|
|
||||||
exclude = []
|
|
||||||
run_matrix(matrix, exclude, build_full_or_auto)
|
|
||||||
if platform.system() == "Darwin":
|
if platform.system() == "Darwin":
|
||||||
compilers = []
|
compilers = []
|
||||||
if args.clang or args.all:
|
if args.clang or args.all:
|
||||||
compilers.append("clang++")
|
compilers.append("clang++")
|
||||||
if args.gcc or args.all:
|
if args.gcc or args.all:
|
||||||
compilers.append("g++-12")
|
compilers.append("g++-12")
|
||||||
matrix = {
|
if args.default_config:
|
||||||
"compiler": compilers,
|
run_macos_default(compilers)
|
||||||
"target": ["Debug"],
|
else:
|
||||||
"std": ["11", "20"],
|
run_macos_matrix(compilers)
|
||||||
"unwind": [
|
|
||||||
"CPPTRACE_UNWIND_WITH_UNWIND",
|
|
||||||
"CPPTRACE_UNWIND_WITH_EXECINFO",
|
|
||||||
"CPPTRACE_UNWIND_WITH_NOTHING",
|
|
||||||
],
|
|
||||||
"symbols": [
|
|
||||||
#"CPPTRACE_GET_SYMBOLS_WITH_LIBBACKTRACE",
|
|
||||||
"CPPTRACE_GET_SYMBOLS_WITH_LIBDL",
|
|
||||||
"CPPTRACE_GET_SYMBOLS_WITH_LIBDWARF",
|
|
||||||
"CPPTRACE_GET_SYMBOLS_WITH_ADDR2LINE",
|
|
||||||
"CPPTRACE_GET_SYMBOLS_WITH_NOTHING",
|
|
||||||
],
|
|
||||||
"demangle": [
|
|
||||||
"CPPTRACE_DEMANGLE_WITH_CXXABI",
|
|
||||||
"CPPTRACE_DEMANGLE_WITH_NOTHING",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
exclude = []
|
|
||||||
run_matrix(matrix, exclude, build)
|
|
||||||
matrix = {
|
|
||||||
"compiler": compilers,
|
|
||||||
"target": ["Debug"],
|
|
||||||
"std": ["11", "20"],
|
|
||||||
"config": [""]
|
|
||||||
}
|
|
||||||
exclude = []
|
|
||||||
run_matrix(matrix, exclude, build_full_or_auto)
|
|
||||||
if platform.system() == "Windows":
|
if platform.system() == "Windows":
|
||||||
compilers = []
|
compilers = []
|
||||||
if args.clang or args.all:
|
if args.clang or args.all:
|
||||||
@ -244,70 +332,10 @@ def main():
|
|||||||
compilers.append("cl")
|
compilers.append("cl")
|
||||||
if args.gcc or args.all:
|
if args.gcc or args.all:
|
||||||
compilers.append("g++")
|
compilers.append("g++")
|
||||||
matrix = {
|
if args.default_config:
|
||||||
"compiler": compilers,
|
run_windows_default(compilers)
|
||||||
"target": ["Debug"],
|
else:
|
||||||
"std": ["11", "20"],
|
run_windows_matrix(compilers)
|
||||||
"unwind": [
|
|
||||||
"CPPTRACE_UNWIND_WITH_WINAPI",
|
|
||||||
"CPPTRACE_UNWIND_WITH_DBGHELP",
|
|
||||||
"CPPTRACE_UNWIND_WITH_UNWIND",
|
|
||||||
"CPPTRACE_UNWIND_WITH_NOTHING",
|
|
||||||
],
|
|
||||||
"symbols": [
|
|
||||||
"CPPTRACE_GET_SYMBOLS_WITH_DBGHELP",
|
|
||||||
"CPPTRACE_GET_SYMBOLS_WITH_LIBDWARF",
|
|
||||||
"CPPTRACE_GET_SYMBOLS_WITH_ADDR2LINE",
|
|
||||||
"CPPTRACE_GET_SYMBOLS_WITH_NOTHING",
|
|
||||||
],
|
|
||||||
"demangle": [
|
|
||||||
#"CPPTRACE_DEMANGLE_WITH_CXXABI",
|
|
||||||
"CPPTRACE_DEMANGLE_WITH_NOTHING",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
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++"
|
|
||||||
},
|
|
||||||
]
|
|
||||||
run_matrix(matrix, exclude, build)
|
|
||||||
matrix = {
|
|
||||||
"compiler": compilers,
|
|
||||||
"target": ["Debug"],
|
|
||||||
"std": ["11", "20"],
|
|
||||||
"config": [""]
|
|
||||||
}
|
|
||||||
exclude = []
|
|
||||||
run_matrix(matrix, exclude, build_full_or_auto)
|
|
||||||
|
|
||||||
global failed
|
global failed
|
||||||
if failed:
|
if failed:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user