Skip to content

Commit

Permalink
devel merged and conflict resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
dhyaniarun1993 committed Feb 14, 2024
2 parents 93b61c7 + 3b5cfa3 commit 5234bb4
Show file tree
Hide file tree
Showing 1,197 changed files with 164,804 additions and 31,566 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ jobs:
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
strategy:
matrix:
os: [ ubuntu-20.04, macos-11 ] # list of os: https://github.com/actions/virtual-environments
# list of os: https://github.com/actions/virtual-environments
os:
- ubuntu-22.04
- macos-13
runs-on: ${{ matrix.os }}

steps:
Expand Down Expand Up @@ -54,7 +57,7 @@ jobs:
if: runner.os == 'Linux'
uses: golangci/golangci-lint-action@v3
with:
version: v1.54.2
version: v1.55.2
skip-build-cache: true
args: --help

Expand Down Expand Up @@ -94,8 +97,8 @@ jobs:
key: chocolatey-${{ matrix.os }}
- name: Install dependencies
run: |
choco upgrade mingw -y --no-progress --version 11.2.0.07112021
choco install cmake -y --no-progress --version 3.23.1
choco upgrade mingw -y --no-progress --version 13.2.0
choco install cmake -y --no-progress --version 3.27.8
- name: Build
run: .\wmake.ps1 all
Expand All @@ -109,7 +112,7 @@ jobs:
docker-build-check:
# don't run this on devel - the PR must have run it to be merged and it misleads that this pushes the docker image
if: (${{ github.event_name == 'push' || !github.event.pull_request.draft }}) && ${{ github.ref != 'refs/heads/devel' }}
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: AutoModality/action-clean@v1
- uses: actions/checkout@v3
Expand All @@ -125,7 +128,7 @@ jobs:

# automated-tests:
# runs-on:
# ubuntu-20.04
# ubuntu-22.04
# if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
# steps:
# - uses: actions/checkout@v3
Expand Down
78 changes: 78 additions & 0 deletions .github/workflows/qa-clean-exit-block-downloading.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: QA - Clean exit (block downloading)

on:
push:
branches:
- 'release/**'
pull_request:
branches:
- devel
- 'release/**'
types:
- ready_for_review

jobs:
long-running-test:
runs-on: self-hosted
env:
ERIGON_REFERENCE_DATA_DIR: /opt/erigon-release/datadir
ERIGON_TESTBED_DATA_DIR: /opt/erigon-testbed/datadir
WORKING_TIME_SECONDS: 600

steps:
- name: Check out repository
uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'

#- name: Install dependencies
# run: |
# sudo apt-get update
# sudo apt-get install -y build-essential make gcc

- name: Restore Erigon Testbed Data Directory
run: |
rm -rf $ERIGON_TESTBED_DATA_DIR/chaindata
rsync -a --delete $ERIGON_REFERENCE_DATA_DIR/ $ERIGON_TESTBED_DATA_DIR/
- name: Clean Erigon Build Directory
run: |
make clean
- name: Build Erigon
run: |
make erigon
working-directory: ${{ github.workspace }}

- name: Run Erigon, send ctrl-c and check for clean exiting
run: |
# Run Erigon, send ctrl-c and check logs
python3 ${{ github.workspace }}/../../../../erigon-qa/test_system/qa-tests/clean-exit/run_and_check_clean_exit.py ${{ github.workspace }}/build/bin $ERIGON_TESTBED_DATA_DIR $WORKING_TIME_SECONDS
# Capture monitoring script exit status
monitoring_exit_status=$?

# Clean up Erigon process if it's still running
if kill -0 $ERIGON_PID 2> /dev/null; then
echo "Terminating Erigon"
kill $ERIGON_PID
wait $ERIGON_PID
else
echo "Erigon has already terminated"
fi

# Check monitoring script exit status
if [ $monitoring_exit_status -eq 0 ]; then
echo "Monitoring completed successfully"
else
echo "Error detected in Erigon logs or monitoring script exited unexpectedly"
exit 1
fi
81 changes: 81 additions & 0 deletions .github/workflows/qa-clean-exit-snapshot-downloading.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: QA - Clean exit (snapshot downloading)

