Skip to content
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

chore: added support for archive node #267

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 13 additions & 27 deletions .github/workflows/artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ jobs:
- name: Upload Artifact to AWS S3
run: |
aws s3 cp ${{ env.ARTIFACT_NAME }} s3://${{ secrets.AWS_S3_BUCKET }}

- name: Set Artifact Retention
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
run: |
aws s3api put-object-tagging \
--bucket ${{ secrets.AWS_S3_BUCKET }} \
--key "${{ env.ARTIFACT_NAME }}" \
Expand All @@ -53,18 +49,14 @@ jobs:
timeout-minutes: 30
strategy:
matrix:
module: [ infrastructure/tools/keystore-generator, p2p/integrationtest/real-bidder, p2p/integrationtest/provider, bridge/standard/bridge-v1, external/geth, oracle, p2p]
module: [ external/geth ]

steps:
- name: Set Snapshot Flag
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
run: echo "FLAGS=--snapshot" >> ${GITHUB_ENV}

- name: Checkout Code
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 1
fetch-depth: 0

- name: Setup Cache
uses: actions/cache@v4
Expand All @@ -86,7 +78,7 @@ jobs:
uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: release --config=./${{ matrix.module }}/.goreleaser.yml --clean ${{ env.FLAGS }}
args: release --config=./${{ matrix.module }}/.goreleaser.yml --clean --snapshot
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -99,19 +91,13 @@ jobs:

- name: Upload Artifacts to AWS S3
run: |
aws s3 cp ./dist/ s3://${{ secrets.AWS_S3_BUCKET }} \
--recursive \
--exclude "*" \
--include "*.gz" \
--include "*.txt" \

- name: Set Artifacts Retention
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
run: |
ls -1 ./dist | grep '\.gz\|\.txt$' | while read -r file; do
echo "Tagging uploaded file $file for auto delete"
aws s3api put-object-tagging \
--bucket ${{ secrets.AWS_S3_BUCKET }} \
--key "$file" \
--tagging 'TagSet=[{Key=AutoDelete,Value=true}]'
done
find /tmp/dist -type f \( -name "*.gz" -o -name "*.txt" \) \
-exec sh -c '
file=$(basename "${1}")
echo "Uploading ${file} to S3..."
aws s3 cp "${1}" s3://${{ secrets.AWS_S3_BUCKET }}/ &&
aws s3api put-object-tagging \
--bucket ${{ secrets.AWS_S3_BUCKET }} \
--key "${file}" \
--tagging "TagSet=[{Key=AutoDelete,Value=true}]"
' _ {} \;
40 changes: 28 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,35 +81,51 @@ jobs:
check-latest: true
cache-dependency-path: go.work.sum

- name: Determine Workspace Modules
- name: Determine Modules
run: |
echo $(go list -f '{{.Dir}}' -m)
echo "GO_LINT_DIRS=$(go list -f '{{.Dir}}/...' -m | grep -v '/external/geth' | tr '\n' ' ')" >> ${GITHUB_ENV}
WORKSPACE_MODULES=$(go list -f '{{.Dir}}' -m)

ADDITIONAL_MODULES=(
"${GITHUB_WORKSPACE}/external/geth"
)

ALL_MODULES=$(printf "%s\n" "${WORKSPACE_MODULES}" "${ADDITIONAL_MODULES[@]}")

echo "GO_MODULES<<EOF" >> ${GITHUB_ENV}
echo "${ALL_MODULES}" >> ${GITHUB_ENV}
echo "EOF" >> ${GITHUB_ENV}
echo "GO_LINT_MODULES=$(printf "%s " $(echo "${ALL_MODULES}" | sed 's|$|/...|' | grep -v '/external/geth'))" >> ${GITHUB_ENV}

- name: Run Gofmt
run: go list -f '{{.Dir}}' -m | xargs gofmt -d -e -l
run: |
GOFMT_OUTPUT=$(echo ${GO_MODULES} | tr ' ' '\n' | xargs gofmt -d -e -l)
if [ -n "${GOFMT_OUTPUT}" ]; then
echo "The following files are not formatted correctly:"
echo "${GOFMT_OUTPUT}"
exit 1
fi

- name: Run Tidy & Workspace Sync
run: |
go list -f '{{.Dir}}' -m | xargs -L1 go mod tidy -C
echo ${GO_MODULES} | tr ' ' '\n' | xargs -L1 go mod tidy -C
go work sync
git checkout ${{ github.event.pull_request.head.ref }}
git diff --name-only --exit-code . || (echo "Golang modules/workspace not in sync with go.mod/go.sum/go.work/go.work.sum files" && exit 1)
git reset --hard HEAD

- name: Run Lint
uses: golangci/golangci-lint-action@v4
uses: golangci/golangci-lint-action@v6
with:
version: v1.57.2
args: --timeout 15m --verbose ${{ env.GO_LINT_DIRS }}
skip-cache: true # TODO(mrekucci): remove when the following issue is solved https://github.com/golangci/golangci-lint-action/issues/135#issuecomment-2039548548
version: v1.59
args: --timeout 15m --verbose ${{ env.GO_LINT_MODULES }}

- name: Run Build
run: go list -f '{{.Dir}}/...' -m | xargs go build
run: echo ${GO_MODULES} | tr ' ' '\n' | xargs -I {} sh -c 'go build -C {} -v ./...'
env:
GOWORK: off

# TODO(mrekucci): Re-enable /external/geth module when tests are passing.
- name: Run Test
run: go list -f '{{.Dir}}/...' -m | grep -v '/external/geth' | xargs go test -short -race
run: echo ${GO_MODULES} | tr ' ' '\n' | grep -v '/external/geth' | xargs -I {} sh -c 'go test -short -race {}/...'

- name: Setup Protobuf
uses: bufbuild/[email protected]
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/infrastructure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:
- devnet
- testnet
- stressnet
- manual-test
default: 'devnet'
all_targets:
description: 'All Arch & Os Targets'
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/releaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,6 @@ jobs:
check-latest: true
cache-dependency-path: go.work.sum

# TODO(mrekucci): Re-enable when the repo is finalized.
# - name: GHCR Docker Login
# run: echo "${{ secrets.CR_PAT }}" | docker login ghcr.io -u ${{ secrets.GHCR_USERNAME }} --password-stdin
# - name: Setup Docker Buildx
# uses: docker/setup-buildx-action@v3

- name: Release
uses: goreleaser/goreleaser-action@v5
with:
Expand Down
1 change: 1 addition & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
[submodule "external/geth"]
path = external/geth
url = [email protected]:primev/mev-commit-geth.git
branch = archive-node-support
[submodule "contracts/lib/openzeppelin-contracts-upgradeable"]
path = contracts/lib/openzeppelin-contracts-upgradeable
url = https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable
Expand Down
38 changes: 0 additions & 38 deletions bridge/hyperlane/Makefile

This file was deleted.

114 changes: 0 additions & 114 deletions bridge/hyperlane/README.md

This file was deleted.

Loading
Loading