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

Release process with artifact testing #12367

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
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
109 changes: 90 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Release
run-name: Release ${{ inputs.release_version }} from branch ${{ inputs.checkout_ref }} executed by @${{ github.actor }}

env:
APPLICATION: "erigon"
@@ -11,17 +12,16 @@ env:
GITHUB_AUTOMATION_EMAIL: "[email protected]"
GITHUB_AUTOMATION_NAME: "Erigon Github Automation"
LABEL_DESCRIPTION: "Erigon is an implementation of Ethereum (execution layer with embeddable consensus layer), on the efficiency frontier. Archive Node by default."
TEST_ERIGON_DATA_DIR: "erigon_data"
TEST_ERIGON_BIN_DIR: "erigon_bin"
TEST_TRACKING_TIME_SECONDS: 7200 # 2 hours
TEST_TOTAL_TIME_SECONDS: 18000 # 5 hours
TEST_CHAIN: "mainnet"

on:
push:
branches-ignore:
- '**'
#branches:
# - 'master'
#tags:
## only trigger on release tags:
#- 'v*.*.*'
#- 'v*.*.*-*'
workflow_dispatch:
inputs:
checkout_ref:
@@ -37,8 +37,7 @@ on:
required: false
type: boolean
default: false
description: 'perform_release: when set then all artifacts will be published and the DRAFT of the release
notes will be created.'
description: 'perform_release: when set then all artifacts will be published and the DRAFT of the release notes will be created.'
publish_latest_tag:
required: false
type: boolean
@@ -48,10 +47,9 @@ on:
jobs:

build-release:
## runs-on: ubuntu-22.04
runs-on: ubuntu-latest-devops-xxlarge
timeout-minutes: 60
name: Build Artifacts and multi-platform Docker image, publish draft of the Release Notes
name: Build Artifacts and multi-platform Docker image

steps:
- name: Checkout git repository ${{ env.APP_REPO }}
@@ -185,18 +183,91 @@ jobs:
retention-days: 1
compression-level: 0
if-no-files-found: error
## not required for now -- commented:
# - name: Create and push a git tag for the released version in case perform_release is set
# if: ${{ inputs.perform_release }}
# run: |
# git config --global user.email ${{ env.GITHUB_AUTOMATION_EMAIL }}
# git config --global user.name "${{ env.GITHUB_AUTOMATION_NAME }}"
# git tag -a ${{ inputs.release_version }} -m "Release ${{ inputs.release_version }}"
# git push origin ${{ inputs.release_version }}

## not required for now -- commented:
# - name: Create and push a git tag for the released version in case perform_release is set
# if: ${{ inputs.perform_release }}
# run: |
# git config --global user.email ${{ env.GITHUB_AUTOMATION_EMAIL }}
# git config --global user.name "${{ env.GITHUB_AUTOMATION_NAME }}"
# git tag -a ${{ inputs.release_version }} -m "Release ${{ inputs.release_version }}"
# git push origin ${{ inputs.release_version }}
test-release:
strategy:
matrix:
platform: [linux_arm64, linux_amd64, linux_amd64v2, darwin_arm64, darwin_amd64]
runs-on: ${{ matrix.platform }}
name: Test release on ${{ matrix.platform }}

steps:
- name: Set up Python
uses: actions/setup-python@v4

- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: ${{ env.APPLICATION }}_${{ inputs.release_version }}_${{ matrix.platform }}.tar.gz
path: ${{ runner.workspace }}/${{ env.TEST_ERIGON_BIN_DIR }}

- name: Unzip artifact
run: |
import tarfile
import os
artifact_path = os.path.join("${{ runner.workspace }}", "${{ env.TEST_ERIGON_BIN_DIR }}", "${{ env.APPLICATION }}_${{ inputs.release_version }}_${{ matrix.platform }}.tar.gz")
extract_path = os.path.join("${{ runner.workspace }}", "${{ env.TEST_ERIGON_BIN_DIR }}")
with tarfile.open(artifact_path, "r:gz") as tar:
tar.extractall(path=extract_path)
- name: Checkout QA Tests Repository & Install Requirements
run: |
rm -rf ${{runner.workspace}}/erigon-qa
git -c advice.detachedHead=false clone --depth 1 https://github.com/erigontech/erigon-qa ${{runner.workspace}}/erigon-qa
cd ${{runner.workspace}}/erigon-qa
pip3 install -r requirements.txt
- name: Run Erigon and execute tests
id: test_step
run: |
set +e # Disable exit on error
# Run Erigon, wait sync and check ability to maintain sync
python3 ${{runner.workspace}}/erigon-qa/test_system/qa-tests/tip-tracking/run_and_check_tip_tracking.py \
${{ runner.workspace }}/${{ env.TEST_ERIGON_BIN_DIR }} ${{ runner.workspace }}/${{ env.TEST_ERIGON_DATA_DIR }} ${{ env.TEST_TRACKING_TIME_SECONDS }} ${{ env.TEST_TOTAL_TIME_SECONDS }} Erigon3 ${{ env.TEST_CHAIN }} minimal_node
# Capture monitoring script exit status
test_exit_status=$?
# Save the subsection reached status
echo "::set-output name=test_executed::true"
# Check test runner script exit status
if [ $test_exit_status -eq 0 ]; then
echo "Tests completed successfully"
echo "TEST_RESULT=success" >> "$GITHUB_OUTPUT"
else
echo "Error detected during tests"
echo "TEST_RESULT=failure" >> "$GITHUB_OUTPUT"
fi
- name: Action for Success
if: steps.test_step.outputs.TEST_RESULT == 'success'
run: echo "::notice::Tests completed successfully"

- name: Action for Not Success
if: steps.test_step.outputs.TEST_RESULT != 'success'
run: |
echo "::error::Error detected during tests"
exit 1
publish-release-notes:
name: Publish draft of the Release Notes
runs-on: ubuntu-latest
needs: [build-release, test-release]

steps:
- name: Publish draft of the Release notes with assets in case perform_release is set
if: ${{ inputs.perform_release }}
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}

Unchanged files with check annotations Beta

"math/big"
"unsafe"
silkworm_go "github.com/erigontech/silkworm-go"

Check failure on line 24 in turbo/silkworm/silkworm.go

GitHub Actions / tests (ubuntu-22.04)

reading github.com/erigontech/silkworm-go/go.mod at revision v0.18.0: git ls-remote -q origin in /home/runner/go/pkg/mod/cache/vcs/09d201df9fbb908beb69e5874fb1704cc530700efc82de4dc94bbc432e87544d: exit status 128:
"github.com/erigontech/erigon-lib/kv"
"github.com/erigontech/erigon-lib/log/v3"