Added problem matchers to CI workflow

This commit is contained in:
kobalicek
2020-11-07 16:05:16 +01:00
parent 88129d7389
commit fe89388e52
3 changed files with 101 additions and 65 deletions

View File

@@ -7,7 +7,7 @@ defaults:
jobs:
source-check:
name: "Source Check"
name: "source check"
runs-on: ubuntu-latest
steps:
@@ -29,64 +29,67 @@ jobs:
fail-fast: false
matrix:
include:
- { title: "diag-asan" , os: "ubuntu-latest" , cxx: "clang" , architecture: "x64", build_type: "Release", diagnose: "address" }
- { title: "diag-ubsan" , os: "ubuntu-latest" , cxx: "clang" , architecture: "x64", build_type: "Release", diagnose: "undefined" }
- { title: "diag-valgrind" , os: "ubuntu-latest" , cxx: "clang" , architecture: "x64", build_type: "Release", diagnose: "valgrind" }
- { title: "linux-lib" , os: "ubuntu-latest" , cxx: "clang" , architecture: "x64", build_type: "Release", problem_matcher: "true" }
- { title: "windows-lib" , os: "windows-latest", cxx: "vs2019" , architecture: "x86", build_type: "Debug" , problem_matcher: "true" }
- { title: "no-deprecated" , os: "ubuntu-latest" , cxx: "clang" , architecture: "x64", build_type: "Release", add_defs: ",ASMJIT_NO_DEPRECATED=1" }
- { title: "no-intrinsics" , os: "ubuntu-latest" , cxx: "clang" , architecture: "x64", build_type: "Release", add_defs: ",ASMJIT_NO_INTRINSICS=1" }
- { title: "no-logging" , os: "ubuntu-latest" , cxx: "clang" , architecture: "x64", build_type: "Release", add_defs: ",ASMJIT_NO_LOGGING=1" }
- { title: "no-builder" , os: "ubuntu-latest" , cxx: "clang" , architecture: "x64", build_type: "Release", add_defs: ",ASMJIT_NO_BUILDER=1" }
- { title: "no-compiler" , os: "ubuntu-latest" , cxx: "clang" , architecture: "x64", build_type: "Release", add_defs: ",ASMJIT_NO_COMPILER=1" }
- { title: "diag-asan" , os: "ubuntu-latest" , cxx: "clang" , architecture: "x64", build_type: "Release", defs: "ASMJIT_TEST=ON", diagnose: "address" }
- { title: "diag-ubsan" , os: "ubuntu-latest" , cxx: "clang" , architecture: "x64", build_type: "Release", defs: "ASMJIT_TEST=ON", diagnose: "undefined" }
- { title: "diag-valgrind" , os: "ubuntu-latest" , cxx: "clang" , architecture: "x64", build_type: "Release", defs: "ASMJIT_TEST=ON", diagnose: "valgrind" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "gcc" , architecture: "x86", build_type: "Debug" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "gcc" , architecture: "x86", build_type: "Release" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "gcc" , architecture: "x64", build_type: "Debug" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "gcc" , architecture: "x64", build_type: "Release" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "gcc-4.8" , architecture: "x86", build_type: "Debug" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "gcc-4.8" , architecture: "x86", build_type: "Release" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "gcc-4.8" , architecture: "x64", build_type: "Debug" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "gcc-4.8" , architecture: "x64", build_type: "Release" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "gcc-5" , architecture: "x86", build_type: "Debug" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "gcc-5" , architecture: "x64", build_type: "Debug" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "gcc-6" , architecture: "x86", build_type: "Debug" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "gcc-6" , architecture: "x64", build_type: "Debug" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "gcc-7" , architecture: "x86", build_type: "Debug" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "gcc-7" , architecture: "x64", build_type: "Debug" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "gcc-8" , architecture: "x86", build_type: "Debug" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "gcc-8" , architecture: "x64", build_type: "Debug" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "gcc-9" , architecture: "x86", build_type: "Debug" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "gcc-9" , architecture: "x64", build_type: "Debug" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "gcc-10" , architecture: "x86", build_type: "Debug" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "gcc-10" , architecture: "x86", build_type: "Release" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "gcc-10" , architecture: "x64", build_type: "Debug" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "gcc-10" , architecture: "x64", build_type: "Release" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "clang" , architecture: "x86", build_type: "Debug" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "clang" , architecture: "x86", build_type: "Release" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "clang" , architecture: "x64", build_type: "Debug" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "clang" , architecture: "x64", build_type: "Release" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "clang-9" , architecture: "x86", build_type: "Debug" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "clang-9" , architecture: "x86", build_type: "Release" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "clang-9" , architecture: "x64", build_type: "Debug" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "clang-9" , architecture: "x64", build_type: "Release" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "clang-10", architecture: "x86", build_type: "Debug" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "clang-10", architecture: "x86", build_type: "Release" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "clang-10", architecture: "x64", build_type: "Debug" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "clang-10", architecture: "x64", build_type: "Release" }
- { title: "no-deprecated" , os: "ubuntu-latest" , cxx: "clang" , architecture: "x64", build_type: "Release", defs: "ASMJIT_TEST=ON,ASMJIT_NO_DEPRECATED=1" }
- { title: "no-intrinsics" , os: "ubuntu-latest" , cxx: "clang" , architecture: "x64", build_type: "Release", defs: "ASMJIT_TEST=ON,ASMJIT_NO_INTRINSICS=1" }
- { title: "no-logging" , os: "ubuntu-latest" , cxx: "clang" , architecture: "x64", build_type: "Release", defs: "ASMJIT_TEST=ON,ASMJIT_NO_LOGGING=1" }
- { title: "no-builder" , os: "ubuntu-latest" , cxx: "clang" , architecture: "x64", build_type: "Release", defs: "ASMJIT_TEST=ON,ASMJIT_NO_BUILDER=1" }
- { title: "no-compiler" , os: "ubuntu-latest" , cxx: "clang" , architecture: "x64", build_type: "Release", defs: "ASMJIT_TEST=ON,ASMJIT_NO_COMPILER=1" }
- { title: "osx-10.15" , os: "macos-10.15" , cxx: "gcc-9" , architecture: "x64", build_type: "Debug" }
- { title: "osx-10.15" , os: "macos-10.15" , cxx: "gcc-9" , architecture: "x64", build_type: "Release" }
- { title: "osx-10.15" , os: "macos-10.15" , cxx: "clang" , architecture: "x64", build_type: "Debug" }
- { title: "osx-10.15" , os: "macos-10.15" , cxx: "clang" , architecture: "x64", build_type: "Release" }
- { title: "osx-11.0" , os: "macos-11.0" , cxx: "gcc-9" , architecture: "x64", build_type: "Debug" }
- { title: "osx-11.0" , os: "macos-11.0" , cxx: "gcc-9" , architecture: "x64", build_type: "Release" }
- { title: "osx-11.0" , os: "macos-11.0" , cxx: "clang" , architecture: "x64", build_type: "Debug" }
- { title: "osx-11.0" , os: "macos-11.0" , cxx: "clang" , architecture: "x64", build_type: "Release"
}
- { title: "windows" , os: "windows-latest", cxx: "vs2019" , architecture: "x86", build_type: "Debug" }
- { title: "windows" , os: "windows-latest", cxx: "vs2019" , architecture: "x86", build_type: "Release" }
- { title: "windows" , os: "windows-latest", cxx: "vs2019" , architecture: "x64", build_type: "Debug" }
- { title: "windows" , os: "windows-latest", cxx: "vs2019" , architecture: "x64", build_type: "Release" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "gcc" , architecture: "x86", build_type: "Debug" , defs: "ASMJIT_TEST=ON" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "gcc" , architecture: "x86", build_type: "Release", defs: "ASMJIT_TEST=ON" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "gcc" , architecture: "x64", build_type: "Debug" , defs: "ASMJIT_TEST=ON" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "gcc" , architecture: "x64", build_type: "Release", defs: "ASMJIT_TEST=ON" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "gcc-4.8" , architecture: "x86", build_type: "Debug" , defs: "ASMJIT_TEST=ON" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "gcc-4.8" , architecture: "x86", build_type: "Release", defs: "ASMJIT_TEST=ON" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "gcc-4.8" , architecture: "x64", build_type: "Debug" , defs: "ASMJIT_TEST=ON" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "gcc-4.8" , architecture: "x64", build_type: "Release", defs: "ASMJIT_TEST=ON" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "gcc-5" , architecture: "x86", build_type: "Debug" , defs: "ASMJIT_TEST=ON" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "gcc-5" , architecture: "x64", build_type: "Debug" , defs: "ASMJIT_TEST=ON" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "gcc-6" , architecture: "x86", build_type: "Debug" , defs: "ASMJIT_TEST=ON" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "gcc-6" , architecture: "x64", build_type: "Debug" , defs: "ASMJIT_TEST=ON" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "gcc-7" , architecture: "x86", build_type: "Debug" , defs: "ASMJIT_TEST=ON" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "gcc-7" , architecture: "x64", build_type: "Debug" , defs: "ASMJIT_TEST=ON" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "gcc-8" , architecture: "x86", build_type: "Debug" , defs: "ASMJIT_TEST=ON" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "gcc-8" , architecture: "x64", build_type: "Debug" , defs: "ASMJIT_TEST=ON" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "gcc-9" , architecture: "x86", build_type: "Debug" , defs: "ASMJIT_TEST=ON" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "gcc-9" , architecture: "x64", build_type: "Debug" , defs: "ASMJIT_TEST=ON" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "gcc-10" , architecture: "x86", build_type: "Debug" , defs: "ASMJIT_TEST=ON" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "gcc-10" , architecture: "x86", build_type: "Release", defs: "ASMJIT_TEST=ON" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "gcc-10" , architecture: "x64", build_type: "Debug" , defs: "ASMJIT_TEST=ON" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "gcc-10" , architecture: "x64", build_type: "Release", defs: "ASMJIT_TEST=ON" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "clang" , architecture: "x86", build_type: "Debug" , defs: "ASMJIT_TEST=ON" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "clang" , architecture: "x86", build_type: "Release", defs: "ASMJIT_TEST=ON" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "clang" , architecture: "x64", build_type: "Debug" , defs: "ASMJIT_TEST=ON" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "clang" , architecture: "x64", build_type: "Release", defs: "ASMJIT_TEST=ON" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "clang-9" , architecture: "x86", build_type: "Debug" , defs: "ASMJIT_TEST=ON" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "clang-9" , architecture: "x86", build_type: "Release", defs: "ASMJIT_TEST=ON" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "clang-9" , architecture: "x64", build_type: "Debug" , defs: "ASMJIT_TEST=ON" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "clang-9" , architecture: "x64", build_type: "Release", defs: "ASMJIT_TEST=ON" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "clang-10", architecture: "x86", build_type: "Debug" , defs: "ASMJIT_TEST=ON" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "clang-10", architecture: "x86", build_type: "Release", defs: "ASMJIT_TEST=ON" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "clang-10", architecture: "x64", build_type: "Debug" , defs: "ASMJIT_TEST=ON" }
- { title: "linux" , os: "ubuntu-latest" , cxx: "clang-10", architecture: "x64", build_type: "Release", defs: "ASMJIT_TEST=ON" }
- { title: "osx-10.15" , os: "macos-10.15" , cxx: "gcc-9" , architecture: "x64", build_type: "Debug" , defs: "ASMJIT_TEST=ON" }
- { title: "osx-10.15" , os: "macos-10.15" , cxx: "gcc-9" , architecture: "x64", build_type: "Release", defs: "ASMJIT_TEST=ON" }
- { title: "osx-10.15" , os: "macos-10.15" , cxx: "clang" , architecture: "x64", build_type: "Debug" , defs: "ASMJIT_TEST=ON" }
- { title: "osx-10.15" , os: "macos-10.15" , cxx: "clang" , architecture: "x64", build_type: "Release", defs: "ASMJIT_TEST=ON" }
- { title: "osx-11.0" , os: "macos-11.0" , cxx: "gcc-9" , architecture: "x64", build_type: "Debug" , defs: "ASMJIT_TEST=ON" }
- { title: "osx-11.0" , os: "macos-11.0" , cxx: "gcc-9" , architecture: "x64", build_type: "Release", defs: "ASMJIT_TEST=ON" }
- { title: "osx-11.0" , os: "macos-11.0" , cxx: "clang" , architecture: "x64", build_type: "Debug" , defs: "ASMJIT_TEST=ON" }
- { title: "osx-11.0" , os: "macos-11.0" , cxx: "clang" , architecture: "x64", build_type: "Release", defs: "ASMJIT_TEST=ON" }
- { title: "windows" , os: "windows-latest", cxx: "vs2019" , architecture: "x86", build_type: "Debug" , defs: "ASMJIT_TEST=ON" }
- { title: "windows" , os: "windows-latest", cxx: "vs2019" , architecture: "x86", build_type: "Release", defs: "ASMJIT_TEST=ON" }
- { title: "windows" , os: "windows-latest", cxx: "vs2019" , architecture: "x64", build_type: "Debug" , defs: "ASMJIT_TEST=ON" }
- { title: "windows" , os: "windows-latest", cxx: "vs2019" , architecture: "x64", build_type: "Release", defs: "ASMJIT_TEST=ON" }
name: "${{matrix.title}} (${{matrix.cxx}}, ${{matrix.architecture}}, ${{matrix.build_type}})"
runs-on: "${{matrix.os}}"
@@ -113,8 +116,9 @@ jobs:
--compiler=${{matrix.cxx}}
--architecture=${{matrix.architecture}}
--build-type=${{matrix.build_type}}
--build-defs=ASMJIT_TEST=ON${{matrix.add_defs}}
--build-defs=${{matrix.defs}}
--diagnose=${{matrix.diagnose}}
--problem-matcher=${{matrix.problem_matcher}}
- name: "Build"
run: python -B .github/workflows/run-step.py

