Skip to content

eBPF-based security platform

ci: stop sending a coverage report to Coveralls

Martynas Pumputis2b760199084f
diff --git a/.github/scripts/coverage.sh b/.github/scripts/coverage.sh
index 6bb376fe..92ea7268 100755
--- a/.github/scripts/coverage.sh
+++ b/.github/scripts/coverage.sh
@@ -7,36 +7,12 @@
# and, where the test VMs ran, of the target in each guest.
#
# .github/scripts/coverage.sh [--sudo-container]
-# .github/scripts/coverage.sh merge-ci
set -eu
cd "$(dirname "$0")/../.."
mkdir -p coverage
-merge_ci() {
- set --
- for suite in unit functional-ci-1 functional-ci-2 functional-ci-3 functional-ci-4 end2end; do
- trace="coverage/shards/coverage-$suite/shirudo.lcov"
- [ -s "$trace" ] || {
- echo "coverage.sh: missing or empty tracefile: $trace" >&2
- exit 1
- }
- set -- "$@" --add-tracefile "$trace"
- done
-
- if ! command -v lcov >/dev/null; then
- sudo apt-get update
- sudo apt-get install -y --no-install-recommends lcov
- fi
- lcov --ignore-errors inconsistent "$@" --output-file coverage/shirudo.lcov
-}
-
-if [ "${1:-}" = merge-ci ]; then
- merge_ci
- exit 0
-fi
-
capture() {
suffix=$1
shift
diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml
deleted file mode 100644
index 74e17f3b..00000000
--- a/.github/workflows/coverage.yml
+++ /dev/null
@@ -1,131 +0,0 @@
-name: Coverage
-
-# An instrumented build is not the one that ships, and a coverage figure
-# that moves with the runner is no gate for a pull request: the report
-# is made from what lands on main, as
-# Documentation/contribute/testing/testing.rst says.
-on:
- push:
- branches:
- - main
- workflow_dispatch:
- inputs:
- kernel_run_id:
- description: Optional override; defaults to the run testing/vm/kernel-artifact.sh pins
- required: false
- type: string
-
-permissions:
- contents: read
- actions: read
-
-# A push while a report is made queues its run behind it rather than
-# cancelling it: pushes closer together than a run takes would leave
-# main without a finished one. GitHub keeps only the newest run waiting.
-concurrency:
- group: ${{ github.workflow }}-${{ github.ref }}
- cancel-in-progress: false
-
-jobs:
- coverage:
- name: Coverage (${{ matrix.suite }})
- runs-on: ubuntu-latest
- timeout-minutes: 180
- strategy:
- fail-fast: false
- matrix:
- suite: [unit, functional-ci-1, functional-ci-2, functional-ci-3, functional-ci-4, end2end]
- env:
- VM: ${{ matrix.suite == 'unit' && '0' || '1' }}
- COVERAGE: '1'
-
- steps:
- - name: Check out repository
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
-
- - name: Download the pinned or selected kernel
- env:
- GH_TOKEN: ${{ github.token }}
- KERNEL_RUN_ID: ${{ inputs.kernel_run_id }}
- TEST_VM_ARCH: x86_64
- run: testing/vm/kernel-artifact.sh download
-
- # The caches are those of the CI suite, which saves them: this
- # workflow only reads them.
- - name: Restore the static target dependencies
- if: matrix.suite != 'unit'
- uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
- with:
- path: build/target-deps
- key: target-deps-${{ hashFiles('Makefile.target-deps') }}
-
- - name: Restore the host OpenSSL toolchain
- uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
- with:
- path: build/host-openssl
- key: host-openssl-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('.github/scripts/vm-toolchain.sh') }}
-
- - name: Restore the host libtpms toolchain
- uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
- with:
- path: build/host-libtpms
- key: host-libtpms-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('.github/scripts/vm-toolchain.sh', '.github/scripts/install-libtpms.sh') }}
-
- - name: Restore the VM images
- if: matrix.suite != 'unit'
- uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
- with:
- path: build/test-vm/cache
- key: test-vm-runtime-and-operator-${{ hashFiles('testing/vm/runtime-packages', 'testing/vm/operator-packages', 'testing/vm/prepare-runtime.sh', 'testing/vm/build-bundle.sh', 'testing/vm/arch.sh', '.github/scripts/install-clang.sh', '.github/scripts/install-static-libcrypto-deps.sh', 'testing/container/Containerfile', 'testing/container/packages', 'Makefile.target-deps') }}
-
- - name: Prepare the test environment
- id: setup
- env:
- KERNEL_CI_ARTIFACT_DIR: ${{ format('{0}/build/kernel-ci-artifact', github.workspace) }}
- run: .github/scripts/tests.sh setup
-
- - name: Run selected test suite
- env:
- TEST_SUITE: ${{ matrix.suite }}
- SHIRUDO_SKIP_TREE_CHECKS: ${{ github.event_name == 'push' && '1' || '0' }}
- run: .github/scripts/tests.sh run "$TEST_SUITE"
-
- # A failing test still leaves counters for the tests that ran.
- - name: Collect the counters of the host and the guests
- id: collect
- if: ${{ !cancelled() && steps.setup.outcome == 'success' }}
- run: .github/scripts/coverage.sh --sudo-container
-
- - name: Upload the shard tracefile
- if: ${{ !cancelled() && steps.collect.outcome == 'success' }}
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
- with:
- name: coverage-${{ matrix.suite }}
- path: coverage/shirudo.lcov
- if-no-files-found: error
- overwrite: true
-
- report:
- name: Report coverage
- needs: coverage
- if: ${{ !cancelled() }}
- runs-on: ubuntu-latest
- timeout-minutes: 10
- steps:
- - name: Check out repository
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
-
- - name: Download the shard tracefiles
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
- with:
- pattern: coverage-*
- path: coverage/shards
-
- - name: Merge the shard tracefiles
- run: .github/scripts/coverage.sh merge-ci
-
- - name: Upload coverage to Coveralls
- uses: coverallsapp/github-action@8d6379e14d29928660c4ba802d8e85393440b329 # v2.3.8
- with:
- file: coverage/shirudo.lcov
- format: lcov
diff --git a/.github/workflows/main-status.yml b/.github/workflows/main-status.yml
index ac6ff231..81f1d708 100644
--- a/.github/workflows/main-status.yml
+++ b/.github/workflows/main-status.yml
@@ -12,7 +12,6 @@ on:
- Build packages
- CI suite
- CodeQL
- - Coverage
- Coverity
- DCO
- Documentation
diff --git a/Documentation/contribute/testing/testing.rst b/Documentation/contribute/testing/testing.rst
index cd2fbf28..a9546ec1 100644
--- a/Documentation/contribute/testing/testing.rst
+++ b/Documentation/contribute/testing/testing.rst
@@ -69,8 +69,8 @@ pull request and on every push to ``main``. In the merge queue their jobs
pass without running. The riscv64 build runs on pushes to ``main`` alone.
On pull requests and pushes to ``main``, Lint runs the full-tree Coccinelle
-and unused-function checks. The CI suite, coverage, and sanitizer jobs still
-run the self-tests for both scripts. Local, manually dispatched, and sanitizer
+and unused-function checks. The CI suite and sanitizer jobs still run the
+self-tests for both scripts. Local, manually dispatched, and sanitizer
tag runs also scan the full tree as part of ``ci-checks``.
The ``CI suite`` workflow uses the x86-64 CI kernel package.
@@ -124,17 +124,9 @@ and waits until the displayed retry time before sending more requests.
Coverage
--------
-The ``Coverage`` workflow, :src:`.github/workflows/coverage.yml`, runs after
-a push to main, never on a pull request: the ``CI suite`` tests the binaries
-as they ship, and no pull request waits on a coverage figure. It builds the
-userspace C code with coverage instrumentation, the host's binaries and the
-target the test VMs boot, and runs unit tests, four functional shards and
-end-to-end tests in parallel. It merges the six tracefiles and sends one
-LCOV report to Coveralls. A test failure still allows the report to be
-sent if every job produced a tracefile.
-
-Start the workflow by hand on a branch for the figure of a change before it
-lands, or make the report on a host with ``lcov``, from a clean checkout:
+CI makes no coverage report: the ``CI suite`` tests the binaries as they
+ship, without instrumentation. Make the report on a host with ``lcov``,
+from a clean checkout:
.. code-block:: console
diff --git a/README.md b/README.md
index 75f85a9c..2954986f 100644
--- a/README.md
+++ b/README.md
@@ -127,7 +127,6 @@ Every package comes with a Software Bill of Materials (SBOM) in
[![Proofs](https://github.com/shirudo-dev/shirudo/actions/workflows/proofs.yml/badge.svg?branch=main)](https://github.com/shirudo-dev/shirudo/actions/workflows/proofs.yml)
[![CodeQL](https://github.com/shirudo-dev/shirudo/actions/workflows/codeql.yml/badge.svg?branch=main)](https://github.com/shirudo-dev/shirudo/actions/workflows/codeql.yml)
[![Documentation](https://github.com/shirudo-dev/shirudo/actions/workflows/docs.yml/badge.svg?branch=main)](https://github.com/shirudo-dev/shirudo/actions/workflows/docs.yml)<br/>
-[![Coverage Status](https://coveralls.io/repos/github/shirudo-dev/shirudo/badge.svg?branch=main)](https://coveralls.io/github/shirudo-dev/shirudo?branch=main)
[![Coverity Scan Build Status](https://scan.coverity.com/projects/33401/badge.svg)](https://scan.coverity.com/projects/shirudo-dev-shirudo)
[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/17035/badge)](https://www.bestpractices.dev/projects/17035)
[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/shirudo-dev/shirudo/badge)](https://scorecard.dev/viewer/?uri=github.com/shirudo-dev/shirudo)