This repository was archived by the owner on Aug 12, 2026. It is now read-only.
chore(release): release v1.0.0 #295
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| name: CodeCov | |
| "on": | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| codecov: | |
| name: CodeCov | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write # Intentionally required for Codecov's OIDC upload. | |
| env: | |
| VCPKG_BINARY_SOURCES: clear;files,${{ github.workspace }}/.cache/vcpkg-binary-cache,readwrite | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Set up Just | |
| uses: ./.github/actions/setup-just | |
| - name: Resolve coverage tool versions | |
| id: tool-versions | |
| run: | | |
| cmake="$(just --evaluate cmake_version)" | |
| gcc="$(just --evaluate gcc_version)" | |
| lcov="$(just --evaluate lcov_version)" | |
| lcov_sha256="$(just --evaluate lcov_sha256)" | |
| ninja="$(just --evaluate ninja_version)" | |
| printf '%s\n' \ | |
| "cmake=${cmake}" \ | |
| "gcc=${gcc}" \ | |
| "lcov=${lcov}" \ | |
| "lcov_sha256=${lcov_sha256}" \ | |
| "ninja=${ninja}" >> "$GITHUB_OUTPUT" | |
| - name: Setup | |
| run: | | |
| sudo apt update | |
| sudo apt-get install --yes \ | |
| automake autoconf autoconf-archive build-essential ccache \ | |
| curl lcov libtool-bin ninja-build python3-sphinx \ | |
| python3-sphinx-rtd-theme texinfo yasm | |
| - name: Install pinned LCOV | |
| env: | |
| LCOV_SHA256: ${{ steps.tool-versions.outputs.lcov_sha256 }} | |
| LCOV_VERSION: ${{ steps.tool-versions.outputs.lcov }} | |
| run: | | |
| archive="${RUNNER_TEMP}/lcov-${LCOV_VERSION}.tar.gz" | |
| source_dir="${RUNNER_TEMP}/lcov-${LCOV_VERSION}" | |
| curl --fail --location --show-error \ | |
| --output "${archive}" \ | |
| "https://github.com/linux-test-project/lcov/releases/download/v${LCOV_VERSION}/lcov-${LCOV_VERSION}.tar.gz" | |
| echo "${LCOV_SHA256} ${archive}" | sha256sum --check - | |
| tar --extract --gzip --file "${archive}" --directory "${RUNNER_TEMP}" | |
| sudo make --directory "${source_dir}" install | |
| lcov --version | |
| - name: Set up coverage toolchain | |
| uses: pkgxdev/setup@4d4ae97af87ccb39ab8be4e073dea697fef2c6f7 # v5.0.0 | |
| with: | |
| +: >- | |
| gnu.org/gcc@${{ steps.tool-versions.outputs.gcc }} | |
| cmake.org@${{ steps.tool-versions.outputs.cmake }} | |
| ninja-build.org@${{ steps.tool-versions.outputs.ninja }} | |
| - name: Resolve pkgx certificate bundle | |
| shell: bash | |
| run: | | |
| ssl_cert_file="$( | |
| env -u SSL_CERT_FILE pkgx +curl.se/ca-certs env | | |
| sed -n 's/^SSL_CERT_FILE=//p' | |
| )" | |
| if [[ -z "$ssl_cert_file" || ! -r "$ssl_cert_file" ]]; then | |
| echo "pkgx CA bundle is missing or unreadable: $ssl_cert_file" >&2 | |
| exit 1 | |
| fi | |
| echo "SSL_CERT_FILE=$ssl_cert_file" >> "$GITHUB_ENV" | |
| - name: Report coverage toolchain | |
| run: | | |
| cmake --version | |
| ninja --version | |
| gcc --version | |
| - name: Set up cached vcpkg | |
| uses: ./.github/actions/setup-vcpkg | |
| with: | |
| cache-key: gcc-${{ steps.tool-versions.outputs.gcc }} | |
| - name: Generate coverage reports | |
| env: | |
| COVERAGE_JOBS: 2 | |
| CXX: g++ | |
| GCOV: gcov | |
| run: just coverage | |
| - name: Validate coverage reports | |
| run: | | |
| if [[ ! -s build/coverage.info ]]; then | |
| echo "build/coverage.info is missing or empty." >&2 | |
| exit 1 | |
| fi | |
| if [[ ! -d build/coverage-html ]] || | |
| [[ -z "$(find build/coverage-html -type f -size +0c -print -quit)" ]]; then | |
| echo "build/coverage-html is missing or empty." >&2 | |
| exit 1 | |
| fi | |
| - name: Preserve coverage reports | |
| if: ${{ always() }} | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| if-no-files-found: error | |
| name: coverage-report-${{ github.sha }} | |
| path: | | |
| build/coverage.info | |
| build/coverage-html | |
| retention-days: 14 | |
| - name: Preserve gcov inputs after generation failure | |
| if: ${{ failure() }} | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| if-no-files-found: warn | |
| name: coverage-inputs-${{ github.sha }} | |
| path: | | |
| build/coverage/**/*.gcda | |
| build/coverage/**/*.gcno | |
| build/coverage/Testing/Temporary/CTestCostData.txt | |
| build/coverage/Testing/Temporary/LastTest.log | |
| retention-days: 7 | |
| - name: Submit to codecov.io | |
| uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 | |
| with: | |
| disable_search: true | |
| fail_ci_if_error: true | |
| files: build/coverage.info | |
| plugins: noop | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| use_oidc: ${{ github.actor != 'dependabot[bot]' }} | |
| verbose: true |