on:
push:
branches:
- devel
- alpha
- 'release/**'
pull_request:
branches:
- devel
- alpha
- 'release/**'
types:
- opened
- reopened
- synchronize
- ready_for_review

jobs:
long-running-test:
runs-on: self-hosted
env:
ERIGON_DATA_DIR: ${{ github.workspace }}/erigon_data
WORKING_TIME_SECONDS: 600

steps:
- name: Check out repository
uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'

#- name: Install dependencies
# run: |
# sudo apt-get update
# sudo apt-get install -y build-essential make gcc

- name: Clean Erigon Build Directory
run: |
make clean
- name: Build Erigon
run: |
make erigon
working-directory: ${{ github.workspace }}

- name: Run Erigon, send ctrl-c and check for clean exiting
run: |
# Run Erigon, send ctrl-c and check logs
python3 ${{ github.workspace }}/../../../../erigon-qa/test_system/qa-tests/clean-exit/run_and_check_clean_exit.py ${{ github.workspace }}/build/bin $ERIGON_DATA_DIR $WORKING_TIME_SECONDS
# Capture monitoring script exit status
monitoring_exit_status=$?

# Clean up Erigon process if it's still running
if kill -0 $ERIGON_PID 2> /dev/null; then
echo "Terminating Erigon"
kill $ERIGON_PID
wait $ERIGON_PID
else
echo "Erigon has already terminated"
fi

# Clean up Erigon build and data directories
rm -rf $ERIGON_DATA_DIR

