Skip to content

Fix resolve_to_key in message pool to be reorg stable #4546

Fix resolve_to_key in message pool to be reorg stable

Fix resolve_to_key in message pool to be reorg stable #4546

Workflow file for this run

name: Code coverage
permissions:
contents: read
# Cancel workflow if there is a new change to the branch.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
on:
workflow_dispatch:
merge_group:
pull_request:
branches:
- main
# This needs to be declared explicitly so that the job is actually
# run when moved out of draft.
types: [opened, synchronize, reopened, ready_for_review]
push:
branches:
- main
env:
CI: 1
CACHE_TIMEOUT_MINUTES: 5
AWS_ACCESS_KEY_ID: "${{ secrets.AWS_ACCESS_KEY_ID }}"
AWS_SECRET_ACCESS_KEY: "${{ secrets.AWS_SECRET_ACCESS_KEY }}"
RUSTC_WRAPPER: "sccache"
CC: clang
CXX: clang++
# To minimize compile times: https://nnethercote.github.io/perf-book/build-configuration.html#minimizing-compile-times
RUSTFLAGS: "-C linker=clang -C link-arg=-fuse-ld=lld"
FOREST_F3_SIDECAR_FFI_BUILD_OPT_OUT: 1
FIL_PROOFS_PARAMETER_CACHE: /var/tmp/filecoin-proof-parameters
RUST_LOG: error
FOREST_ACTOR_BUNDLE_PATH: /var/tmp/forest_actor_bundle.car.zst
# https://github.com/BurntSushi/quickcheck/blob/692527d1d9fc9043a70b7d2bf436902e2d0f595b/src/tester.rs#L20
QUICKCHECK_GENERATOR_SIZE: 20
QUICKCHECK_TESTS: 20
QUICKCHECK_MAX_TESTS: 1000
jobs:
path-filter:
runs-on: ubuntu-slim
outputs:
codeChange: ${{ steps.filter.outputs.codeChange }}
workflowChange: ${{ steps.filter.outputs.workflowChange }}
steps:
- uses: actions/checkout@v6
- uses: dorny/paths-filter@v4
id: filter
with:
predicate-quantifier: every
filters: |
codeChange:
- '**'
- '!docs/**'
- '!**.md'
- '!.github/workflows/*.yml'
workflowChange:
- '.github/workflows/coverage.yml'
codecov:
name: Coverage
needs:
- path-filter
if: ${{ github.event.pull_request.draft == false && (needs.path-filter.outputs.codeChange == 'true' || needs.path-filter.outputs.workflowChange == 'true') }}
runs-on: warp-ubuntu-2404-arm64-8x
timeout-minutes: 30
steps:
- name: Configure SCCache variables
run: |
# External PRs do not have access to 'vars' or 'secrets'.
if [[ "${{secrets.AWS_ACCESS_KEY_ID}}" != "" ]]; then
{
echo "SCCACHE_ENDPOINT=${{ vars.SCCACHE_ENDPOINT}}"
echo "SCCACHE_BUCKET=${{ vars.SCCACHE_BUCKET}}"
echo "SCCACHE_REGION=${{ vars.SCCACHE_REGION}}"
} >> "$GITHUB_ENV"
fi
- name: Setup sccache
uses: mozilla-actions/sccache-action@v0.0.9
timeout-minutes: ${{ fromJSON(env.CACHE_TIMEOUT_MINUTES) }}
continue-on-error: true
- uses: actions/checkout@v6
- uses: jdx/mise-action@v4
- uses: taiki-e/install-action@cargo-llvm-cov
- uses: taiki-e/install-action@nextest
- uses: actions/cache@v5
id: cache-proof-params
with:
path: ${{ env.FIL_PROOFS_PARAMETER_CACHE }}
key: proof-params-keys
- uses: actions/cache@v5
id: cache-actor-bundle
with:
path: ${{ env.FOREST_ACTOR_BUNDLE_PATH }}
key: actor-bundle
- name: Fetch proof params and RPC test snapshots
run: |
# Use the same profile to re-use some compilation artifacts and speed up the entire job.
cargo llvm-cov run --profile codecov --no-report --bin forest-dev --no-default-features -- fetch-test-snapshots --actor-bundle "$FOREST_ACTOR_BUNDLE_PATH"
ls -ahl "$FIL_PROOFS_PARAMETER_CACHE"
- name: Generate code coverage
run: mise codecov
env:
FOREST_TEST_SKIP_PROOF_PARAM_CHECK: 1
- name: Upload Test Results to CodeCov
uses: codecov/codecov-action@v6
if: ${{ !cancelled() }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
report_type: "test_results"
files: target/nextest/default/junit.xml
fail_ci_if_error: false
# Save lcov.info as an artifact for debugging purposes
- uses: actions/upload-artifact@v7
with:
name: lcov.info
path: lcov.info
if-no-files-found: error
- name: Upload CodeCov
uses: codecov/codecov-action@v6
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: lcov.info
fail_ci_if_error: true
override_codecov:
name: Coverage
needs:
- path-filter
if: ${{ needs.path-filter.outputs.codeChange == 'false' && needs.path-filter.outputs.workflowChange == 'false' }}
runs-on: ubuntu-slim
steps:
- run: echo "No-op job to trigger the required codecov job."