Skip to content

[runtime] append page-size shrink crash safety fix #28072

[runtime] append page-size shrink crash safety fix

[runtime] append page-size shrink crash safety fix #28072

Workflow file for this run

name: Coverage
on:
push:
branches: [ "main" ]
pull_request:
merge_group:
permissions:
contents: read
concurrency:
group: coverage-${{ github.head_ref || github.ref_name || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
env:
CARGO_TERM_COLOR: always
NIGHTLY_VERSION: nightly
jobs:
Coverage:
name: "Coverage (flags: \"${{ matrix.flags }}\") (partition: ${{ matrix.partition }}/8)"
runs-on: ubuntu-latest
timeout-minutes: 90
strategy:
matrix:
partition: [1, 2, 3, 4, 5, 6, 7, 8]
flags:
- "--features commonware-runtime/iouring-storage"
- "--features commonware-runtime/iouring-network"
- "--no-default-features"
- ""
steps:
- name: Checkout repository
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
- name: Run setup
uses: ./.github/actions/setup
with:
additional-toolchain: ${{ env.NIGHTLY_VERSION }}
additional-cache-key: ${{ matrix.flags || 'default' }}-part-${{ matrix.partition }}
- name: Remove fuzz
run: |
rm -rf broadcast/fuzz
rm -rf codec/fuzz
rm -rf coding/fuzz
rm -rf collector/fuzz
rm -rf consensus/fuzz
rm -rf cryptography/fuzz
rm -rf p2p/fuzz
rm -rf runtime/fuzz
rm -rf storage/fuzz
rm -rf stream/fuzz
rm -rf utils/fuzz
- name: Remove fuzz targets from Cargo.toml
run: |
sed -i.bak '/fuzz/d' Cargo.toml
- name: Install coverage tooling
uses: taiki-e/install-action@0c5db7f7f897c03b771660e91d065338615679f4 # v2.60.0
with:
tool: cargo-llvm-cov@0.8.4,cargo-nextest@0.9.133
- name: Normalize flags for paths
id: path-normalization
run: |
name="${{ matrix.flags }}"
name="${name// /-}"
name="${name//\//-}"
echo "flags=${name:-default}" >> "$GITHUB_OUTPUT"
- name: Generate coverage report
run: cargo +${{ env.NIGHTLY_VERSION }} llvm-cov nextest --branch --workspace ${{ matrix.flags }} --lcov --output-path lcov-${{ steps.path-normalization.outputs.flags }}-${{ matrix.partition }}.info --partition hash:${{ matrix.partition }}/8 --profile all
- name: Store coverage report
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: coverage-lcov-${{ steps.path-normalization.outputs.flags }}-${{ matrix.partition }}
path: lcov-${{ steps.path-normalization.outputs.flags }}-${{ matrix.partition }}.info
retention-days: 1
Upload:
name: Upload
runs-on: ubuntu-latest
needs: Coverage
steps:
- name: Checkout repository
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
- name: Download coverage reports
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
with:
pattern: coverage-lcov-*
merge-multiple: true
- name: Upload to Codecov
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
with:
files: lcov-*.info
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}