Skip to content

Commit

Permalink
Merge branch 'release/v1.30.0' into streaming
Browse files Browse the repository at this point in the history
# Conflicts:
#	CHANGELOG.md
#	build/openrpc/full.json
#	build/openrpc/gateway.json
#	build/openrpc/miner.json
#	build/openrpc/worker.json
#	build/version.go
#	documentation/en/cli-lotus.md
#	itests/fevm_test.go
#	node/impl/full/eth.go
  • Loading branch information
astudnev committed Nov 7, 2024
2 parents 54173fd + 9c1964e commit d137c41
Show file tree
Hide file tree
Showing 292 changed files with 12,535 additions and 4,373 deletions.
40 changes: 40 additions & 0 deletions .github/actions/make-deps/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Make Deps
description: Runs `make deps` with caching

inputs:
working-directory:
description: Specifies the working directory where the command is run.
required: false
github-token:
description: Specifies the token to use when calling GitHub APIs while building FFI.
required: false

runs:
using: composite
steps:
- id: cache-ffi
uses: actions/cache/restore@v4
with:
key: ${{ runner.os }}-${{ runner.arch }}-ffi-${{ hashFiles('./.git/modules/extern/filecoin-ffi/HEAD') }}
path: |
./extern/filecoin-ffi/filcrypto.h
./extern/filecoin-ffi/libfilcrypto.a
./extern/filecoin-ffi/filcrypto.pc
./build/.filecoin-install
./build/.update-modules
- if: steps.cache-ffi.outputs.cache-hit != 'true'
shell: bash
working-directory: ${{ inputs.working-directory || github.workspace }}
env:
GITHUB_TOKEN: ${{ inputs.github-token || github.token }}
run: FFI_PORTABLE=1 make deps
- if: steps.cache-ffi.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
key: ${{ runner.os }}-${{ runner.arch }}-ffi-${{ hashFiles('./.git/modules/extern/filecoin-ffi/HEAD') }}
path: |
./extern/filecoin-ffi/filcrypto.h
./extern/filecoin-ffi/libfilcrypto.a
./extern/filecoin-ffi/filcrypto.pc
./build/.filecoin-install
./build/.update-modules
16 changes: 0 additions & 16 deletions .github/actions/start-yugabytedb/action.yml

This file was deleted.

1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
fetch-depth: 0
- uses: ./.github/actions/install-system-dependencies
- uses: ./.github/actions/install-go
- run: make deps lotus
22 changes: 6 additions & 16 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,30 +20,17 @@ permissions:
contents: read

jobs:
check-docsgen:
name: Check (docs-check)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- uses: ./.github/actions/install-system-dependencies
- uses: ./.github/actions/install-go
- run: go install golang.org/x/tools/cmd/goimports
- run: make deps
- run: make docsgen
- run: git diff --exit-code
check-gen:
name: Check (gen-check)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
fetch-depth: 0
- uses: ./.github/actions/install-system-dependencies
- uses: ./.github/actions/install-go
- run: make deps lotus
- run: go install golang.org/x/tools/cmd/goimports
- uses: ./.github/actions/make-deps
- run: make gen
- run: git diff --exit-code
- run: make docsgen-cli
Expand All @@ -55,10 +42,11 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
fetch-depth: 0
- uses: ./.github/actions/install-system-dependencies
- uses: ./.github/actions/install-go
- uses: ./.github/actions/make-deps
- run: go install github.com/golangci/golangci-lint/cmd/[email protected]
- run: make deps
- run: golangci-lint run -v --timeout 10m --concurrency 4
check-fmt:
name: Check (gofmt)
Expand All @@ -67,6 +55,7 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
fetch-depth: 0
- uses: ./.github/actions/install-go
- run: go fmt ./...
- run: git diff --exit-code
Expand All @@ -77,6 +66,7 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
fetch-depth: 0
- uses: ./.github/actions/install-go
- run: go mod tidy -v
- run: git diff --exit-code
1 change: 1 addition & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
fetch-depth: 0
- id: git
run: |
ref="${GITHUB_REF#refs/heads/}"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ jobs:
uses: actions/checkout@v4
with:
submodules: 'recursive'
fetch-depth: 0
- name: Install system dependencies
uses: ./.github/actions/install-system-dependencies
- name: Install Go
Expand All @@ -99,6 +100,7 @@ jobs:
uses: actions/checkout@v4
with:
submodules: 'recursive'
fetch-depth: 0
ref: ${{ github.event.inputs.ref }}
- name: Build binaries
env:
Expand Down
21 changes: 0 additions & 21 deletions .github/workflows/sync-master-main.yaml

This file was deleted.

