From 6df1484fb2f4235d8a40b9358e83052706ce6445 Mon Sep 17 00:00:00 2001 From: Alexander Lanin Date: Wed, 4 Nov 2026 21:06:53 +0100 Subject: [PATCH 1/7] Exercise central workflow with native and ARM builds --- .github/ci.yml | 45 +++++++++++++++++++++ .github/workflows/poc-configured-checks.yml | 29 +++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 .github/ci.yml create mode 100644 .github/workflows/poc-configured-checks.yml diff --git a/.github/ci.yml b/.github/ci.yml new file mode 100644 index 0000000000..68dae6ea01 --- /dev/null +++ b/.github/ci.yml @@ -0,0 +1,45 @@ +# Copyright (c) 2026 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0 +# +# SPDX-License-Identifier: Apache-2.0 + +# This opt-in POC exercises a focused dependency graph through the shared CI. +# Existing module workflows remain the required coverage for the complete module. +# Bazel configs select module-owned platforms and toolchains explicitly. +schema-version: 2 + +variants: + - name: linux-native + architecture: + - name: x86_64 + os: + - name: linux + + checks: + tests: + # Build the library explicitly before executing its native unit tests. + # Both commands must produce Bazel evidence for the shared gate to pass. + - test-type: unit + bazel-configs: x86_64-linux + bazel-build-targets: //score/health_monitor/src/cpp:health_monitoring_cc + bazel-test-targets: //score/health_monitor/src/cpp:cpp_unit_tests + + - name: linux-cross + architecture: + - name: aarch64 + os: + - name: linux + + checks: + builds: + # Cross-compilation checks the ARM toolchain without pretending that + # native unit tests have run on ARM or requiring an emulation setup. + - name: compiler + bazel-configs: arm64-linux + bazel-build-targets: //score/health_monitor/src/cpp:health_monitoring_cc diff --git a/.github/workflows/poc-configured-checks.yml b/.github/workflows/poc-configured-checks.yml new file mode 100644 index 0000000000..f4d9a2721d --- /dev/null +++ b/.github/workflows/poc-configured-checks.yml @@ -0,0 +1,29 @@ +# Copyright (c) 2026 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0 +# +# SPDX-License-Identifier: Apache-2.0 + +# Run this comparison manually against the experimental central workflow. +# Keeping it manual avoids replacing the module's established required checks +# before the central contract and the selected targets have been reviewed. +name: Configured checks POC + +on: + workflow_dispatch: + +permissions: + contents: read + +jobs: + checks: + # Experimental upstream branch reference for this comparison. + # A released adoption must pin the workflow and helper together. + uses: eclipse-score/cicd-workflows/.github/workflows/on-pr.yml@central-workflow + with: + workflow-config-yaml: .github/ci.yml From da54981d71c659095eb2a048faea8a448b8bf640 Mon Sep 17 00:00:00 2001 From: Alexander Lanin Date: Thu, 5 Nov 2026 09:16:11 +0100 Subject: [PATCH 2/7] Replace regular Linux matrix with central workflow --- .github/ci.yml | 12 +++--- .github/workflows/on-pr.yml | 47 +++++++-------------- .github/workflows/poc-configured-checks.yml | 29 ------------- 3 files changed, 21 insertions(+), 67 deletions(-) delete mode 100644 .github/workflows/poc-configured-checks.yml diff --git a/.github/ci.yml b/.github/ci.yml index 68dae6ea01..d84a375e77 100644 --- a/.github/ci.yml +++ b/.github/ci.yml @@ -9,8 +9,8 @@ # # SPDX-License-Identifier: Apache-2.0 -# This opt-in POC exercises a focused dependency graph through the shared CI. -# Existing module workflows remain the required coverage for the complete module. +# The shared workflow owns the regular native and cross-compiled Linux rows. +# Sanitizers, QNX, coverage and documentation retain their dedicated jobs. # Bazel configs select module-owned platforms and toolchains explicitly. schema-version: 2 @@ -23,12 +23,12 @@ variants: checks: tests: - # Build the library explicitly before executing its native unit tests. + # Build the complete module graph before running all native tests. # Both commands must produce Bazel evidence for the shared gate to pass. - test-type: unit bazel-configs: x86_64-linux - bazel-build-targets: //score/health_monitor/src/cpp:health_monitoring_cc - bazel-test-targets: //score/health_monitor/src/cpp:cpp_unit_tests + bazel-build-targets: //examples/... //score/... + bazel-test-targets: //... - name: linux-cross architecture: @@ -42,4 +42,4 @@ variants: # native unit tests have run on ARM or requiring an emulation setup. - name: compiler bazel-configs: arm64-linux - bazel-build-targets: //score/health_monitor/src/cpp:health_monitoring_cc + bazel-build-targets: //examples/... //score/... diff --git a/.github/workflows/on-pr.yml b/.github/workflows/on-pr.yml index b02f7264d2..2ee5269384 100644 --- a/.github/workflows/on-pr.yml +++ b/.github/workflows/on-pr.yml @@ -27,37 +27,29 @@ on: jobs: common: - name: Common checks + name: Common checks and Linux builds permissions: contents: read - uses: eclipse-score/cicd-workflows/.github/workflows/on-pr.yml@on-pr/v0.0.0 + # Common checks and regular Linux rows share the configured central entry. + uses: eclipse-score/cicd-workflows/.github/workflows/on-pr.yml@central-workflow + with: + workflow-config-yaml: .github/ci.yml - # We don't use eclipse-score/cicd-workflows/.github/workflows/tests.yml - # because it is more resource efficient to build and test in the same job. - # Also the cache name in the template is not configurable. - build: - name: Build and test ${{ matrix.name }} + # Sanitizers have test-only target selection because compiling every target + # hits the module issues referenced below. Keep that policy visible here. + sanitizers: + name: Sanitizer / ${{ matrix.name }} runs-on: ubuntu-24.04 strategy: fail-fast: false matrix: include: - - name: x86_64-linux - bazel-args: --config=x86_64-linux - build: true - test: true - - name: arm64-linux - bazel-args: --config=arm64-linux - build: true - test: false # Cannot run on x86_64 - name: asan_ubsan_lsan bazel-args: --config=x86_64-linux --config=asan_ubsan_lsan - build: false # https://github.com/eclipse-score/lifecycle/issues/476 - test: true + # https://github.com/eclipse-score/lifecycle/issues/476 - name: tsan bazel-args: --config=x86_64-linux --config=tsan - build: false # https://github.com/eclipse-score/lifecycle/issues/474 - test: true + # https://github.com/eclipse-score/lifecycle/issues/474 permissions: contents: read steps: @@ -69,17 +61,7 @@ jobs: with: disk-cache-key: ${{ github.job }}-${{ matrix.name }} - - name: Build with Bazel - if: matrix.build - run: | - bazel build \ - --lockfile_mode=error \ - ${{ matrix.bazel-args }} \ - //examples/... \ - //score/... - - name: Test with Bazel - if: matrix.test run: | bazel test \ --lockfile_mode=error \ @@ -166,7 +148,7 @@ jobs: docs-build: name: Build documentation needs: - - build + - common uses: eclipse-score/cicd-workflows/.github/workflows/docs.yml@8d80e8df150cae21d53cbc8031d0f970648f7a67 # v0.0.3 permissions: contents: read @@ -179,7 +161,8 @@ jobs: --github_user=${{ github.repository_owner }} \ --github_repo=${{ github.event.repository.name }} retention-days: 3 - tests-report-artifact: bazel-testlogs-x86_64-linux + # The shared archive keeps the package tree at its root for XML linking. + tests-report-artifact: ${{ fromJSON(needs.common.outputs.configured-artifacts)['linux-native-tests-unit'].testlogs }} gitlint: name: Check commit messages @@ -202,7 +185,7 @@ jobs: name: Ready to merge needs: - common - - build + - sanitizers - docs-check - docs-link-check - docs-build diff --git a/.github/workflows/poc-configured-checks.yml b/.github/workflows/poc-configured-checks.yml deleted file mode 100644 index f4d9a2721d..0000000000 --- a/.github/workflows/poc-configured-checks.yml +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright (c) 2026 Contributors to the Eclipse Foundation -# -# See the NOTICE file(s) distributed with this work for additional -# information regarding copyright ownership. -# -# This program and the accompanying materials are made available under the -# terms of the Apache License Version 2.0 which is available at -# https://www.apache.org/licenses/LICENSE-2.0 -# -# SPDX-License-Identifier: Apache-2.0 - -# Run this comparison manually against the experimental central workflow. -# Keeping it manual avoids replacing the module's established required checks -# before the central contract and the selected targets have been reviewed. -name: Configured checks POC - -on: - workflow_dispatch: - -permissions: - contents: read - -jobs: - checks: - # Experimental upstream branch reference for this comparison. - # A released adoption must pin the workflow and helper together. - uses: eclipse-score/cicd-workflows/.github/workflows/on-pr.yml@central-workflow - with: - workflow-config-yaml: .github/ci.yml From d2b5cfaf3b8a35d6ac902a8149dce473fe1cd1b5 Mon Sep 17 00:00:00 2001 From: Alexander Lanin Date: Thu, 5 Nov 2026 16:21:18 +0100 Subject: [PATCH 3/7] ci: use central coverage and documentation defaults --- .github/ci.yml | 26 +++++++----- .github/workflows/code_coverage.yml | 61 ----------------------------- .github/workflows/on-pr.yml | 29 +------------- 3 files changed, 17 insertions(+), 99 deletions(-) delete mode 100644 .github/workflows/code_coverage.yml diff --git a/.github/ci.yml b/.github/ci.yml index d84a375e77..2307634c59 100644 --- a/.github/ci.yml +++ b/.github/ci.yml @@ -10,31 +10,32 @@ # SPDX-License-Identifier: Apache-2.0 # The shared workflow owns the regular native and cross-compiled Linux rows. -# Sanitizers, QNX, coverage and documentation retain their dedicated jobs. +# Sanitizers, QNX and documentation verification retain their dedicated jobs. # Bazel configs select module-owned platforms and toolchains explicitly. schema-version: 2 variants: - name: linux-native - architecture: - - name: x86_64 - os: - - name: linux checks: tests: # Build the complete module graph before running all native tests. # Both commands must produce Bazel evidence for the shared gate to pass. - - test-type: unit - bazel-configs: x86_64-linux + - bazel-configs: x86_64-linux bazel-build-targets: //examples/... //score/... - bazel-test-targets: //... + + # This Bazel target owns the combined C++/Rust coverage pipeline. + # Keep its orchestration in the module while sharing setup and reports. + coverage: + bazel-target: //quality/coverage:run_coverage + coverage-threshold: 66 + workflow-config: + # release.yml downloads this name directly. + artifact-name: coverage-html - name: linux-cross architecture: - name: aarch64 - os: - - name: linux checks: builds: @@ -43,3 +44,8 @@ variants: - name: compiler bazel-configs: arm64-linux bazel-build-targets: //examples/... //score/... + +# The docs CLI needs the repository identity as well as the linked reports. +docs: + github-context: true + retention-days: 3 diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml deleted file mode 100644 index d62c5a8f03..0000000000 --- a/.github/workflows/code_coverage.yml +++ /dev/null @@ -1,61 +0,0 @@ -# ******************************************************************************* -# Copyright (c) 2026 Contributors to the Eclipse Foundation -# -# See the NOTICE file(s) distributed with this work for additional -# information regarding copyright ownership. -# -# This program and the accompanying materials are made available under the -# terms of the Apache License Version 2.0 which is available at -# https://www.apache.org/licenses/LICENSE-2.0 -# -# SPDX-License-Identifier: Apache-2.0 -# ******************************************************************************* -# -# Reusable unified LLVM source-based coverage (C++ and Rust in one report), - -name: Code coverage - -on: - workflow_call: - inputs: - coverage-threshold: - description: 'Minimum effective line coverage percentage to enforce.' - type: number - default: 66 - artifact-name: - description: 'Name of the uploaded coverage report artifact.' - type: string - default: coverage-html - retention-days: - description: 'Retention period for the uploaded coverage artifact.' - type: number - default: 10 - -jobs: - coverage: - name: Coverage - runs-on: ubuntu-24.04 - permissions: - contents: read - steps: - - name: Checkout code - uses: actions/checkout@v7 - - - name: Setup Bazel with shared caching - uses: eclipse-score/cicd-actions/setup-bazel-cache@e2a2a587a759b681632040ec1e1294015a0405f5 # setup-bazel-cache/v0.1.0 - with: - disk-cache-key: ${{ github.job }} - - - name: Generate coverage report and enforce threshold - env: - COVERAGE_THRESHOLD: ${{ inputs.coverage-threshold }} - run: | - bazel run //quality/coverage:run_coverage - - - name: Upload coverage report - if: always() - uses: actions/upload-artifact@v7 - with: - name: ${{ inputs.artifact-name }} - path: coverage_artifacts - retention-days: ${{ inputs.retention-days }} diff --git a/.github/workflows/on-pr.yml b/.github/workflows/on-pr.yml index 2ee5269384..caa0564aaa 100644 --- a/.github/workflows/on-pr.yml +++ b/.github/workflows/on-pr.yml @@ -27,7 +27,7 @@ on: jobs: common: - name: Common checks and Linux builds + name: Common checks, Linux builds, coverage and docs permissions: contents: read # Common checks and regular Linux rows share the configured central entry. @@ -111,12 +111,6 @@ jobs: command: clippy args: --all-features --all-targets --workspace -- -D warnings - coverage: - name: Coverage - uses: ./.github/workflows/code_coverage.yml - permissions: - contents: read - codeql: name: CodeQL uses: ./.github/workflows/_codeql.yml @@ -145,25 +139,6 @@ jobs: with: bazel-docs-verify-target: "--lockfile_mode=error //:docs_link_check" - docs-build: - name: Build documentation - needs: - - common - uses: eclipse-score/cicd-workflows/.github/workflows/docs.yml@8d80e8df150cae21d53cbc8031d0f970648f7a67 # v0.0.3 - permissions: - contents: read - with: - # the bazel-target depends on your repo specific docs_targets configuration (e.g. "suffix") - bazel-target: | - --lockfile_mode=error \ - //:docs \ - -- \ - --github_user=${{ github.repository_owner }} \ - --github_repo=${{ github.event.repository.name }} - retention-days: 3 - # The shared archive keeps the package tree at its root for XML linking. - tests-report-artifact: ${{ fromJSON(needs.common.outputs.configured-artifacts)['linux-native-tests-unit'].testlogs }} - gitlint: name: Check commit messages runs-on: ubuntu-24.04 @@ -188,9 +163,7 @@ jobs: - sanitizers - docs-check - docs-link-check - - docs-build - clippy - - coverage - codeql - gitlint runs-on: ubuntu-slim From 63eca90d890b095b63436e5b6d67b88a410d0193 Mon Sep 17 00:00:00 2001 From: Alexander Lanin Date: Thu, 5 Nov 2026 19:35:39 +0100 Subject: [PATCH 4/7] ci: adopt compact central workflow profiles --- .github/ci.yml | 49 ++++++++++++++++--------------------------------- 1 file changed, 16 insertions(+), 33 deletions(-) diff --git a/.github/ci.yml b/.github/ci.yml index 2307634c59..cf0b0fa327 100644 --- a/.github/ci.yml +++ b/.github/ci.yml @@ -13,39 +13,22 @@ # Sanitizers, QNX and documentation verification retain their dedicated jobs. # Bazel configs select module-owned platforms and toolchains explicitly. schema-version: 2 - -variants: - - name: linux-native - - checks: - tests: - # Build the complete module graph before running all native tests. - # Both commands must produce Bazel evidence for the shared gate to pass. - - bazel-configs: x86_64-linux - bazel-build-targets: //examples/... //score/... - - # This Bazel target owns the combined C++/Rust coverage pipeline. - # Keep its orchestration in the module while sharing setup and reports. - coverage: - bazel-target: //quality/coverage:run_coverage - coverage-threshold: 66 - workflow-config: - # release.yml downloads this name directly. - artifact-name: coverage-html - - - name: linux-cross - architecture: - - name: aarch64 - - checks: - builds: - # Cross-compilation checks the ARM toolchain without pretending that - # native unit tests have run on ARM or requiring an emulation setup. - - name: compiler - bazel-configs: arm64-linux - bazel-build-targets: //examples/... //score/... - -# The docs CLI needs the repository identity as well as the linked reports. +tests: + linux-native: + bazel-configs: x86_64-linux + bazel-build-targets: //examples/... //score/... +# This module target owns the combined C++/Rust coverage pipeline. +coverage: + bazel-target: //quality/coverage:run_coverage + coverage-threshold: 66 + # release.yml downloads this artifact by name. + artifact-name: coverage-html +builds: + linux-cross: + name: compiler + bazel-configs: arm64-linux + bazel-build-targets: //examples/... //score/... + architecture: aarch64 docs: github-context: true retention-days: 3 From 3df97c2949ac78678a08345971150059bad3f74b Mon Sep 17 00:00:00 2001 From: Alexander Lanin Date: Thu, 5 Nov 2026 20:47:59 +0100 Subject: [PATCH 5/7] ci: migrate remaining Lifecycle checks to central profiles --- .github/actions/gitlint/action.yml | 44 --------- .github/ci.yml | 25 +++++- .github/workflows/_codeql.yml | 99 +++----------------- .github/workflows/on-pr.yml | 139 ++--------------------------- 4 files changed, 39 insertions(+), 268 deletions(-) delete mode 100644 .github/actions/gitlint/action.yml diff --git a/.github/actions/gitlint/action.yml b/.github/actions/gitlint/action.yml deleted file mode 100644 index cb16e6ff02..0000000000 --- a/.github/actions/gitlint/action.yml +++ /dev/null @@ -1,44 +0,0 @@ -# ******************************************************************************* -# Copyright (c) 2024 Contributors to the Eclipse Foundation -# -# See the NOTICE file(s) distributed with this work for additional -# information regarding copyright ownership. -# -# This program and the accompanying materials are made available under the -# terms of the Apache License Version 2.0 which is available at -# https://www.apache.org/licenses/LICENSE-2.0 -# -# SPDX-License-Identifier: Apache-2.0 -# ******************************************************************************* - -name: "Gitlint Action" -description: "An action to install and run Gitlint on PR commits" -inputs: - pr-number: - description: "Pull Request number used to fetch commits" - required: true - base-branch: - description: "Base branch to compare commits against (default: origin/main)" - default: "origin/main" - required: false -runs: - using: "docker" - image: "jorisroovers/gitlint:0.19.1" - entrypoint: /bin/sh - args: - - -c - - | - git config --global --add safe.directory /github/workspace && \ - git fetch origin +refs/heads/main:refs/remotes/origin/main && \ - git fetch origin +refs/pull/${{ inputs.pr-number }}/head && \ - # Fetch the upstream .gitlint config from eclipse-score/score - git clone --depth 1 https://github.com/eclipse-score/score.git /tmp/score-gitlint && \ - if ! gitlint --config /tmp/score-gitlint/.gitlint --commits origin/main..HEAD; then \ - echo -e "\nWARNING: Your commit message does not follow the required format." && \ - echo "Formatting rules: https://eclipse-score.github.io/score/main/contribute/general/git.html#commit-message-format" && \ - echo -e "To fix your commit message, run:\n" && \ - echo " git commit --amend" && \ - echo "Then update your commit (fix gitlint warnings). Finally, force-push:" && \ - echo " git push --force-with-lease" && \ - exit 1; \ - fi diff --git a/.github/ci.yml b/.github/ci.yml index cf0b0fa327..c094360ad9 100644 --- a/.github/ci.yml +++ b/.github/ci.yml @@ -9,14 +9,23 @@ # # SPDX-License-Identifier: Apache-2.0 -# The shared workflow owns the regular native and cross-compiled Linux rows. -# Sanitizers, QNX and documentation verification retain their dedicated jobs. +# The shared workflow owns Linux execution, quality checks and documentation. +# QNX retains its separate credential and pull_request_target boundary. # Bazel configs select module-owned platforms and toolchains explicitly. schema-version: 2 tests: linux-native: bazel-configs: x86_64-linux bazel-build-targets: //examples/... //score/... + # Test-only: all-target builds currently hit these module issues. + # https://github.com/eclipse-score/lifecycle/issues/476 + asan-ubsan-lsan: + test-type: sanitizer + bazel-configs: x86_64-linux,asan_ubsan_lsan + # https://github.com/eclipse-score/lifecycle/issues/474 + tsan: + test-type: sanitizer + bazel-configs: x86_64-linux,tsan # This module target owns the combined C++/Rust coverage pipeline. coverage: bazel-target: //quality/coverage:run_coverage @@ -29,6 +38,14 @@ builds: bazel-configs: arm64-linux bazel-build-targets: //examples/... //score/... architecture: aarch64 +# Cargo's toolchain version comes from rust-toolchain.toml. +clippy: {} +gitlint: true +codeql: + bazel-configs: x86_64-linux + # Explicit module analysis policy; shared execution and SARIF merging. + reports: [cert-cpp-l1, cert-c-l1, cpp-code-scanning, code-complexity] + fail-on-findings: true docs: - github-context: true - retention-days: 3 + check: true + link-check: true diff --git a/.github/workflows/_codeql.yml b/.github/workflows/_codeql.yml index 3c6da128b1..9c3f8c5de1 100644 --- a/.github/workflows/_codeql.yml +++ b/.github/workflows/_codeql.yml @@ -28,96 +28,19 @@ on: type: string default: "false" +# Keep scheduled/manual analysis independent of the PR workflow. Execution and +# analysis policy are shared with the CodeQL profile in .github/ci.yml. jobs: codeql-linux: - name: Run CodeQL analysis (Linux) - runs-on: ubuntu-24.04 + name: CodeQL permissions: contents: read - actions: write + actions: read security-events: write - steps: - - uses: actions/checkout@v7 - - - name: Setup Bazel with shared caching - uses: eclipse-score/cicd-actions/setup-bazel-cache@cache - with: - disk-cache-key: ${{ github.job }}-codeql - enable-profiling: false - - - name: Fetch dependencies (--nobuild) - if: inputs.fetch-only == 'true' - run: bazel build --config=x86_64-linux --nobuild //... - - - name: Run CodeQL analysis (Linux) - if: inputs.fetch-only != 'true' - id: run-codeql - run: | - set -euo pipefail - - # As a first step, we only active the non-misra ruleset - bazel run --config=x86_64-linux //quality/static_analysis:codeql_lint -- \ - --output-dir /tmp/codeql-results/linux \ - --output-prefix codeql-nightly \ - --report cert-cpp-l1 cert-c-l1 cpp-code-scanning code-complexity \ - --target $(bazel query 'kind("cc_library|cc_binary", //score/...)') - - - name: Deduplicate and upload SARIF - if: ${{ !cancelled() && inputs.fetch-only != 'true' && steps.run-codeql.outcome == 'success' }} - id: merge-codeql - env: - GH_TOKEN: ${{ github.token }} - run: | - set -euo pipefail - - mkdir -p /tmp/codeql-results/publish - - # Deduplicate SARIF results using the SARIF Multitool - bazel run --config=x86_64-linux @sarif_multitool//:sarif_multitool_cli -- \ - merge /tmp/codeql-results/linux/codeql-nightly.sarif \ - --merge-empty-logs \ - --output-file /tmp/codeql-results/publish/codeql-nightly.sarif - - - name: Upload SARIF to GitHub Code Scanning - if: ${{ !cancelled() && steps.merge-codeql.outcome == 'success' }} - continue-on-error: true - uses: github/codeql-action/upload-sarif@v4 - with: - sarif_file: /tmp/codeql-results/publish/codeql-nightly.sarif - category: codeql-nightly - - - name: Upload SARIF results - if: ${{ !cancelled() && steps.merge-codeql.outcome == 'success' }} - uses: actions/upload-artifact@v7 - with: - name: codeql-sarif-results - path: /tmp/codeql-results/publish/codeql-nightly.sarif - retention-days: 30 - - - name: Fail on unsuppressed findings - if: ${{ !cancelled() && inputs.fail-on-findings == 'true' && steps.merge-codeql.outcome == 'success' }} - run: | - set -euo pipefail - - # A finding counts as suppressed if it carries any SARIF suppression - # (e.g. in-source `// codeql[...]` comments). - jq -r ' - [.runs[].results[]? | select((.suppressions // []) | length == 0)] - | .[] - | "\(.ruleId // "unknown-rule"): \(.message.text // "") (\(.locations[0].physicalLocation.artifactLocation.uri // "?"):\(.locations[0].physicalLocation.region.startLine // "?"))" - ' /tmp/codeql-results/publish/codeql-nightly.sarif | tee /tmp/codeql-results/unsuppressed.txt - - count=$(wc -l < /tmp/codeql-results/unsuppressed.txt) - if [ "${count}" -gt 0 ]; then - echo "::error::CodeQL reported ${count} finding(s) without a suppression." - exit 1 - fi - - - name: Upload compliance reports - if: ${{ !cancelled() && inputs.fetch-only != 'true' }} - uses: actions/upload-artifact@v7 - with: - name: codeql-compliance-reports - path: /tmp/codeql-results/linux/analysis_reports/ - retention-days: 30 - if-no-files-found: warn + uses: eclipse-score/cicd-workflows/.github/workflows/configured-quality.yml@central-workflow + with: + config: .github/ci.yml + only-codeql: true + fetch-only: ${{ inputs.fetch-only == 'true' }} + # Nightly analysis historically reports findings without failing. + fail-on-findings: ${{ inputs.fail-on-findings || 'false' }} diff --git a/.github/workflows/on-pr.yml b/.github/workflows/on-pr.yml index caa0564aaa..f4742a2ab1 100644 --- a/.github/workflows/on-pr.yml +++ b/.github/workflows/on-pr.yml @@ -27,149 +27,24 @@ on: jobs: common: - name: Common checks, Linux builds, coverage and docs + name: Central CI permissions: contents: read - # Common checks and regular Linux rows share the configured central entry. + # Only SARIF publication uses these grants; checks run read-only. + actions: read + security-events: write + # Module policy and check selection live in ci.yml. uses: eclipse-score/cicd-workflows/.github/workflows/on-pr.yml@central-workflow with: workflow-config-yaml: .github/ci.yml - # Sanitizers have test-only target selection because compiling every target - # hits the module issues referenced below. Keep that policy visible here. - sanitizers: - name: Sanitizer / ${{ matrix.name }} - runs-on: ubuntu-24.04 - strategy: - fail-fast: false - matrix: - include: - - name: asan_ubsan_lsan - bazel-args: --config=x86_64-linux --config=asan_ubsan_lsan - # https://github.com/eclipse-score/lifecycle/issues/476 - - name: tsan - bazel-args: --config=x86_64-linux --config=tsan - # https://github.com/eclipse-score/lifecycle/issues/474 - permissions: - contents: read - steps: - - name: Checkout code - uses: actions/checkout@v7 - - - name: Setup Bazel with shared caching - uses: eclipse-score/cicd-actions/setup-bazel-cache@e2a2a587a759b681632040ec1e1294015a0405f5 # setup-bazel-cache/v0.1.0 - with: - disk-cache-key: ${{ github.job }}-${{ matrix.name }} - - - name: Test with Bazel - run: | - bazel test \ - --lockfile_mode=error \ - ${{ matrix.bazel-args }} \ - //... - - - name: Upload test logs - if: always() - uses: actions/upload-artifact@v7 - with: - name: bazel-testlogs-${{ matrix.name }} - path: bazel-testlogs/ - retention-days: 7 - - clippy: - name: Clippy - runs-on: ubuntu-24.04 - permissions: - contents: read - steps: - - uses: actions/checkout@v7 - with: - fetch-depth: 0 - - - name: Cache Cargo registry, git deps & target - uses: actions/cache@v6 - with: - path: | - ~/.cargo/registry - ~/.cargo/git - target - key: ${{ runner.os }}-cargo-lint-clippy-${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - ${{ runner.os }}-cargo-lint-clippy- - - - name: Install Rust toolchain - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: 1.90.0 - override: true - components: clippy - - - name: check clippy errors - uses: actions-rs/cargo@v1 - with: - command: clippy - args: --all-features --all-targets --workspace -- -D warnings - - codeql: - name: CodeQL - uses: ./.github/workflows/_codeql.yml - permissions: - contents: read - actions: write - security-events: write - with: - fail-on-findings: "true" - - docs-check: - name: Check documentation - uses: eclipse-score/cicd-workflows/.github/workflows/docs-verify.yml@8d80e8df150cae21d53cbc8031d0f970648f7a67 # v0.0.3 - permissions: - pull-requests: write - contents: read - with: - bazel-docs-verify-target: "--lockfile_mode=error //:docs_check" - - docs-link-check: - name: Check links in documentation - uses: eclipse-score/cicd-workflows/.github/workflows/docs-verify.yml@8d80e8df150cae21d53cbc8031d0f970648f7a67 # v0.0.3 - permissions: - pull-requests: write - contents: read - with: - bazel-docs-verify-target: "--lockfile_mode=error //:docs_link_check" - - gitlint: - name: Check commit messages - runs-on: ubuntu-24.04 - if: ${{ github.event_name == 'pull_request' }} - permissions: - contents: read - steps: - - name: Checkout code - uses: actions/checkout@v7 - with: - fetch-depth: 0 - - name: Run Gitlint Action - uses: ./.github/actions/gitlint - with: - pr-number: ${{ github.event.number }} - base-branch: ${{ github.event.pull_request.base.ref }} - ready: name: Ready to merge - needs: - - common - - sanitizers - - docs-check - - docs-link-check - - clippy - - codeql - - gitlint + needs: common runs-on: ubuntu-slim permissions: {} if: ${{ !cancelled() && (github.event_name == 'pull_request' || github.event_name == 'merge_group') }} steps: - name: Fail if any required job did not succeed - if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') + if: needs.common.result != 'success' run: false From 54e545b1bf72387664b46a134974c80ca6c7a353 Mon Sep 17 00:00:00 2001 From: Alexander Lanin Date: Thu, 5 Nov 2026 23:05:55 +0100 Subject: [PATCH 6/7] Select Docs reports explicitly without test categories --- .github/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/ci.yml b/.github/ci.yml index c094360ad9..29639f70e3 100644 --- a/.github/ci.yml +++ b/.github/ci.yml @@ -20,11 +20,9 @@ tests: # Test-only: all-target builds currently hit these module issues. # https://github.com/eclipse-score/lifecycle/issues/476 asan-ubsan-lsan: - test-type: sanitizer bazel-configs: x86_64-linux,asan_ubsan_lsan # https://github.com/eclipse-score/lifecycle/issues/474 tsan: - test-type: sanitizer bazel-configs: x86_64-linux,tsan # This module target owns the combined C++/Rust coverage pipeline. coverage: @@ -47,5 +45,6 @@ codeql: reports: [cert-cpp-l1, cert-c-l1, cpp-code-scanning, code-complexity] fail-on-findings: true docs: + tests: linux-native-tests check: true link-check: true From ebc02b83e5d367cca982f7d49c429cc45016d9a0 Mon Sep 17 00:00:00 2001 From: Alexander Lanin Date: Fri, 6 Nov 2026 16:26:38 +0100 Subject: [PATCH 7/7] Explain central CI configuration for module maintainers --- .github/ci.yml | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/.github/ci.yml b/.github/ci.yml index 29639f70e3..876e50a45d 100644 --- a/.github/ci.yml +++ b/.github/ci.yml @@ -9,15 +9,21 @@ # # SPDX-License-Identifier: Apache-2.0 -# The shared workflow owns Linux execution, quality checks and documentation. -# QNX retains its separate credential and pull_request_target boundary. -# Bazel configs select module-owned platforms and toolchains explicitly. +# Select this module's Linux checks, quality policy and Docs in this file. +# Each named build/test profile runs independently with reports collected centrally. +# Profiles default to Linux x86_64, the repository root and test target `//...`. +# Maintain Bazel configs and target selections here; shared CI handles execution. +# QNX remains in its separate workflow and credential boundary. +# Configuration reference: https://github.com/eclipse-score/cicd-workflows/blob/central-workflow/.github/workflows/on-pr.md schema-version: 2 tests: + # Build the selected examples/libraries first, then test the full workspace. linux-native: bazel-configs: x86_64-linux bazel-build-targets: //examples/... //score/... - # Test-only: all-target builds currently hit these module issues. + # Sanitizers are enabled by the Bazel configs, independently of profile names. + # These profiles test //... without a preceding all-target build because of + # the module issues linked below. # https://github.com/eclipse-score/lifecycle/issues/476 asan-ubsan-lsan: bazel-configs: x86_64-linux,asan_ubsan_lsan @@ -25,25 +31,35 @@ tests: tsan: bazel-configs: x86_64-linux,tsan # This module target owns the combined C++/Rust coverage pipeline. +# Shared CI runs it with COVERAGE_THRESHOLD=66 and collects coverage_artifacts +# for the HTML artifact and Docs; maintain language-specific coverage logic here. coverage: bazel-target: //quality/coverage:run_coverage coverage-threshold: 66 # release.yml downloads this artifact by name. artifact-name: coverage-html +# Compile the selected targets for ARM without trying to execute ARM tests. builds: linux-cross: name: compiler bazel-configs: arm64-linux bazel-build-targets: //examples/... //score/... architecture: aarch64 -# Cargo's toolchain version comes from rust-toolchain.toml. +# Enable the shared Cargo Clippy check with the version in rust-toolchain.toml. +# An empty mapping enables the check with standard settings. clippy: {} +# Check PR commit messages using the repository Gitlint policy. gitlint: true +# Run the module's CodeQL Bazel analysis and publish the selected reports. +# Unsuppressed findings fail CI; adjust the report list as analysis policy evolves. codeql: bazel-configs: x86_64-linux - # Explicit module analysis policy; shared execution and SARIF merging. reports: [cert-cpp-l1, cert-c-l1, cpp-code-scanning, code-complexity] fail-on-findings: true +# Build //:docs with coverage and the explicitly selected native test reports. +# The explicit selection avoids mixing sanitizer results into the regular report. +# Also run //:docs_check and //:docs_link_check before the final Docs build. +# The existing publishing workflow deploys the finished github-pages artifact. docs: tests: linux-native-tests check: true