Skip to content

CI/BM: fix BuildCheck — pin ubuntu-24.04, upgrade DDT image to gcc-14, register rasdaemon/mce-inject submodules, gate warnings via allowlist#579

Merged
hongyuni merged 5 commits into
mainfrom
sync/basic-build-fix
Jun 25, 2026
Merged

Conversation

@hongyuni

@hongyuni hongyuni commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Restore the open-source BuildCheck CI job to a working state. The previous
configuration depended on a personal fork submodule, an outdated gcc-13 image,
a buggy build_check script, and a ubuntu-latest runner whose silent shift to
24.04 was already exposing pre-existing build warnings as job failures.

What's in this PR

  1. BM/ras: add rasdaemon and mce-inject submodules, re-pin mce-test
    .gitmodules is updated to point mce-test at the canonical upstream
    (git.kernel.org/.../mce-test.git) and re-pinned to dbbbc64 (reachable
    in upstream master). rasdaemon (github.com/mchehab/rasdaemon @ a4620eb)
    and mce-inject (git.kernel.org/.../mce-inject @ ca81c1d) are added as
    first-class submodules so actions/checkout --recurse-submodules populates
    them on every CI run. All three SHAs verified reachable from upstream.

  2. BM/ras: refresh Makefile, tests and helper scripts
    Pure content sync of the per-test shell scripts (mce_test.sh,
    lmce_test.sh, ras_common.sh), the per-subdir Makefile, the README,
    and adds bff_test.sh / einjv2_test.sh. No CI / build-system changes
    in this commit.

  3. BM: bump Dockerfile.build.ddt to gcc-14 and add rasdaemon build deps
    New BM/ras subdirs (cmpccxadd and others) need gcc >= 14. Image base
    stays at ubuntu:24.04 (gcc-14 is in noble universe, no PPA required).
    Adds bison, flex, autoconf, automake, libtool, pkg-config,
    libsqlite3-dev, libtraceevent-dev, python3 so rasdaemon can
    autoreconf && ./configure --enable-sqlite3 --enable-mce …. Registers
    gcc-14/g++-14 via update-alternatives so bare gcc/g++ resolves to
    v14 without touching in-tree Makefiles.

  4. BM/Makefile: add DDT_SKIP_SUBDIRS skip mechanism and fix failure detection
    Adds an opt-in skip list (used by CI to skip tdx-compliance, which
    needs a matching /lib/modules/$(uname -r)/build tree not available in
    the runner). Fixes a latent bug in the post-build error check that
    inspected an undefined MAKE_TOOLS_LOG instead of MAKE_LKVS_LOG,
    masking real subdir build failures. Mounts /lib/modules into
    docker_clean/docker_make to match docker_make_ddt, and adds a
    matching docker_clean_ddt target.

  5. ci: pin ubuntu-24.04, build with gcc-14 DDT image, gate warnings via allowlist

    • runs-on: ubuntu-latestubuntu-24.04 on every job (pin, not float).
    • BuildCheck builds from BM/Dockerfile.build.ddt (gcc-14) instead of
      BM/Dockerfile.build (gcc-11) and drops the docker-engine bootstrap
      block (Docker is preinstalled on GitHub-hosted runners) plus sudo -E.
    • actions/checkout v3 → v4 with submodules: recursive;
      actions/setup-python v4 → v5.
    • cfg-lint-check replaces the third-party tj-actions/changed-files@v46
      with an inline git diff --diff-filter=ACMRT over the PR merge-base.
    • build_check is rewritten: named/cleanup-trapped container, toolchain
      diagnostic step, rasdaemon preconfigure, tdx-compliance skip via
      DDT_SKIP_SUBDIRS, and a new
      .github/scripts/build_warning_allowlist (regex per line) so only
      new warnings fail the job. Existing entries should be pruned as the
      underlying sources are fixed; this is not a forever-suppress mechanism.

hongyuni added 5 commits June 21, 2026 22:30
- Add rasdaemon  (github.com/mchehab/rasdaemon @ a4620eb).
- Add mce-inject (git.kernel.org/.../mce-inject @ ca81c1d).
- Re-point mce-test from a personal fork to canonical upstream
  (git.kernel.org/.../mce-test) and re-pin to dbbbc64, which is
  reachable in upstream master (1 commit behind tip)."