49 changes: 32 additions & 17 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
fetch-depth: 0
- id: test
env:
# Unit test groups other than unit-rest
Expand Down Expand Up @@ -108,9 +109,6 @@ jobs:
"multicore-sdr": ["self-hosted", "linux", "x64", "xlarge"],
"unit-node": ["self-hosted", "linux", "x64", "xlarge"]
}
# A list of test groups that require YugabyteDB to be running
yugabytedb: |
["itest-harmonydb"]
# A list of test groups that require Proof Parameters to be fetched
parameters: |
[
Expand Down Expand Up @@ -161,9 +159,6 @@ jobs:
# Apply custom runner labels to the groups
groups="$(jq -n --argjson g "$groups" --argjson r "$runners" '$g | map(. + {"runner": (.name as $n | $r | .[$n]) })')"
# Apply the needs_yugabytedb flag to the groups
groups="$(jq -n --argjson g "$groups" --argjson y "$yugabytedb" '$g | map(. + {"needs_yugabytedb": ([.name] | inside($y)) })')"
# Apply the needs_parameters flag to the groups
groups="$(jq -n --argjson g "$groups" --argjson p "$parameters" '$g | map(. + {"needs_parameters": ([.name] | inside($p)) })')"
Expand All @@ -182,6 +177,7 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
fetch-depth: 0
- id: fetch_params
env:
CACHE_KEY: fetch-params-${{ hashFiles('./extern/filecoin-ffi/parameters.json') }}
Expand All @@ -192,7 +188,7 @@ jobs:
echo -e "path<<EOF\n$CACHE_PATH\nEOF" | tee -a $GITHUB_OUTPUT
- id: make_deps
env:
CACHE_KEY: ${{ runner.os }}-${{ runner.arch }}-make-deps-${{ hashFiles('./.git/modules/extern/filecoin-ffi/HEAD') }}
CACHE_KEY: ${{ runner.os }}-${{ runner.arch }}-make-deps-${{ hashFiles('./.git/modules/extern/filecoin-ffi/HEAD') }}-p
CACHE_PATH: |
./extern/filecoin-ffi/filcrypto.h
./extern/filecoin-ffi/libfilcrypto.a
Expand All @@ -212,14 +208,14 @@ jobs:
key: ${{ steps.make_deps.outputs.key }}
path: ${{ steps.make_deps.outputs.path }}
lookup-only: true
- if: steps.restore_fetch_params.outputs.cache-hit != 'true'
- if: steps.restore_fetch_params.outputs.cache-hit != 'true' || steps.restore_make_deps.outputs.cache-hit != 'true'
uses: ./.github/actions/install-system-dependencies
- if: steps.restore_fetch_params.outputs.cache-hit != 'true'
- if: steps.restore_fetch_params.outputs.cache-hit != 'true' || steps.restore_make_deps.outputs.cache-hit != 'true'
uses: ./.github/actions/install-go
- if: steps.restore_fetch_params.outputs.cache-hit != 'true' || steps.restore_make_deps.outputs.cache-hit != 'true'
env:
GITHUB_TOKEN: ${{ github.token }}
run: make deps
run: FFI_PORTABLE=1 make deps
- if: steps.restore_fetch_params.outputs.cache-hit != 'true'
run: make lotus
- if: steps.restore_fetch_params.outputs.cache-hit != 'true'
Expand All @@ -246,9 +242,11 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
fetch-depth: 0
- uses: ./.github/actions/install-system-dependencies
- uses: ./.github/actions/install-go
- run: go install gotest.tools/gotestsum@latest
- name: Install gotestsum
run: go install gotest.tools/gotestsum@latest
- name: Restore cached make deps outputs
uses: actions/cache/restore@v4
with:
Expand All @@ -262,17 +260,15 @@ jobs:
key: ${{ needs.cache.outputs.fetch_params_key }}
path: ${{ needs.cache.outputs.fetch_params_path }}
fail-on-cache-miss: true
- if: ${{ matrix.needs_yugabytedb }}
uses: ./.github/actions/start-yugabytedb
timeout-minutes: 3
# TODO: Install statediff (used to be used for conformance)
- id: reports
- name: Create temporary directory for reports
id: reports
run: mktemp -d | xargs -0 -I{} echo "path={}" | tee -a $GITHUB_OUTPUT
# TODO: Track coverage (used to be tracked for conformance)
- env:
- name: Run tests
env:
NAME: ${{ matrix.name }}
LOTUS_SRC_DIR: ${{ github.workspace }}
LOTUS_HARMONYDB_HOSTS: 127.0.0.1
REPORTS_PATH: ${{ steps.reports.outputs.path }}
SKIP_CONFORMANCE: ${{ matrix.skip_conformance || '1' }}
TEST_RUSTPROOFS_LOGS: ${{ matrix.test_rustproofs_logs || '0' }}
Expand All @@ -285,6 +281,25 @@ jobs:
--jsonfile "$REPORTS_PATH/$NAME.json" \
--packages="$PACKAGES" \
-- ${{ matrix.go_test_flags || '' }}
- name: Modify junit.xml for BuildPulse
env:
NAME: ${{ matrix.name }}
REPORTS_PATH: ${{ steps.reports.outputs.path }}
PACKAGES: ${{ join(matrix.packages, ' ') }}
if: always()
run: |
# Modify test suite name and classname attributes in JUnit XML for better grouping
# in BuildPulse. itests are run with go test ./itests/file_test.go and therefore Go
# assigns the name and classname attributes to "command-line-arguments". Others get the
# package name for both.
if [[ "${{ matrix.name }}" == itest-* ]]; then
PACKAGE_NAME=$(basename "$PACKAGES" .go)
sed -i 's/ name="command-line-arguments"/ name="itests"/g' "$REPORTS_PATH/$NAME.xml"
sed -i 's/classname="command-line-arguments"/classname="'"$PACKAGE_NAME"'"/g' "$REPORTS_PATH/$NAME.xml"
else
sed -i 's# name="github.com/filecoin-project/lotus/\(.*\)"# name="'${{ matrix.name }}':\1"#g' "$REPORTS_PATH/$NAME.xml"
fi
cat "$REPORTS_PATH/$NAME.xml"
- if: success() || failure()
uses: actions/upload-artifact@v4
with:
Expand Down
Loading

0 comments on commit d137c41

Please sign in to comment.