# Check monitoring script exit status
if [ $monitoring_exit_status -eq 0 ]; then
echo "Monitoring completed successfully"
else
echo "Error detected in Erigon logs or monitoring script exited unexpectedly"
exit 1
fi
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
id: prepare
run: |
TAG=${GITHUB_REF#refs/tags/}
echo ::set-output name=tag_name::${TAG}
echo "tag_name=${TAG}" >> $GITHUB_OUTPUT
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
Expand Down
23 changes: 0 additions & 23 deletions .github/workflows/stale-issues.yml

This file was deleted.

7 changes: 4 additions & 3 deletions .github/workflows/test-integration-caplin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ jobs:
tests:
strategy:
matrix:
os: [ ubuntu-20.04, macos-11 ] # list of os: https://github.com/actions/virtual-environments
# disable macos-11 until https://github.com/ledgerwatch/erigon/issues/8789
os: [ ubuntu-22.04 ] # list of os: https://github.com/actions/virtual-environments
runs-on: ${{ matrix.os }}

steps:
Expand Down Expand Up @@ -55,8 +56,8 @@ jobs:
key: chocolatey-${{ matrix.os }}
- name: Install dependencies
run: |
choco upgrade mingw -y --no-progress --version 11.2.0.07112021
choco install cmake -y --no-progress --version 3.23.1
choco upgrade mingw -y --no-progress --version 13.2.0
choco install cmake -y --no-progress --version 3.27.8
- name: test-integration-caplin
run: cd ./cl/spectest/ && .\wmake.ps1 Tests Mainnet
9 changes: 6 additions & 3 deletions .github/workflows/test-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ jobs:
tests:
strategy:
matrix:
os: [ ubuntu-20.04, macos-11 ] # list of os: https://github.com/actions/virtual-environments
# list of os: https://github.com/actions/virtual-environments
os:
- ubuntu-22.04
- macos-13
runs-on: ${{ matrix.os }}

steps:
Expand Down Expand Up @@ -58,8 +61,8 @@ jobs:
key: chocolatey-${{ matrix.os }}
- name: Install dependencies
run: |
choco upgrade mingw -y --no-progress --version 11.2.0.07112021
choco install cmake -y --no-progress --version 3.23.1
choco upgrade mingw -y --no-progress --version 13.2.0
choco install cmake -y --no-progress --version 3.27.8
- name: test-integration
run: .\wmake.ps1 test-integration
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,9 @@ jwt.hex
*__debug_bin*
yarn.lock
node_modules

/config.toml
/config.yaml
/config.yml

vendor
4 changes: 4 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ linters:
- errorlint #TODO: enable me
- errchkjson #TODO: enable me
- unused #TODO: enable me
- testifylint #TODO: enable me
- perfsprint #TODO: enable me
- gocheckcompilerdirectives
- protogetter
enable:
- unconvert
# - predeclared #TODO: enable me
Expand Down Expand Up @@ -124,6 +127,7 @@ issues:
- unused
- deadcode
- gocritic
- perfsprint
- path: hack\.go
linters:
- gosec
Expand Down
10 changes: 5 additions & 5 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ builds:
env:
- CC=o64-clang
- CXX=o64-clang++
tags: [ nosqlite, noboltdb ]
tags: [ nosqlite, noboltdb, nosilkworm ]
ldflags: -s -w

- id: darwin-arm64
Expand All @@ -25,7 +25,7 @@ builds:
env:
- CC=oa64-clang
- CXX=oa64-clang++
tags: [ nosqlite, noboltdb ]
tags: [ nosqlite, noboltdb, nosilkworm ]
ldflags: -s -w

- id: linux-amd64
Expand All @@ -36,7 +36,7 @@ builds:
env:
- CC=x86_64-linux-gnu-gcc
- CXX=x86_64-linux-gnu-g++
tags: [ nosqlite, noboltdb ]
tags: [ nosqlite, noboltdb, nosilkworm ]
ldflags: -s -w -extldflags "-static" # We need to build a static binary because we are building in a glibc based system and running in a musl container

- id: linux-arm64
Expand All @@ -47,7 +47,7 @@ builds:
env:
- CC=aarch64-linux-gnu-gcc
- CXX=aarch64-linux-gnu-g++
tags: [ nosqlite, noboltdb ]
tags: [ nosqlite, noboltdb, nosilkworm ]
ldflags: -s -w -extldflags "-static" # We need to build a static binary because we are building in a glibc based system and running in a musl container

- id: windows-amd64
Expand All @@ -58,7 +58,7 @@ builds:
env:
- CC=x86_64-w64-mingw32-gcc
- CXX=x86_64-w64-mingw32-g++
tags: [ nosqlite, noboltdb ]
tags: [ nosqlite, noboltdb, nosilkworm ]
ldflags: -s -w


Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax = docker/dockerfile:1.2
FROM docker.io/library/golang:1.20-alpine3.17 AS builder
FROM docker.io/library/golang:1.21-alpine3.17 AS builder

RUN apk --no-cache add build-base linux-headers git bash ca-certificates libstdc++

Expand All @@ -15,10 +15,10 @@ ADD . .
RUN --mount=type=cache,target=/root/.cache \
--mount=type=cache,target=/tmp/go-build \
--mount=type=cache,target=/go/pkg/mod \
make all
make BUILD_TAGS=nosqlite,noboltdb,nosilkworm all


FROM docker.io/library/golang:1.20-alpine3.17 AS tools-builder
FROM docker.io/library/golang:1.21-alpine3.17 AS tools-builder
RUN apk --no-cache add build-base linux-headers git bash ca-certificates libstdc++
WORKDIR /app

Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.debian
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax = docker/dockerfile:1.2
FROM docker.io/library/golang:1.20-bullseye AS builder
FROM docker.io/library/golang:1.21-bullseye AS builder

RUN apt update
RUN apt install -y build-essential git bash ca-certificates libstdc++6
Expand All @@ -17,7 +17,7 @@ RUN --mount=type=cache,target=/root/.cache \
make all


FROM docker.io/library/golang:1.20-alpine3.17 AS tools-builder
FROM docker.io/library/golang:1.21-alpine3.17 AS tools-builder

RUN apk --no-cache add build-base linux-headers git bash ca-certificates libstdc++
WORKDIR /app
Expand Down
Loading

0 comments on commit 5234bb4

Please sign in to comment.