Signed-off-by: Hongyu Ning <hongyu.ning@intel.com>
Signed-off-by: Hongyu Ning <hongyu.ning@intel.com>
- Replace gcc-13 with gcc-14 (+ g++-14) and their -multilib variants
  so the existing gcc-multilib / g++-multilib (i386) build keeps
  working. Register them via update-alternatives so plain `gcc` /
  `g++` resolve to v14 without touching in-tree Makefiles. Required
  by new feature folders that need gcc >= 14.
- Add bison, flex, autoconf, automake, libtool, pkg-config,
  libsqlite3-dev, libtraceevent-dev, python3 so ras/rasdaemon can
  autoreconf + ./configure --enable-sqlite3 --enable-mce ... in CI.

Signed-off-by: Hongyu Ning <hongyu.ning@intel.com>
…ules

- Add a `DDT_SKIP_SUBDIRS` make variable consumed by the top-level
  build loop: subdir basenames listed in it are skipped with a clear
  log line. Used by `docker_make_ddt` (and the CI build_check script)
  to skip `tdx-compliance`, which needs a matching
  /lib/modules/$(uname -r)/build tree not available in the DDT
  container.
- Fix the post-build error check: it inspected `MAKE_TOOLS_LOG`
  (undefined) instead of `MAKE_LKVS_LOG`, so subfolder build
  failures were silently treated as success. Now correctly exits 2
  when any subfolder failed.
- Fix the per-subdir failure path: capture rc and `cd ..` before
  `continue` so we don't stay in the failed subdir for the next
  iteration.
- Mount `/lib/modules/$(uname -r)` into the `docker_clean` /
  `docker_make` containers (matches `docker_make_ddt`) so kernel
  module subdirs can resolve their build tree.
- Add a `docker_clean_ddt` target mirroring `docker_make_ddt`
  (ubuntu:24.04 image).
- Reword the success message to "All required subfolders built
  successfully" to reflect that some may have been skipped.

Signed-off-by: Hongyu Ning <hongyu.ning@intel.com>
- pull_request.yml:
  * runs-on: ubuntu-latest -> ubuntu-24.04 (all jobs); checkout v3->v4,
    setup-python v4->v5.
  * BuildCheck: drop docker-engine bootstrap (preinstalled on the
    runner), drop sudo, build from BM/Dockerfile.build.ddt, checkout
    submodules recursively.
  * CodeCheck: use apt-get + set -euo pipefail, add wget.
  * cfg-lint-check: replace tj-actions/changed-files@v46 with an inline
    `git diff` over the PR merge-base feeding the cartesian matrix.

- .github/scripts/build_check:
  * Fix bogus `set -oe pipefail` -> `set -o pipefail`.
  * Use a named, run-id-scoped container with a cleanup trap.
  * Log container os-release, gcc/g++ versions, uname before building.
  * Preconfigure ras/rasdaemon (autoreconf + ./configure) before
    `make test`; skip tdx-compliance by default via DDT_SKIP_SUBDIRS
    (needs a matching kernel build tree not present in CI).
  * Capture rc via PIPESTATUS; split warnings into build_warnings.log
    and unexpected_build_warnings.log, failing only on the latter.

- .github/scripts/build_warning_allowlist (new):
  * Regex-per-line allowlist of currently known pre-existing build
    warnings (cet, cmpccxadd, ras/mce-test, einj, memattr, page,
    etc.) so CI gates on new regressions only. Entries should be
    pruned as the underlying source is fixed.

Signed-off-by: Hongyu Ning <hongyu.ning@intel.com>
@hongyuni hongyuni force-pushed the sync/basic-build-fix branch 5 times, most recently from 5976246 to f90b479 Compare June 25, 2026 07:09
@hongyuni hongyuni changed the title ci: pin ubuntu-24.04, use DDT image, gate warnings via allowlist CI/BM: fix BuildCheck — pin ubuntu-24.04, upgrade DDT image to gcc-14, register rasdaemon/mce-inject submodules, gate warnings via allowlist Jun 25, 2026
@hongyuni hongyuni merged commit 7dde3d2 into main Jun 25, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant