Skip to content

Commit

Permalink
CI: run msan and asan tests on all PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
rosenhouse committed Mar 21, 2023
1 parent 98f5ca1 commit 5dd7535
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 14 deletions.
27 changes: 16 additions & 11 deletions ci/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
#@ )

#@ load("sequences.lib.yml",
#@ "sequence_pr_build_test",
#@ "sequence_pr_debug_build_test",
#@ "sequence_pr_build_test_image",
#@ "sequence_pr_test",
#@ "sequence_pr_clang_format",
#@ "sequence_pr_shell_scripts",
#@ )
Expand Down Expand Up @@ -115,25 +115,28 @@ jobs:
#! Commits to covered branches will build and test
- #@ job_test("clang", b, is_debug=True)
- #@ job_test("gcc", b, is_debug=True)
- #@ job_test("clang", b, sanitize="asan")
- #@ job_test("clang", b, sanitize="msan")

#! Nightly jobs which take too long to run per-PR
- #@ job_test("gcc", b, trigger="nightly", test_nightly=True)
- #@ job_test("clang", b, trigger="nightly", sanitize="asan")
- #@ job_test("clang", b, trigger="nightly", sanitize="msan")


#! Pull requests to a covered branch
#! must first pass a fast stage and then fan out to a slow stage
#@ stage_one = [b + "-pr-quick-check", b + "-pr-clang-format", b + "-pr-shell-scripts"]
- #@ job_pr_check("clang-format", b, sequence_pr_clang_format(), description="check C source formatting")
- #@ job_pr_check("shell-scripts", b, sequence_pr_shell_scripts(), description="lint and format any shell scripts")
- #@ job_pr_check("quick-check", b, sequence_pr_debug_build_test("clang", quick=True), description="build and run fast unit tests")
- #@ job_pr_check("quick-check", b, sequence_pr_test("clang", quick=True), description="build and run fast unit tests")

#! second stage of pipeline, only triggers if all of the first-stage passes
- #@ job_pr_check("clang", b, sequence_pr_build_test("clang"), depends_on=stage_one, description="build and test")
- #@ job_pr_check("gcc", b, sequence_pr_build_test("gcc"), depends_on=stage_one, description="build and test")
- #@ job_pr_check("debug-clang", b, sequence_pr_debug_build_test("clang"), depends_on=stage_one, description="debug build and test")
- #@ job_pr_check("debug-gcc", b, sequence_pr_debug_build_test("gcc"), depends_on=stage_one, description="debug build and test")
- #@ job_pr_check("clang", b, sequence_pr_build_test_image("clang"), depends_on=stage_one, description="release build and test image")
- #@ job_pr_check("gcc", b, sequence_pr_build_test_image("gcc"), depends_on=stage_one, description="release build and test image")
- #@ job_pr_check("debug-clang", b, sequence_pr_test("clang"), depends_on=stage_one, description="debug build and test")
- #@ job_pr_check("debug-gcc", b, sequence_pr_test("gcc"), depends_on=stage_one, description="debug build and test")

- #@ job_pr_check("asan", b, sequence_pr_test("clang", sanitize="asan", is_debug=False), depends_on=stage_one, description="asan build and test")
- #@ job_pr_check("msan", b, sequence_pr_test("clang", sanitize="msan", is_debug=False), depends_on=stage_one, description="msan build and test")

#@ end #! for loop over branches

Expand All @@ -150,6 +153,8 @@ groups:
#@ end
- #@ b + "-debug-clang"
- #@ b + "-debug-gcc"
- #@ b + "-asan-clang"
- #@ b + "-msan-clang"

- name: #@ b + "_pull_requests"
jobs:
Expand All @@ -160,12 +165,12 @@ groups:
- #@ b + "-pr-debug-gcc"
- #@ b + "-pr-clang-format"
- #@ b + "-pr-shell-scripts"
- #@ b + "-pr-asan"
- #@ b + "-pr-msan"

- name: #@ b + "_nightly"
jobs:
- #@ b + "-nightly-test-gcc"
- #@ b + "-asan-clang"
- #@ b + "-msan-clang"
#@ end

- name: env_images
Expand Down
6 changes: 3 additions & 3 deletions ci/sequences.lib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#! Build plan sequences for various PR checks

#@ def sequence_pr_build_test(compiler):
#@ def sequence_pr_build_test_image(compiler):
- in_parallel:
fail_fast: true
steps:
Expand All @@ -31,10 +31,10 @@

---

#@ def sequence_pr_debug_build_test(compiler, quick=False, sanitize=None):
#@ def sequence_pr_test(compiler, quick=False, sanitize=None, is_debug=True):
- get: build-env-image-latest
passed: [ recreate-build-env ]
- #@ step_build_test(compiler, "github-pull-request", is_debug=True, quick=quick, sanitize=sanitize)
- #@ step_build_test(compiler, "github-pull-request", is_debug=is_debug, quick=quick, sanitize=sanitize)
#@ end

---
Expand Down

0 comments on commit 5dd7535

Please sign in to comment.