View File

@@ -55,6 +55,7 @@ def main():
parser.add_argument("--build-type", default="", help="Build type (Debug / Release)")
parser.add_argument("--build-defs", default="", help="Build definitions")
parser.add_argument("--diagnose", default="", help="Diagnostics (valgrind|address|undefined)")
parser.add_argument("--problem-matcher", default="", help="Whether to setup a problem matcher")
args = parser.parse_args()
step = args.step
@@ -75,10 +76,8 @@ def main():
generator = "Visual Studio 15 2017"
elif compiler == "vs2019":
generator = "Visual Studio 16 2019"
elif platform_name == "Darwin":
generator = "Unix Makefiles"
else:
generator = "Ninja"
generator = "Unix Makefiles"
# ---------------------------------------------------------------------------
@@ -126,6 +125,9 @@ def main():
# ---------------------------------------------------------------------------
if step == "configure":
if args.problem_matcher:
log("::add-matcher::.github/problem-matcher.json")
os.makedirs(args.build_dir, exist_ok=True)
cmd = ["cmake", source_root, "-G" + generator]
@@ -171,12 +173,12 @@ def main():
# ---------------------------------------------------------------------------
if step == "build":
cmd = ["cmake", "--build", "."]
cmd = ["cmake", "--build", args.build_dir, "--parallel"]
if generator.startswith("Visual Studio"):
cmd.extend(["--config", args.build_type, "--", "-nologo", "-v:minimal"])
run(cmd, cwd=args.build_dir)
run(cmd)
exit(0)
# ---------------------------------------------------------------------------
@@ -201,13 +203,12 @@ def main():
# Ignore tests, which were not built, because of disabled features.
if os.path.isfile(executable):
try:
log("::group::" + test_name)
log(" ".join(cmd))
log("::group::" + " ".join(cmd))
cmd[0] = executable
if diagnose == "valgrind":
cmd = valgrind_args + cmd
cmd[0] = executable
run(cmd, cwd=build_dir, print_command=False)
finally:
log("::endgroup::")