Repository navigation
Miner Integration Test: Create a miner and pledges a sector through Forest #7807
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| --- | ||
| title: "[automated] Miner integration tests failure @ {{ date | date('D/M/YY HH:mm') }}" | ||
| labels: ["Bug"] | ||
| --- | ||
|
|
||
| ## Description | ||
|
|
||
| Miner integration tests failed. Please [check the logs]({{ env.WORKFLOW_URL }}) for more information. |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,166 @@ | ||
| name: Miner integration tests | ||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| types: [opened, synchronize, reopened, labeled, unlabeled] | ||
| schedule: | ||
| - cron: "0 13 * * *" # Runs every day at 13:00 UTC | ||
|
|
||
| env: | ||
| CI: 1 | ||
| CACHE_TIMEOUT_MINUTES: 5 | ||
| SCRIPT_TIMEOUT_MINUTES: 30 | ||
| FIL_PROOFS_PARAMETER_CACHE: /var/tmp/filecoin-proof-parameters | ||
| SHELL_IMAGE: busybox | ||
|
|
||
| jobs: | ||
| # Pull requests only run the tests with the `Miner` or `Release` label. | ||
| build: | ||
| name: Build Forest | ||
| if: |- | ||
| ${{ github.event_name != 'pull_request' | ||
| || contains(github.event.pull_request.labels.*.name, 'Miner') | ||
| || contains(github.event.pull_request.labels.*.name, 'Release') }} | ||
| runs-on: ubuntu-24.04 | ||
| env: | ||
| RUSTC_WRAPPER: sccache | ||
| CC: sccache clang | ||
| CXX: sccache clang++ | ||
| AWS_ACCESS_KEY_ID: "${{ secrets.AWS_ACCESS_KEY_ID }}" | ||
| AWS_SECRET_ACCESS_KEY: "${{ secrets.AWS_SECRET_ACCESS_KEY }}" | ||
| 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 | ||
| - uses: rui314/setup-mold@v1 | ||
| with: | ||
| make-default: false | ||
| - name: Checkout Sources | ||
| uses: actions/checkout@v7 | ||
| with: | ||
| persist-credentials: false | ||
| - name: Setup sccache | ||
| uses: mozilla-actions/sccache-action@v0.0.11 | ||
| timeout-minutes: ${{ fromJSON(env.CACHE_TIMEOUT_MINUTES) }} | ||
| continue-on-error: true | ||
| - uses: actions/setup-go@v7 | ||
| with: | ||
| go-version-file: "go.work" | ||
| cache-dependency-path: "**/go.sum" | ||
| - uses: jdx/mise-action@v5 | ||
| - name: Install Forest | ||
| env: | ||
| # 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=mold" | ||
| run: mise run install --slim quick | ||
| - uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: "forest-${{ runner.os }}" | ||
| path: | | ||
| ~/.cargo/bin/forest* | ||
| if-no-files-found: error | ||
|
|
||
| miner-tests: | ||
| name: Miner integration tests (${{ matrix.group }}) | ||
| needs: build | ||
| runs-on: ubuntu-24.04 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| # The `forest-dev devnet miner --group` values. Add groups as more Lotus itests are ported. | ||
| group: [onboarding] | ||
| env: | ||
| # We use a custom Dockerfile for CI to speed up the build process. | ||
| FOREST_DOCKERFILE_OVERRIDE: scripts/devnet/forest_ci.dockerfile | ||
| MINER_TEST_GROUP: ${{ matrix.group }} | ||
| steps: | ||
| - uses: actions/cache@v6 | ||
| id: cache | ||
| with: | ||
| path: "${{ env.FIL_PROOFS_PARAMETER_CACHE }}" | ||
| key: proof-params-2k | ||
| - name: Load cache into volume | ||
| if: steps.cache.outputs.cache-hit == 'true' | ||
| run: | | ||
| docker volume create devnet-forest-miner_filecoin-proofs | ||
| docker run --rm \ | ||
| -v devnet-forest-miner_filecoin-proofs:/proofs \ | ||
| -v "$FIL_PROOFS_PARAMETER_CACHE":/cache \ | ||
| "$SHELL_IMAGE" \ | ||
| sh -c "cp /cache/* /proofs" | ||
| - uses: actions/checkout@v7 | ||
| with: | ||
| persist-credentials: false | ||
| - uses: actions/download-artifact@v8 | ||
| with: | ||
| name: "forest-${{ runner.os }}" | ||
| - name: Devnet setup | ||
| run: ./scripts/devnet-forest-miner/setup.sh | ||
| timeout-minutes: ${{ fromJSON(env.SCRIPT_TIMEOUT_MINUTES) }} | ||
| - name: Devnet check | ||
| run: ./scripts/devnet-forest-miner/check.sh | ||
| timeout-minutes: ${{ fromJSON(env.SCRIPT_TIMEOUT_MINUTES) }} | ||
| - name: Add forest binaries to PATH | ||
| run: | | ||
| chmod +x "$GITHUB_WORKSPACE"/forest* | ||
| echo "$GITHUB_WORKSPACE" >> "$GITHUB_PATH" | ||
| - name: Miner tests | ||
| run: | | ||
| set -euo pipefail | ||
| export DEVNET_DIR=scripts/devnet-forest-miner | ||
| source ./scripts/devnet/test_harness.sh | ||
| devnet_test_env_init | ||
| forest-dev devnet miner --group "$MINER_TEST_GROUP" | ||
| timeout-minutes: 120 | ||
| - name: Dump docker logs | ||
| if: always() | ||
| uses: jwalton/gh-docker-logs@v2 | ||
|
coderabbitai[bot] marked this conversation as resolved.
Resolved
|
||
| - name: Prepare cache folder for uploading | ||
| if: steps.cache.outputs.cache-hit != 'true' | ||
| run: | | ||
| docker run --rm \ | ||
| -v devnet-forest-miner_filecoin-proofs:/proofs \ | ||
| -v "$FIL_PROOFS_PARAMETER_CACHE":/cache \ | ||
| "$SHELL_IMAGE" \ | ||
| sh -c "cp /proofs/* /cache" | ||
| sudo chmod -R 755 "$FIL_PROOFS_PARAMETER_CACHE" | ||
|
|
||
| # One issue per failed scheduled run, including a failed build. | ||
| report-failure: | ||
| name: Report failure | ||
| permissions: | ||
| contents: read | ||
| issues: write | ||
| needs: [build, miner-tests] | ||
| if: ${{ failure() && github.event_name == 'schedule' }} | ||
| runs-on: ubuntu-24.04 | ||
| steps: | ||
| - uses: actions/checkout@v7 | ||
| with: | ||
| persist-credentials: false | ||
| - name: Set WORKFLOW_URL | ||
| run: | | ||
| export WORKFLOW_URL="${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}" | ||
| echo "${WORKFLOW_URL}" | ||
| echo "WORKFLOW_URL=${WORKFLOW_URL}" >> "$GITHUB_ENV" | ||
| - uses: JasonEtco/create-an-issue@v2 | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| with: | ||
| filename: .github/MINER_TESTS_ISSUE_TEMPLATE.md | ||
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.